Skip to content

zbackup: Not possible to omit a single nested filesystem #18

@jefft

Description

@jefft

Hi,

With zbackup, it appears to not be possible to backup all filesystems except for a particular one.

Say I have a set of ZFS filesystems:

tank
tank/home
tank/data
tank/var/cache

I'd like to zbackup everything except for 'tank/var/cache'.

Here are my attempts. I have the following zbackup properties:

# zbackup -l
tank daily-snapshots=6 weekly-snapshots=5 replica=backuphost:extbackup replicate=daily

To exclude tank/var/cache, I figured I should unset 'replica' and 'replicate' properties:

# zbackup --unset tank/var/cache replica replicate
zfs inherit com.github.tesujimath.zbackup:replica tank/var/cache
zfs inherit com.github.tesujimath.zbackup:replicate tank/var/cache

But of course that has no effect, because the properties were inherited to begin with.

Let's try setting to a bogus value of 'none':

# zbackup --set tank/var/cache replica=none replicate=none
tank daily-snapshots=6 weekly-snapshots=5 replica=backuphost:extbackup replicate=daily
tank/var/cache replica=none replicate=none

# zbackup -v daily
tank replica=backuphost:extbackup local
tank replicate=daily local
tank daily-snapshots=6 local
tank/var/cache replica=none local
tank/var/cache replicate=none local
========== zsnap -k 6 -p auto-daily- -v tank ==========
.....

No luck, tank/var/cache is still backed up. This is because zbackup's backup_or_reap_snapshots function only considers the 'replica' property of the root ('tank').

I imagine 'fixing' this would be a major endeavour, as it would require making 'zreplicate' aware of ZFS properties (to notice that 'replica' differs halfway down the tree). If so, perhaps this should just be considered a 'known limitation' of an otherwise nicely done tool.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions