To run the backup script manually at anytime:
sudo ./rsync-shell.sh
in the folder below
The rsync script for this is in /home/markp/Documents/scripts: rsync-shell.sh
it creates a log file in /home/markp/Documents/backups
it backs up to an external e-sata hdd mounted at /external in fstab
it needs to be copied to /root so that it can run as a sudo cron jon
ensure chmod 744 so file is executable
in root, crontab -l lists all cron jobs; if no crontab exists yet create one with:
sudo crontab -e
then add:0 2 * * * /root/rsync-shell.sh
the five cron parameters above are:
minute (of the hour)
hour (of the day)
day (of the month)
month
day (of the week)
* = any value. So, the above job runs every day at 2.00 (am).
Issues: need to find a way of flagging when the cronjob doesn’t run, although the log reveals that. 2. need to find a way of bringing the PC out of suspend, now that I’m trying to be more power saving.
For 2. see here: https://www.dedoimedo.com/computers/wake-cron.html