Skip to content

Instantly share code, notes, and snippets.

@Seanmatthews
Created January 22, 2019 03:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Seanmatthews/d19f07f18a3955d0caf4012da62c6c23 to your computer and use it in GitHub Desktop.
Save Seanmatthews/d19f07f18a3955d0caf4012da62c6c23 to your computer and use it in GitHub Desktop.
Ubuntu auto backups to router ftp server
# crontab -e
# Backups at 5:15am every day
15 05 * * * /usr/local/bin/restic -r /media/backup/<dir>/<restic-repo> -p <pass> backup <dir to backup>;/usr/local/bin/restic -r /media/backup/<dir>/<restic-repo> -p <pass> prune
curlftpfs#192.168.1.1 /media/backup fuse allow_other,rw,uid=1000,gid=1000,user,exec,auto,utf8,umask=002 0 0
machine 192.168.1.1
login <router login>
password <router password>
# Init your repo
restic -r /media/backup/<dir>/<restic-repo> init
# Enter a password
# Do an initial backup before setting up cron, since the backup might take very long.
restic -r /media/backup/<dir>/<restic-repo> backup <dir to backup>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment