I am trying to setup automated backups for my root ZFS pool. Currently I am just trying to get it working by manually running the commands. On my root ZFS pool I have the following datasets:
In preparation for the backups I did the following:
I changed the mountpoint so that I can access all my snapshots in /zbackups/dailysnapshots.
I then took the first full backup as follows:
I then run the first incremental backup:
At this point all is great and I don't receive any errors. Except one. I can't see var, usr and tmp mounted in zstore/dailysnapshots. So I thought ok, I'll mount those with
Now I can see everything as I want it in zstore/dailysnapshots and I can see my snapshots in the .zfs/snapshots directory for the relevant dataset.
But when I try to run the next incremental backup with:
Why is it saying zstore/dailysnapshots/tmp has been modified when is hasn't? FYI: I have atime turned OFF on all pools/datasets.
Code:
zroot /
zroot/tmp /tmp
zroot/usr /usr
zroot/usr/home /usr/home
zroot/usr/ports /usr/ports
zroot/usr/ports/distfiles /usr/ports/distfiles
zroot/usr/ports/packages /usr/ports/packages
zroot/var /var
zroot/var/crash /var/crash
zroot/var/db /var/db
zroot/var/db/pkg /var/db/pkg
zroot/var/empty /var/empty
zroot/var/log /var/log
zroot/var/mail /var/mail
zroot/var/run /var/run
zroot/var/tmp /var/tmp
In preparation for the backups I did the following:
Code:
zfs create zstore/dailysnapshots
zfs set mountpoint=/dailysnapshots zstore/dailysnapshots
I changed the mountpoint so that I can access all my snapshots in /zbackups/dailysnapshots.
I then took the first full backup as follows:
zfs snapshot -r zroot@YESTERDAY zfs send -R zroot@YESTERDAY | zfs receive -Fduv zstore/dailysnapshotsI then run the first incremental backup:
zfs snapshot -r zroot@TODAY zfs send -R -i zroot@YESTERDAY zroot@TODAY | zfs receive -duv zstore/dailysnapshotsAt this point all is great and I don't receive any errors. Except one. I can't see var, usr and tmp mounted in zstore/dailysnapshots. So I thought ok, I'll mount those with
zfs mount -a. Now I can see var, usr and tmp in /zbackups/var, /zbackups/usr and /zbackups/tmp respectively. This isn't mounted in the correct location so I run: zfs set mountpoint=/dailysnapshots/tmp zstore/dailysnapshots/tmp
zfs set mountpoint=/dailysnapshots/var zstore/dailysnapshots/var
zfs set mountpoint=/dailysnapshots/usr zstore/dailysnapshots/usrNow I can see everything as I want it in zstore/dailysnapshots and I can see my snapshots in the .zfs/snapshots directory for the relevant dataset.
But when I try to run the next incremental backup with:
zfs send -R -i zroot@TODAY zroot@TOMORROW | zfs receive -duv zstore/dailysnapshots I get:
Code:
receiving incremental stream of zroot@TOM into zstore/dailysnapshots@TOM
received 312B stream in 1 seconds (312B/sec)
receiving incremental stream of zroot/usr@TOM into zstore/dailysnapshots/usr@TOM
received 312B stream in 1 seconds (312B/sec)
receiving incremental stream of zroot/usr/ports@TOM into zstore/dailysnapshots/usr/ports@TOM
received 312B stream in 1 seconds (312B/sec)
receiving incremental stream of zroot/usr/ports/packages@TOM into zstore/dailysnapshots/usr/ports/packages@TOM
received 312B stream in 1 seconds (312B/sec)
receiving incremental stream of zroot/usr/ports/distfiles@TOM into zstore/dailysnapshots/usr/ports/distfiles@TOM
received 312B stream in 1 seconds (312B/sec)
receiving incremental stream of zroot/usr/home@TOM into zstore/dailysnapshots/usr/home@TOM
received 312B stream in 1 seconds (312B/sec)
receiving incremental stream of zroot/tmp@TOM into zstore/dailysnapshots/tmp@TOM
cannot receive incremental stream: destination zstore/dailysnapshots/tmp has been modified
since most recent snapshot
warning: cannot send 'zroot/var/log@TOM': Broken pipe
Why is it saying zstore/dailysnapshots/tmp has been modified when is hasn't? FYI: I have atime turned OFF on all pools/datasets.