diff --git a/backup.bash b/backup.bash new file mode 100644 index 0000000..854b4a7 --- /dev/null +++ b/backup.bash @@ -0,0 +1,21 @@ +#!/bin/bash + +# Another OpenWrt bash script + +# Run backups via restic + +bkpwd="yourbackuppasswordhere" # We are gonna need that + +export RESTIC_PASSWORD="$bkpwd" + +# resticbasecmd = "restic -r sftp:restic@192.168.1.113:/home/restic backup" # root ssh key must be setup to access the remote target +# OpenWrt uses dropbear so use dropbear's key gen + +# Two dirs I want to keep backed up + +restic -r sftp:restic@192.168.1.113:/home/restic backup /etc +restic -r sftp:restic@192.168.1.113:/home/restic backup /opt/scripts +restic -r sftp:restic@192.168.1.113:/home/restic backup /root +vnstat -i eth1.2 --exportdb > /tmp/vnstat.db +restic -r sftp:restic@192.168.1.113:/home/restic backup /tmp/vnstat.db +rm /tmp/vnstat.db \ No newline at end of file