User Tools

Site Tools


project:rsnapshot-zfs-helper:rsnapshot-backup-example

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
project:rsnapshot-zfs-helper:rsnapshot-backup-example [2018/02/22 18:12] 92.75.65.74project:rsnapshot-zfs-helper:rsnapshot-backup-example [2018/05/15 14:20] (current) – [Details] 94.217.236.160
Line 59: Line 59:
 rsnasphot-backup-enable <HOSTNAME> rsnasphot-backup-enable <HOSTNAME>
 </code> </code>
 +==== Details ====
 +
 +This is what ''rsnapshot-backup-conf'' takes care of:
 +
 +The template mechanism creates:
 +<code>
 +/etc/rsnapshot-backup.d/conf.<BACKUP-CLIENT>
 +/etc/rsnapshot-backup.d/exclude.<BACKUP-CLIENT>
 +/etc/rsnapshot-backup.d/script.<BACKUP-CLIENT>    # optional
 +/etc/rsnapshot-backup.d/enabled/conf.<BACKUP-CLIENT> -> ../conf.<BACKUP-CLIENT>
 +
 +/backup/hosts/<BACKUP-CLIENT>/daily.0/
 +/backup/hosts/<BACKUP-CLIENT>/zfs-snapshots -> daily.0/.zfs/snapshot
 +
 +/var/log/rsnapshot-backup/<BACKUP-CLIENT>/
 +
 +<ZPOOL>/backup/hosts/<BACKUP-CLIENT> # ZFS filesystem mounted on /backup/hosts/<BACKUP-CLIENT>/daily.0/
 +</code>
 +
 +The zfs filesystem dataset is created:
 +<code>
 +zfs create <ZPOOL>/backup/hosts/<BACKUP-CLIENT> -o compression=lz4 -o snapdir=hidden -o xattr=sa -o acltype=posixacl -o mountpoint=/backup/hosts/<BACKUP-CLIENT>/daily.0
 +</code>
 +
 +rsnapshot-zfs-helper is to be configured inside rsnapshot's configuration files. i.e. '''/etc/rsnapshot-backup.d/conf.<BACKUP-CLIENT>'''
 +
 +Additionally, '''cmd_cp''' has to be set to '''/bin/true''' - so the "cp -al ..." is rendered harmless:
 +
 +<code>
 +cmd_cp        /bin/true
 +cmd_preexec   /usr/sbin/rsnapshot-zfs-helper /etc/rsnapshot-backup.d/enabled/conf.<BACKUP-CLIENT> preexec
 +cmd_postexec  /usr/sbin/rsnapshot-zfs-helper /etc/rsnapshot-backup.d/enabled/conf.<BACKUP-CLIENT> postexec
 +</code>
 +
 +''rsnapshot-backup'' itself handles the promotion of the backup's rotation to the subsequent
 +rotation levels.
 +
  
  
project/rsnapshot-zfs-helper/rsnapshot-backup-example.1519319573.txt.gz · Last modified: 2018/02/22 18:12 by 92.75.65.74