diff --git a/README.md b/README.md index 6f8218b..79bf90c 100644 --- a/README.md +++ b/README.md @@ -140,17 +140,17 @@ Following tools are used: `dsnap-sync` is a shell script. Thus no compilation is required. To simplify correct target locations, this project uses a Makefile. - # make install + # make install If your system uses a non-default location for the snapper configuration defaults, specify the location with an environment variable (`SNAPPER_CONFIG`). - Arch Linux/Fedora/Gentoo: - # make SNAPPER_CONFIG=/etc/conf.d/snapper install + Arch Linux/Fedora/Gentoo: + # make SNAPPER_CONFIG=/etc/conf.d/snapper install - Debian/Ubuntu: - # make SNAPPER_CONFIG=/etc/default/snapper install + Debian/Ubuntu: + # make SNAPPER_CONFIG=/etc/default/snapper install The local `snapper` configuration will be extended to make use of a new template 'dsnap-sync'. @@ -172,41 +172,41 @@ Please use your host software package manager. ## Options - Usage: dsnap-sync [options] + Usage: dsnap-sync [options] - Options: - -a, --automount start automount for given path to get a valid target mountpoint. - -b, --backupdir backupdir is a relative path that will be appended to target backup-root - --backuptype Specify backup type - --batch no user interaction - -d, --description Change the snapper description. Default: "latest incremental backup" - --label-finished snapper description tagging successful jobs. Default: "dsnap-sync backup" - --label-running snapper description tagging active jobs. Default: "dsnap-sync in progress" - --label-synced snapper description tagging last synced jobs. - Default: "dsnap-sync last incremental" - --color Enable colored output messages - -c, --config Specify the snapper configuration to use. Otherwise will perform for each snapper - configuration. You can select multiple configurations - (e.g. -c "root" -c "home"; --config root --config home) - --config-postfix Specify a postfix that will be appended to the destination snapper config name. - --dry-run perform a trial run (no changes are written). - --mediapool Specify the name of the tape MediaPool - -n, --noconfirm Do not ask for confirmation for each configuration. Will still prompt for backup - --nonotify Disable graphical notification (via dbus) - --nopv Disable graphical progress output (disable pv) - --noionice Disable setting of I/O class and priority options on target - -r, --remote
Send the snapshot backup to a remote machine. The snapshot will be sent via ssh - You should specify the remote machine's hostname or ip address. The 'root' user - must be permitted to login on the remote machine - -p, --port The remote port - -s, --subvolid Specify the subvolume id of the mounted BTRFS subvolume to back up to. Defaults to 5. - --use-btrfs-quota use btrfs-quota to calculate snapshot size - -u, --uuid Specify the UUID of the mounted BTRFS subvolume to back up to. Otherwise will prompt - If multiple mount points are found with the same UUID, will prompt for user selection - -t, --target Specify the mountpoint of the backup device - --volumename Specify the name of the tape volume - -v, --verbose Be verbose on what's going on (min: --verbose=1, max: --verbose=3) - --version show program version + Options: + -a, --automount start automount for given path to get a valid target mountpoint. + -b, --backupdir backupdir is a relative path that will be appended to target backup-root + --backuptype Specify backup type + --batch no user interaction + -d, --description Change the snapper description. Default: "latest incremental backup" + --label-finished snapper description tagging successful jobs. Default: "dsnap-sync backup" + --label-running snapper description tagging active jobs. Default: "dsnap-sync in progress" + --label-synced snapper description tagging last synced jobs. + Default: "dsnap-sync last incremental" + --color Enable colored output messages + -c, --config Specify the snapper configuration to use. Otherwise will perform for each snapper + configuration. You can select multiple configurations + (e.g. -c "root" -c "home"; --config root --config home) + --config-postfix Specify a postfix that will be appended to the destination snapper config name. + --dry-run perform a trial run (no changes are written). + --mediapool Specify the name of the tape MediaPool + -n, --noconfirm Do not ask for confirmation for each configuration. Will still prompt for backup + --nonotify Disable graphical notification (via dbus) + --nopv Disable graphical progress output (disable pv) + --noionice Disable setting of I/O class and priority options on target + -r, --remote
Send the snapshot backup to a remote machine. The snapshot will be sent via ssh + You should specify the remote machine's hostname or ip address. The 'root' user + must be permitted to login on the remote machine + -p, --port The remote port + -s, --subvolid Specify the subvolume id of the mounted BTRFS subvolume to back up to. Defaults to 5. + --use-btrfs-quota use btrfs-quota to calculate snapshot size + -u, --uuid Specify the UUID of the mounted BTRFS subvolume to back up to. Otherwise will prompt + If multiple mount points are found with the same UUID, will prompt for user selection + -t, --target Specify the mountpoint of the backup device + --volumename Specify the name of the tape volume + -v, --verbose Be verbose on what's going on (min: --verbose=1, max: --verbose=3) + --version show program version ## First run @@ -259,7 +259,7 @@ backup types are differenciated: * create a config specific subdirectory (`archive-`) * create a snapshot-id subdirectory (``) * create the btrfs stream file inside the subdirectory - (`_[full | incremental].btrfs`) + (`_[full | incremental].btrfs`) * the proccess metadata are saved to a file called `info.xml` If you enabled the `ltfs` package, support for backups to tape is possible. @@ -304,6 +304,34 @@ FUSE). Read and write access can be managed using common OS tools. An open-source implementation can be found at [LinearTapeFileSystem](https://github.com/LinearTapeFileSystem/ltfs). +## Restore + +### From Tape + +When `dsnap-sync` did save the data with method `btrfs-archive`, you will find +the corresponding data in a snapper compatible directory structure on the tape. + +The structure may look like: + +└── backups + └── @ + ├── archive- + │   └── + │   ├── _full.btrfs + │   └── info.xml + +The file `info.xml` provide the metadata corresponding to the snapshot. +The data of the snapshot is stored in the file `_full.btrfs`. +This file has to be decrypted with btrfs tool `btrfs-send` to a btrfs +restore directory: + + cd /target_btrfs_path + cp /path_to_tape_root/backups/@/archive-/_full.btrfs . + cat _full.btrfs | btrfs receive -v . + rm _full.btrfs + +Please consult btrfs-send man-page for further info. + ## Contributing Help is very welcome! Feel free to fork and issue a pull request to add