2023-05-17 12:27:55 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2023-05-17 12:36:47 +00:00
|
|
|
case "$MODE" in
|
|
|
|
backup)
|
|
|
|
echo "Running first backup..."
|
2023-05-17 21:59:12 +00:00
|
|
|
/etc/periodic/daily/backup.sh
|
2023-05-17 12:36:47 +00:00
|
|
|
echo "Running cron for daily backups..."
|
2023-06-18 19:30:40 +00:00
|
|
|
crond -f -l 0
|
2023-06-18 19:32:31 +00:00
|
|
|
echo "Cron has exited."
|
2023-05-17 12:36:47 +00:00
|
|
|
;;
|
|
|
|
restore)
|
|
|
|
echo "Restoring from latest backup..."
|
2023-05-17 15:04:16 +00:00
|
|
|
/usr/lib/backup-duplicity/restore.sh
|
2023-06-18 19:32:31 +00:00
|
|
|
echo "Done."
|
2023-05-17 12:36:47 +00:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "No such mode." >> /dev/stderr
|
|
|
|
;;
|
|
|
|
esac
|