mirror of
https://github.com/Steffo99/backup-duplicity.git
synced 2024-12-22 11:34:22 +00:00
19 lines
350 B
Bash
Executable file
19 lines
350 B
Bash
Executable file
#!/bin/sh
|
|
|
|
case "$MODE" in
|
|
backup)
|
|
echo "Running first backup..."
|
|
/etc/periodic/daily/backup.sh
|
|
echo "Running cron for daily backups..."
|
|
crond -f -l 0
|
|
echo "Cron has exited."
|
|
;;
|
|
restore)
|
|
echo "Restoring from latest backup..."
|
|
/usr/lib/backup-duplicity/restore.sh
|
|
echo "Done."
|
|
;;
|
|
*)
|
|
echo "No such mode." >> /dev/stderr
|
|
;;
|
|
esac
|