project:rsnapshot-zfs-helper
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
project:rsnapshot-zfs-helper [2018/01/24 13:34] – [what's happening] 88.65.214.4 | project:rsnapshot-zfs-helper [2021/06/17 00:18] (current) – 37.49.32.145 | ||
---|---|---|---|
Line 17: | Line 17: | ||
As zfs uses copy-on-write there is no need to somehow emulate this with ''' | As zfs uses copy-on-write there is no need to somehow emulate this with ''' | ||
- | ===== how ===== | + | ===== example for rsnapshot ====== |
- | rsnapshot-zfs-helper | + | [[project:rsnapshot-zfs-helper:rsnapshot-example|Example for using rsnapshot-zfs-helper with rsnapshot]] |
- | Additionally, | + | ===== example for rsnapshot-backup ====== |
+ | [[project: | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ==== Example for creating a zpool: ==== | ||
< | < | ||
- | cmd_cp | + | ## |
- | cmd_preexec | + | ## setup zfs (optional) |
- | cmd_postexec | + | ## |
+ | # ' | ||
+ | apt-get install linux-image-amd64 | ||
+ | apt-get clean | ||
+ | reboot | ||
+ | |||
+ | - add " | ||
+ | apt-get update | ||
+ | apt-get install zfs-dkms zfsutils-linux | ||
+ | apt-get clean | ||
+ | |||
+ | /sbin/modprobe zfs | ||
+ | |||
+ | ## caveat: this example (a single disk partition) is neither redundant nor exceptionally performant | ||
+ | ## and serves for illustration purpose only! | ||
+ | ## create partition for zfs: | ||
+ | Device | ||
+ | ... | ||
+ | /dev/sda3 | ||
+ | |||
+ | ## create zpool without mount point | ||
+ | zpool create zp-bak | ||
+ | |||
+ | # create prereq. datasets | ||
+ | zfs create zp-bak/backup | ||
+ | zfs create zp-bak/backup/hosts -o compression=lz4 -o snapdir=hidden -o xattr=sa -o acltype=posixacl -o mountpoint=/backup/ | ||
+ | df | ||
+ | -> | ||
+ | Filesystem | ||
+ | ... | ||
+ | zp-bak/backup | ||
+ | zp-bak/backup/hosts 99041152 | ||
</ | </ | ||
- | Create a zfs dataset | + | ## if you use rsnapshot you have to add the commands commands below |
+ | ## if you use rsnapshot-backups the tool rsnapshot-backup-conf will handle those for you | ||
+ | Create a zfs dataset | ||
< | < | ||
- | zfs create < | + | zfs create < |
+ | # e.g. | ||
+ | zfs create zp-bak/ | ||
</ | </ | ||
Line 39: | Line 81: | ||
50 23 * * 5 root / | 50 23 * * 5 root / | ||
55 23 1 * * root / | 55 23 1 * * root / | ||
- | </ | + | </ |
===== how it works ===== | ===== how it works ===== | ||
Line 55: | Line 97: | ||
* But why then use UTC? **A:** I would have preferred to use ISO-8601 with timezone notation. But zfs does not accept ' | * But why then use UTC? **A:** I would have preferred to use ISO-8601 with timezone notation. But zfs does not accept ' | ||
* What's the deal with ''' | * What's the deal with ''' | ||
+ | * Why is the .zfs subdir hidden (''' | ||
+ | * Where can I download rsnapshot-zfs-helper? | ||
project/rsnapshot-zfs-helper.1516797268.txt.gz · Last modified: 2018/01/24 13:34 by 88.65.214.4