openSUSE / snapper

Manage filesystem snapshots and allow undo of system modifications
http://snapper.io/
GNU General Public License v2.0
888 stars 125 forks source link

Incremental backups #368

Open dag opened 6 years ago

dag commented 6 years ago

So I realize snapper isn't meant to be a backup tool, but there's a lot of overlap and it already has a bunch of infrastructure in place that would be needed for such a tool. I've been looking at existing solutions for btrfs incremental backups and I keep thinking it would be much easier if I could just do it with snapper, which I already know and have already set up. Would you consider supporting a few features to make it easier to use snapper also for backups? I'm imagining something like this (straw man proposal):

# create a new backup snapshot
# (optionally set --userdata backedup=no explicitly)
snapper create -c backup

# find the most recent backup on DEST,
# and iteratively send all the more recent backups using btrfs send -p
# then mark any sent snapshots with --userdata backedup=yes
snapper send-backups DEST

# variant that works over SSH
# figures out most recent backup based on backedup userdata
snapper send-backups | snapper receive-backups DEST

# delete any backedup=yes backups exceeding BACKUP_LIMIT_BACKEDUP,
# but always preserve the most recently backed up snapshot
# since it is needed for the next send-backups
# also delete any backedup=no backups exceeding BACKUP_LIMIT
snapper cleanup backup
NicoHood commented 6 years ago

Try this: https://github.com/wesbarnett/snap-sync

rzerres commented 6 years ago

Or this: proposed to merge with snap-sync. Thus reached a working status to handle remote snapper ... https://github.com/rzerres/snap-sync/wip-dash-v2

rickysarraf commented 5 years ago

A backup command in snapper is desirable. snapper has the ability to, if set proper privileges, not require root privileges. That is an important feature. And having all functionalities together in a single tool would be more appropriate.

jwillikers commented 3 years ago

I have to agree with @rickysarraf that it would be great to have users be able to backup snapshots without requiring root privileges using Snapper.

marccollin commented 1 year ago

+1 be able to save backup elsewhere is crucial

real-user commented 9 months ago

I also would like to give my +1 to this. Projects such as https://github.com/baod-rate/snap-sync seem to be abandoned and most recommendations points to btrbk. But it feels a bit unnecessary to use both Snapper AND btrbk as the projects overlap quite a bit.

From an outsider looking in Snapper seems to have everything except the ability to send snapshots to other disks.

Heavygrass commented 1 month ago

+1 I'd like to request snapshot sync to other drives also (e.g. automatic send/receive). I tried snap-sync - it is clearly abandoned and does NOT work at all (encountered multiple issues). Without a possibility to sync/backup snapshots to other drives, if a drive fails - all data is gone. Thank you!