pub(crate) fn backup<S: IndexedIds>(
repo: &Repository<S>,
opts: &BackupOptions,
source: &PathList,
snap: SnapshotFile,
) -> RusticResult<SnapshotFile>Expand description
Backup data, create a snapshot.
§Type Parameters
S- The type of the indexed tree.
§Arguments
repo- The repository to useopts- The backup optionssource- The source to backupsnap- The snapshot with raw information
§Errors
- If sending the message to the raw packer fails.
- If converting the data length to u64 fails
- If sending the message to the raw packer fails.
- If the index file could not be serialized.
- If the time is not in the range of
Local::now()
§Returns
The snapshot pointing to the backup’ed data.