From 0f4e061b1e72b31c6b12154ae76b7e0010b21028 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Tue, 28 Nov 2023 16:35:44 +0100 Subject: [PATCH] Finish 'Automated Backups' in readme --- deployment/deployment.md | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/deployment/deployment.md b/deployment/deployment.md index 259dd2e3f..ebcc2f6ca 100644 --- a/deployment/deployment.md +++ b/deployment/deployment.md @@ -107,15 +107,27 @@ The backups will be saved into your networks folders `backup` folder in a new fo #### Automated Backups -XXX - ⚠️ *Attention: Please check carefully whether really the oldest backups have been deleted. As shells on different systems behave differently with regard to the commands used in this script.* +Install automated backups by a cron job. +Be aware of having the bash shell installed to run the script. +The environment variables for the automated backups are described above. + +Installing a cron job by editing the cron table file: + ```bash -# in deployment folder +# edit cron job table +$ crontab -e +``` + +In the editor add the line: + +```bash +# in cron job table file # set a cron job every night at 04am server time -$ crontab -e - -0 15 * * * scripts/clusters.backup-multiple-servers.sh +# min hour day month weekday command +00 04 * * * /root/Ocelot-Social/deployment/scripts/clusters.backup-multiple-servers.sh >> /root/Ocelot-Social/deployment/backup-cron-job.log ``` + +This way the terminal output is written into a log file named `backup-cron-job.log` located in the deployment folder.