# Manual Checkpoint/Restore

For both CPU and GPU workloads, no additional configuration is required. Below is an example of a simple CPU workload that counts from 0 to 600, sleeping for 1 second between each count.

```bash
#!/bin/bash
#SBATCH --job-name=hello_world          # Job name
#SBATCH --output=hello_world.out        # Standard output log
#SBATCH --error=hello_world.err         # Standard error log
#SBATCH --time=00:10:00                 # Time limit (hh:mm:ss)
#SBATCH --nodes=1                       # Run on 1 node
#SBATCH --ntasks=1                      # Run 1 task

echo "Starting counter job on $(hostname)..."

# Loop from 0 to 600
for i in {0..600}
do
    echo "Counter: $i"
    sleep 1
done

echo "Job finished successfully."
```

## Checkpoint

<figure><img src="https://3970289663-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2VUqakyWqaX9NCnQNYjD%2Fuploads%2Fgit-blob-ee7d138efacebe07d14fdff1da624d87ded28dfa%2Fslurm_checkpoint.png?alt=media" alt=""><figcaption></figcaption></figure>

To checkpoint a job in SLURM, navigate to the [SLURM Jobs Page](https://ui.cedana.com/slurm/jobs), select the job, and checkpoint it.

## Restore

<figure><img src="https://3970289663-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2VUqakyWqaX9NCnQNYjD%2Fuploads%2Fgit-blob-87b286298058ff1cac13130270a3a1050d2875f4%2Fslurm_restore.png?alt=media" alt=""><figcaption></figcaption></figure>

To restore a job in SLURM, navigate to the [SLURM Checkpoints Page](https://ui.cedana.com/slurm/checkpoints), select the checkpoint, and restore it.

{% hint style="warning" %}
Keep in mind that only no two of the same jobs can be restored at the same time.
{% endhint %}
