Skip to content

A very basic tool for taking, moving and restoring snap apps backups.

Notifications You must be signed in to change notification settings

sbe-arg/snap-backups

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

snap-backups

A very basic tool for taking, moving and restoring snap apps backups.

# backup
./snap-backup.sh --apps app1,app2,app2 --dest /some/location/folder
# restore
./snap-restore.sh --app appname --source /some/location/of.zip

NOTE: Some snaps run as services, they will be stopped when the backup is taken. They will be started again when the restore is done. This is done to ensure the backup is consistent. But it may cause some downtime.

If snap saved appname finds more than 1 snapshot. It will try to grab the latest one but might behave unexpectedly. Do your due diligence and cleanup your environment using snap saved, snap forget commands.

disclaimer

You are running this at your own risk. I am not responsible for any data loss or any other issues that may arise from using this tool. It needs to run as sudo because by default /var/lib/snapd/snapshots/ is armored and because stopping and starting services on snaps requires it. Make sure you understand what you are doing before running this.

I have personally been running this to backup my nextcloud snap both to an external drive and over an automount remote network drive for a while as cron root, and it has been working fine for me. But I can't guarantee it will work for you.

If you run this as normal user it will ask for sudo password several times when needed. On each start,stop,save,export,import operation.

About

A very basic tool for taking, moving and restoring snap apps backups.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Languages