Triton provides the ability to create point-in-time snapshots of an instance, using either the Triton CLI or the Triton cloud account portal. You can then download the snapshot to your local machine or another computer, to serve as a backup.
- This is not supported for kvm or bhyve instances.
- The space taken up by snapshots is counted towards the disk quota of the instance.
- When snapshots are initially created, they do not take up any space, but file system changes will increase the disk space used by the snapshot.
Creating a snapshot requires no downtime. Create your snapshot using either the Triton CLI or the Triton portal, as detailed below.
- If you have not installed and configured the Triton CLI tool, this documentation will help you to do so: https://docs.joyent.com/public-cloud/api-access/triton-cli
- After you have Triton CLI configured to manage your instances, create a snapshot with:
triton inst snapshot create [-n NAME] INST
- You can view the list of snapshots for an instance with:
triton inst snapshot list INST
- Log in to the Triton portal at: https://my.joyent.com
- Navigate to Compute > Instances, then select the name of the instance for which you would like to create a snapshot.
- On the Instance Details page, scroll down and expand the Snapshots section.
- Click on the Create Snapshot button, give it a name (if desired), then click Create to begin creating the snapshot.
Snapshots are mounted inside the
/checkpoints directory on the instance.
Create a tar.gz file of the snapshot
Note: Only perform this step if you are currently using less than 50% of the instance disk size in the
zones/INST_UUID file system:
- Please verify with
df -hbefore proceeding.
- If the disk usage condition is not met, you can skip this step and still download a copy of your snapshot using the “Transfer with scp/rsync” instructions below.
To complete this step:
- SSH into your instance and execute the following command to verify you’ll have enough disk space (see note above):
- Create the tar.gz file with:
tar zcvf /var/tmp/SNAPNAME.tar.gz /checkpoints/SNAPNAME
Once this step has been completed, proceed with “Transfer with scp/rsync” below.
Transfer with scp/rsync
From your local machine or another computer with the
rsync tool installed, download the snapshot with one of the following commands:
- If you created a tar.gz file, use this:
scp root@INST_IP:/var/tmp/SNAPNAME.tar.gz DEST
- If you’re copying directly from the /checkpoints directory:
rsync -avzP root@INST_IP:/checkpoints/SNAPNAME DEST
- If you created a tar.gz file, go ahead and delete the tar.gz file via SSH on the instance (after downloading your snapshot as described above):
- You can choose to either keep or delete the snapshot:
- If you keep the snapshot, you will be able to roll back to that point in time as needed, using Triton CLI or Triton portal. However, the size of the snapshot will continue to grow over time, consuming the available disk space of the instance.
- If you delete the snapshot, you will still have your backup, but will need to manually restore the data in case of an emergency. Snapshots should be deleted via the Triton portal or, as shown below, with Triton CLI:
triton inst snapshot delete -w INST SNAPNAME