From 2dccc325cf0cbc9960e7787375bd2d1ddbf0edcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Claus-Peter=20H=C3=BCbner?= Date: Tue, 10 Jan 2023 01:13:16 +0100 Subject: [PATCH 1/2] add description for daily backup cronjob --- deployment/bare_metal/setup.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/deployment/bare_metal/setup.md b/deployment/bare_metal/setup.md index 5892cf4fc..fe87f9d81 100644 --- a/deployment/bare_metal/setup.md +++ b/deployment/bare_metal/setup.md @@ -231,3 +231,32 @@ This opens the `crontab` in edit-mode and insert the following entry: ```bash 0 4 * * * find /tmp -name "yarn--*" -ctime +1 -exec rm -r {} \; > /dev/null ``` + +## Define Cronjob To start backup script automatically + +At least at production stage we need a daily backup of our database. This can be done by adding a cronjob +to start the existing backup.sh script. + +### On production + +To check for existing cronjobs for the `gradido` user, please + +Run: + +```bash +crontab -l +``` + +This show all existing entries of the crontab for user `gradido` + +To install/add the cronjob for a daily backup at 3:00am please + +Run: + +```bash +crontab -e +``` +and insert the following line +```bash +* 3 * * * ~/gradido/deployment/bare_metal/backup.sh +``` From 74ffb8872ae4d64134c57e4c60dfd15b2061897b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Claus-Peter=20H=C3=BCbner?= Date: Tue, 10 Jan 2023 01:21:31 +0100 Subject: [PATCH 2/2] correct the docu --- deployment/bare_metal/setup.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deployment/bare_metal/setup.md b/deployment/bare_metal/setup.md index fe87f9d81..627aa4a2d 100644 --- a/deployment/bare_metal/setup.md +++ b/deployment/bare_metal/setup.md @@ -237,7 +237,7 @@ This opens the `crontab` in edit-mode and insert the following entry: At least at production stage we need a daily backup of our database. This can be done by adding a cronjob to start the existing backup.sh script. -### On production +### On production / stage3 / stage2 To check for existing cronjobs for the `gradido` user, please @@ -258,5 +258,5 @@ crontab -e ``` and insert the following line ```bash -* 3 * * * ~/gradido/deployment/bare_metal/backup.sh +0 3 * * * ~/gradido/deployment/bare_metal/backup.sh ```