Common Commands

Common Commands

  • diff - Displays differences between two repository objects (files or directories)
  • list - List a directory stored in repository object.
  • restore - Restore a directory or file from a snapshot into the specified target path.

By default, the target path will be created by the restore command if it does not exist.

The source to be restored is specified in the form of a directory or file ID and optionally a sub-directory path.

For example, the following source and target arguments will restore the contents of the ‘kffbb7c28ea6c34d6cbe555d1cf80faa9’ directory into a new, local directory named ‘d1’

‘restore kffbb7c28ea6c34d6cbe555d1cf80faa9 d1’

Similarly, the following command will restore the contents of a subdirectory ‘subdir/subdir2’ under ‘kffbb7c28ea6c34d6cbe555d1cf80faa9’ into a new, local directory named ‘sd2’

‘restore kffbb7c28ea6c34d6cbe555d1cf80faa9/subdir1/subdir2 sd2’

When restoring to a target path that already has existing data, by default the restore will attempt to overwrite, unless one or more of the following flags has been set (to prevent overwrite of each type):

–no-overwrite-files –no-overwrite-directories –no-overwrite-symlinks

The restore will only attempt to overwrite an existing file system entry if it is the same type as in the source. For example a if restoring a symlink, an existing symlink with the same name will be overwritten, but a directory with the same name will not; an error will be thrown instead.

  • show - Displays contents of a repository object.
  • mount - Mount repository object as a local filesystem.

Commands to control HTTP API server.

Commands to manipulate snapshots.

  • snapshot copy-history - Performs a copy of the history of snapshots from another user or host. This command will copy snapshot manifests of the specified source to the respective destination. This is typically used when renaming a host, switching username or moving directory around to maintain snapshot history.

    Both source and destination can be specified using user@host, @host or user@host:/path where destination values override the corresponding parts of the source, so both targeted and mass copy is supported.

    Source: Destination Behavior

    @host1 @host2 copy snapshots from all users of host1 @host1 user2@host2 (disallowed as it would potentially collapse users) @host1 user2@host2:/path2 (disallowed as it would potentially collapse paths) user1@host1 @host2 copy all snapshots to user1@host2 user1@host1 user2@host2 copy all snapshots to user2@host2 user1@host1 user2@host2:/path2 (disallowed as it would potentially collapse paths) user1@host1:/path1 @host2 copy to user1@host2:/path1 user1@host1:/path1 user2@host2 copy to user2@host2:/path1 user1@host1:/path1 user2@host2:/path2 copy snapshots from single path.

  • snapshot move-history - Performs a move of the history of snapshots from another user or host. This command will move snapshot manifests of the specified source to the respective destination. This is typically used when renaming a host, switching username or moving directory around to maintain snapshot history.

    Both source and destination can be specified using user@host, @host or user@host:/path where destination values override the corresponding parts of the source, so both targeted and mass move is supported.

    Source: Destination Behavior

    @host1 @host2 move snapshots from all users of host1 @host1 user2@host2 (disallowed as it would potentially collapse users) @host1 user2@host2:/path2 (disallowed as it would potentially collapse paths) user1@host1 @host2 move all snapshots to user1@host2 user1@host1 user2@host2 move all snapshots to user2@host2 user1@host1 user2@host2:/path2 (disallowed as it would potentially collapse paths) user1@host1:/path1 @host2 move to user1@host2:/path1 user1@host1:/path1 user2@host2 move to user2@host2:/path1 user1@host1:/path1 user2@host2:/path2 move snapshots from single path.

  • snapshot create - Creates a snapshot of local directory or file.

  • snapshot delete - Explicitly delete a snapshot by providing a snapshot ID.

  • snapshot estimate - Estimate the snapshot size and upload time.

  • snapshot expire - Remove old snapshots according to defined expiration policies.

  • snapshot list - List snapshots of files and directories.

  • snapshot migrate - Migrate snapshots from another repository

  • snapshot restore - Restore a directory or file from a snapshot into the specified target path.

By default, the target path will be created by the restore command if it does not exist.

The source to be restored is specified in the form of a directory or file ID and optionally a sub-directory path.

For example, the following source and target arguments will restore the contents of the ‘kffbb7c28ea6c34d6cbe555d1cf80faa9’ directory into a new, local directory named ‘d1’

‘restore kffbb7c28ea6c34d6cbe555d1cf80faa9 d1’

Similarly, the following command will restore the contents of a subdirectory ‘subdir/subdir2’ under ‘kffbb7c28ea6c34d6cbe555d1cf80faa9’ into a new, local directory named ‘sd2’

‘restore kffbb7c28ea6c34d6cbe555d1cf80faa9/subdir1/subdir2 sd2’

When restoring to a target path that already has existing data, by default the restore will attempt to overwrite, unless one or more of the following flags has been set (to prevent overwrite of each type):

–no-overwrite-files –no-overwrite-directories –no-overwrite-symlinks

The restore will only attempt to overwrite an existing file system entry if it is the same type as in the source. For example a if restoring a symlink, an existing symlink with the same name will be overwritten, but a directory with the same name will not; an error will be thrown instead.

Commands to manipulate snapshotting policies.

  • policy edit - Set snapshot policy for a single directory, user@host or a global policy.
  • policy list - List policies.
  • policy delete - Remove snapshot policy for a single directory, user@host or a global policy.
  • policy set - Set snapshot policy for a single directory, user@host or a global policy.
  • policy show - Show snapshot policy.

Commands to manipulate repository.

Last modified January 1, 0001