BernieO / calcardbackup

calcardbackup: moved to https://codeberg.org/BernieO/calcardbackup
GNU Affero General Public License v3.0
69 stars 5 forks source link

Setup calcardbackup for a daily CRON job #22

Closed rudi48 closed 5 years ago

rudi48 commented 5 years ago

Hello Bernhard, Thank you very much for your excellent bash script. I missed an example for running calcardbackup in a daily CRON job. Here it is: /!\ In case you want to start a CRON job with a different user, you need to set it up in the file /etc/crontab.

# add calcardbackup to a daily CRON job
$ sudo nano /etc/crontab
# add to the end of the file:
# calcardbackup at every day at 2 o'clock with user "www-data"
0 2 * * * www-data /home/<user>/calcardbackup/calcardbackup "/var/www/nextcloud" > /dev/nul
<empty line>

# check in the log for a run of the script
$ grep www-data /var/log/syslog
Jul 17 02:00:01 rudiswiki74 CRON[2215]: (www-data) CMD (/home/rudi/calcardbackup/calcardbackup "/var/www/nextcloud" > /dev/null)

Regards, Rudi

BernieO commented 5 years ago

Hi Rudi, good idea. I am away from home right now, but will take care of that when I come back home. Cheers BernieO

BernieO commented 5 years ago

I just added a section to both READMEs about setting up a cronjob in 0ae5273baf2c345e00caeb10cd07b9bfd08c3df0

Thanks again for the suggestion 👍