From 9f8f017b0a03a6c1d162df1fe01503610445709b Mon Sep 17 00:00:00 2001 From: Arvin Schnell Date: Mon, 11 Nov 2024 14:02:14 +0100 Subject: [PATCH] - update man-pages --- manpages/snapper-backup-configs.html | 166 +++++++++++ manpages/snapper.html | 10 + manpages/snbk.html | 406 +++++++++++++++++++++++++++ 3 files changed, 582 insertions(+) create mode 100644 manpages/snapper-backup-configs.html create mode 100644 manpages/snbk.html diff --git a/manpages/snapper-backup-configs.html b/manpages/snapper-backup-configs.html new file mode 100644 index 00000000..5572a42d --- /dev/null +++ b/manpages/snapper-backup-configs.html @@ -0,0 +1,166 @@ + + + + + + snapper-backup-configs + + + +
+ +
+
+

Name

+

snapper-backup-configs — Configuration files for snapper backup configs

+
+
+ +

DESCRIPTION

+

Each file /etc/snapper/backup-configs/*.json describes a + snapper backup config.

+

The file uses JSON syntax containing a single object with + key-value pairs.

+
+
+ +

KEY VALUE PAIRS

+

The following is a list of keys that can be present in the + configuration file.

+
+
+
+ + config + +
+
+

Name of the snapper config.

+
+
+ + target-mode + +
+
+

Either local or ssh-push.

+
+
+ + source-path + +
+
+

Path of the subvolume or mount point.

+
+
+ + target-path + +
+
+

Path of the subvolume or mount point.

+
+
+ + automatic + +
+
+

Boolean for enabling automatic transfer and delete + for the backup config using a systemd timer service.

+
+
+ + ssh-host + +
+
+

Name of the target host. Required for target mode + ssh-push.

+
+
+ + ssh-port + +
+
+

Port of the target host. Optional for target mode + ssh-push.

+
+
+ + ssh-user + +
+
+

User on the target host. Optional for target mode + ssh-push.

+
+
+ + ssh-identity + +
+
+

An ssh-identity to access the host without requiring a + password or passphrase. Optional for target mode ssh-push.

+
+
+
+
+
+ +

EXAMPLES

+

An example backup config for local backups: +

+
+{
+    "config": "root",
+    "target-mode": "local",
+    "automatic": true,
+    "source-path": "/",
+    "target-path": "/backups/root"
+}
+    
+

+

+

An example backup config for remote backups via ssh-push: +

+
+{
+    "config": "root",
+    "target-mode": "ssh-push",
+    "automatic": false,
+    "source-path": "/",
+    "target-path": "/backups/eberich/root",
+    "ssh-host": "backups.example.com",
+    "ssh-identity": "/etc/snapper/certs/id_ecdsa"
+}
+    
+

+

+
+
+ +

HOMEPAGE

+

+ http://snapper.io/ +

+
+
+ +

AUTHORS

+

Arvin Schnell

+
+
+ +

SEE ALSO

+

+ snbk(8), + snapper(8) +

+
+
+ + diff --git a/manpages/snapper.html b/manpages/snapper.html index 9f5b8e11..c861f26d 100644 --- a/manpages/snapper.html +++ b/manpages/snapper.html @@ -596,6 +596,15 @@

COMMANDS

Create a snapshot from the snapshot with the provided number instead of snapshot 0.

+
+ + --empty + +
+
+

Create an empty snapshot. Only supported on + btrfs and with --no-dbus.

+
@@ -1194,6 +1203,7 @@

SEE ALSO

snapper-configs(5), snapper-zypp-plugin(8), + snbk(8), pam_snapper(8), btrfs(8), lvm(8), diff --git a/manpages/snbk.html b/manpages/snbk.html new file mode 100644 index 00000000..fe4f0cdf --- /dev/null +++ b/manpages/snbk.html @@ -0,0 +1,406 @@ + + + + + + snbk + + + +

+ +
+
+

Name

+

snbk — Command-line program to backup snapshots of snapper

+
+
+ +

Synopsis

+
+

snbk [--global-opts] command [command-arguments]

+
+
+

snbk {--help}

+
+
+
+ +

DESCRIPTION

+

Snbk is a command-line program to backup snapshot of snapper. It can + transfer and delete backup snapshots on local and remote btrfs filesystems.

+
+
+ +

CONCEPTS

+
+ +

Backup Configurations

+

For each snapper config there can be several backup + configs. Each backup config defines backups of the snapper snapshots at + one location, either local or remote, see + snapper-backup-configs(5) + for possible settings.

+
+
+ +

Snapshot Statuses

+

Each snapshot has a status on the source and on the + target. Possible values for the source are:

+
+
+
+ (empty) +
+
+

The snapshot is missing and thus considered obsolete + on the target. It will be deleted on the target by the next delete + command.

+
+
+ read-only +
+
+

The snapshot is read-only.

+
+
+ read-write +
+
+

The snapshot is read-write and thus cannot be backed-up.

+
+
+
+

Possible values for the target are:

+
+
+
+ (empty) +
+
+

The snapshot is missing. If the source snapshot is + read-only it will be transferred to the target by the + next transfer command.

+
+
+ valid +
+
+

The snapshot is valid. That implies it is read-only.

+
+
+ invalid +
+
+

The snapshot is invalid. Either the received UUID is + wrong or it is read-write. That can happen if the transfer + was interrupted. The next transfer command will try to + transfer the snapshot again.

+
+
+
+
+
+
+ +

GLOBAL OPTIONS

+
+
+
+ + -q, --quiet + +
+
+

Suppress normal output. Error messages will still be printed, though.

+
+
+ + -v, --verbose + +
+
+

Increase verbosity.

+
+
+ + --debug + +
+
+

Turn on debugging.

+
+
+ + --utc + +
+
+

Display dates and times in UTC. By default, local time is used.

+
+
+ + --iso + +
+
+

Display dates and times in ISO format. ISO format is always used for machine-readable + outputs.

+
+
+ + -t, --table-style style + +
+
+

Specifies table style. Table style is identified by an integer number.

+
+
+ + --machine-readable format + +
+
+

Specifies a machine-readable output format. Possible options are csv and json.

+
+
+ + --csvout + +
+
+

Sets CSV output format. See + RFC 4180 + for the details, except lines end with a LF, not CR+LF.

+
+
+ + --jsonout + +
+
+

Sets JSON output format.

+
+
+ + --separator character + +
+
+

Specifies the character separator for CSV output format.

+
+
+ + --no-headers + +
+
+

Suppress headers for CSV output format.

+
+
+ + -b, --backup-config name + +
+
+

Use specified configuration instead of all configurations.

+
+
+ + --no-dbus + +
+
+

Operate without a DBus connection.

+

Use with caution.

+
+
+ + --target-mode name + +
+
+

Only operate on backup configs with the specified target mode.

+
+
+ + --automatic + +
+
+

Only operate on backup configs which have the + automatic flag set.

+
+
+ + --version + +
+
+

Print version and exit.

+
+
+
+
+
+ +

COMMANDS

+

Snbk provides a number of commands. Each + command accepts the options listed in the GLOBAL OPTIONS section. These options + must be specified before the command name. In + addition, many commands have specific arguments, which are listed in + this section. These command-specific arguments must be specified + after the name of the command.

+
+
+
+ + help + +
+
+

Show short help text.

+
+
+ + list-configs + +
+
+

List available configurations.

+
+
+ + list (ls) + +
+
+

List snapshots.

+
+
+ + transfer [number] + +
+
+

Transfer all missing snapshots or the specified + snapshot to the target.

+
+
+ + delete (remove|rm) [number] + +
+
+

Delete all obsolete snapshots or the specified + snapshot from the target.

+
+
+ + transfer-and-delete + +
+
+

Combines transfer and delete.

+
+
+
+
+
+ +

RESTORE

+

So far a restore has to be done manually. There are several + methods to do a restore, e.g. the backup can be mounted and then + copied or rsync can be used. Here we provide an example on how to use + btrfs send and receive to restore a snapshot on the source + system. In general using btrfs send and receive is a bit + tricky.

+

When using target-mode local: +

+
+# mkdir /.snapshots/42
+# cp /backups/root/42/info.xml /.snapshots/42/
+# btrfs send /backups/root/42/snapshot | btrfs receive /.snapshots/42
+      
+

+ When using target-mode ssh-push: +

+
+# mkdir /.snapshots/42
+# scp backups.example.com:/backups/eberich/root/42/info.xml /.snapshots/42
+# ssh backups.example.com btrfs send /backups/eberich/root/42/snapshot | btrfs receive /.snapshots/42
+      
+

+

+

If the system was reinstalled it is unfortunately in general + not possibly to simply use the restored snapshot as the new default + snapshot since some files, e.g. /etc/fstab, likely need + modifications. Also unfortunately for other subvolumes than root a + rollback is not supported.

+

If there are snapshots on the source to speed up the + operation you can also use the -p option for btrfs send.

+
+
+ +

NOTES

+

The content of snapshots transferred must not be changed on + the source system. Normally this is ensured since the snapshots are + read-only. But it is possible to change snapshots to read-write. This + can cause error during transfers in the future.

+
+
+ +

PERMISSIONS

+

Since the target-mode ssh-push needs root permissions on the + target it is recommended to use a dedicated machine or container + as a target.

+
+
+ +

FILES

+
+
+
+ + /etc/snapper/backup-configs + +
+
+

Directory containing configuration files.

+
+
+
+
+
+ +

EXIT STATUS

+

Normally the exit status is 0. If an error occurred the exit + status is 1.

+
+
+ +

HOMEPAGE

+

+ http://snapper.io/ +

+
+
+ +

AUTHORS

+

Arvin Schnell

+
+
+ +

SEE ALSO

+

+ snapper-backup-configs(5), + snapper(8), + btrfs-send(8), + btrfs-receive(8) + rsync(1), + sshfs(1) +

+
+
+ +