Skip to main content

backup

Function backup 

Source
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 use
  • opts - The backup options
  • source - The source to backup
  • snap - 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.