Managing Snapshots
Snapshots provide site administrators a way to create convenient backups of data from any portion of their site.
Any authenticated user can create a snapshot, with Sharing permission on each source path. The update, finalize, and delete commands below require a Site Administrator, as do listing or viewing snapshot records. The creator can still read the copied files without those management permissions.
Create a Snapshot
Snapshots can accept multiple paths, so you can repeat the --paths flag for each path after the first. Specifying a folder for the path will include the contents of the folder.
files-cli snapshots create --paths="path1" --expires-at="2030-11-02T11:59:00-04:00" --name="reason for snapshot"
Choose a future expiration appropriate for your retention needs; the date above is an example.
Update a Snapshot
To add more paths to a snapshot after it has been created, but before it has been finalized, you can use the --paths flag when updating the snapshot. You don't need to repeat any paths that were already added to the snapshot.
files-cli snapshots update --id=23452 --name="new name" --paths="another/path"
Finalize a Snapshot
Finalizing a snapshot immediately prevents new changes to its files, including adding new paths or removing items from its directory. A copy or move already transferring into it finishes and adds its file. For a complete archive at finalization, confirm that transfers have finished before running this command.
files-cli snapshots finalize --id=23452
Delete a Snapshot
Deleting a snapshot will immediately remove the files stored in the snapshot. You cannot un-delete a deleted snapshot.
files-cli snapshots delete --id=23452