Date: Sun, 12 Apr 2020 01:23:00 -0700 From: David Christensen <dpchrist@holgerdanske.com> To: freebsd-questions@freebsd.org Subject: Re: Restoring and snapshots Message-ID: <a3a8403b-f5ef-fbac-372e-2a807371cf8b@holgerdanske.com> In-Reply-To: <2a0ee11a-eb32-7ae2-256f-ad1b00d1e49d@netfence.it> References: <56b4e678-0e66-e65b-b9d2-a2e79a5b7b6f@netfence.it> <e8fb0530-917a-f259-9238-5306e63b89df@holgerdanske.com> <dbe79517-3d72-3af9-48df-129c7ec89bf7@netfence.it> <b80878d8-4a37-7f79-e94f-d3c44cb036bc@holgerdanske.com> <2a0ee11a-eb32-7ae2-256f-ad1b00d1e49d@netfence.it>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2020-04-11 22:19, Andrea Venturoli wrote: > On 2020-04-12 00:18, David Christensen wrote: >> I am confused: >> * What is the type of the filesystem that was the source of the backup? > ZFS in the example above, but I've got the same problem with UFS, as I > also use snapshot there. >> * What tool(s) did you use to backup? > Sometimes Bacula, sometimes some custom scripts. >> * What is the type of the filesystem that was the destination of the >> backup? > Could be UFS, bacula volumes, tapes, ZIPs, etc... >> * What tool(s) are you using to restore? > Again either Bacula or some custom scripts. >> * What is the type of the filesystem that is the destination of the >> restore? > Usually UFS or ZFS; could be something else. >> So, the backup source filesystem and the restore destination >> filesystems are both ZFS (?). > Possibly, but not always. >> The upper Unix filesystem path should be an empty directory. > Should, but not always is. > Sometimes I found "forgotten" files in the directory which is the target > of the nullfs mount. Of course those files are usually hidden and > probably useless, but must be taken into account. I would do the housekeeping -- unmount the filesystems that are overlaying the mount point directories containing forgotten files and move the forgotten files to wherever they belong, or delete them. There is nothing you can do about the copies that have already been snapshotted (other than destroying those snapshots). >> I believe it is a result of the 'mountpoint' properties of the two ZFS >> file systems and how ZFS represents filesystem snapshots in the Unix >> file system. > No, this can happen with UFS too. It sounds like you are using file- and directory-level backup tools for ZFS filesystems (?). I did that for a while and it works, but I knew I was doing it the wrong way. If you are using file- and directory-level backup tools to back up ZFS snapshots, that definitely sounds like you are barking up the wrong tree. That is what ZFS replication is for. Now I'm using ZFS snapshots and replication to backup ZFS filesystems to other ZFS pools. I still use rsync to backup non-ZFS filesystems, but the backup destinations are ZFS filesystems; which are fed into zfs-auto-snapshot and the rest of my backup processes. My tar/gzip archives are now sourced from ZFS snapshots rather than live filesystems. Life is good. :-) David
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a3a8403b-f5ef-fbac-372e-2a807371cf8b>