Created
January 22, 2019 03:01
-
-
Save Seanmatthews/d19f07f18a3955d0caf4012da62c6c23 to your computer and use it in GitHub Desktop.
Ubuntu auto backups to router ftp server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curlftpfs#192.168.1.1 /media/backup fuse allow_other,rw,uid=1000,gid=1000,user,exec,auto,utf8,umask=002 0 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
machine 192.168.1.1 | |
login <router login> | |
password <router password> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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