Restoring and snapshots
David Christensen
dpchrist at holgerdanske.com
Sun Apr 12 08:23:12 UTC 2020
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
More information about the freebsd-questions
mailing list