Skip to content

Cleanup service #16

@NicoHood

Description

@NicoHood

You know how difficult it is to delete multiple btrfs snapshots in different sub(!)directories. A cleanup service similar to snapper itself would be nice. You could set similar settings as snapper does for local configs, but not a time cleanup, more a number cleanup. Or you could provide a manual command to at least cleanup the backups easier.

# List all external backups
snap-sync -c home list

# Clean external backups x-y
snap-sync -c home clean 172-185

# Another idea would be to keep the last x backups
snap-sync -c home keep 3

The last option could be also used as systemd service (which should run after the backup). Depending on the setting you then have backups fr the last 3 weeks. Keeping every month is not possible like this because this might be way to complex to implement for now, but that is up to you.

The (default) setting or the number of backups to keep should be selectable in the snapper config itself, so you can keep more copies of home than root etc. Or you can completely disable the cleanup for critical snapper configs.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions