[Wylug-help] Cron & anacron

Jim Jackson jj at franjam.org.uk
Wed Nov 23 20:20:49 GMT 2005




On Wed, 23 Nov 2005, RichardA wrote:

> Having finally accepted that I'm too lazy to back up manually, and that
> 700MB CDRs won't make much of a dent in 68GB of data,  I set up a mirror
> of /home on another machine, to be updated by rsync over ssh, with
> passwordless pgp keys. This works.
>
> Then I put the script in crontab to run at midnight each day. My PC is
> rarely running at midnight, but I thought anacron would pick up the task
> the first time I booted -- it doesn't seem to.

Yep I'm too lazy as well. I run debian and have altered the /etc/crontab
file to have this line......

@reboot         root    run-parts --report /etc/cron.reboot

and I put the script I want executing on boot in the /etc/cron.reboot
directory - which includes the backup stuff.

>
> Here are some details, in case they help, or I've made a dumb mistake
> (cetri is the client, dva is the server):
>
> ----------------------------------------------------
> root at cetri ~ # crontab -l
> * 0 * * * /home/richard/bin/rsync.sh
>
> root at cetri ~ # cat /home/richard/bin/rsync.sh
> rsync -avz --delete --exclude-from=/home/richard/bin/rsync.exclude
> /home/ dva:/shared/backup/cetri
>
> root at cetri ~ # cat /home/richard/bin/rsync.exclude
> # Firefox cache
> + Cache/
> - **/Cache/**
> # Thumbnails
> + .thumbnails/
> - **/.thumbnails/**
> # Trash
> + .Trash/
> - **/.Trash/**
> ----------------------------------------------------
>
> Does anacron automatically look at any due cron jobs, or does it have to
> be told about them? And does cron write to a log file?
>
> Thanks,
>
> Richard (out of his depth, but having fun)
>
> _______________________________________________
> Wylug-help mailing list
> Wylug-help at wylug.org.uk
> http://mailman.lug.org.uk/mailman/listinfo/wylug-help
>



More information about the Wylug-help mailing list