From adf38fce9a1e361e5a3dc2437bb359936f167a4f Mon Sep 17 00:00:00 2001 From: julien Date: Sun, 19 Jan 2025 18:33:58 +0100 Subject: [PATCH] added cron task --- README.md | 11 ++++++++++- sbin/vol-backup | 1 - sync.sh | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 25b2d95..85f9aaf 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,14 @@ -# scripts +# srv-scripts Execute `sync.sh` to copy scripts on the server. +> > `vol-restore` is not yet finished ! + +## Cron + +Add this line into the host crontab with `crontab -e`. +``` +# Backup volumes every days at 4am +0 4 * * * /usr/local/bin/vol-backup-all +``` diff --git a/sbin/vol-backup b/sbin/vol-backup index 1acc8d6..9c48f68 100755 --- a/sbin/vol-backup +++ b/sbin/vol-backup @@ -40,5 +40,4 @@ if [ -d "volumes" ]; then rm volumes/$DUMP_NAME fi rm /tmp/$BACKUP - rm /tmp/sockets-to-exclude fi diff --git a/sync.sh b/sync.sh index 7fb65a7..7734a33 100755 --- a/sync.sh +++ b/sync.sh @@ -1,3 +1,3 @@ #!/bin/bash -cp sbin/* /usr/local/sbin +cp sbin/* /usr/local/bin