crontab is obviously very useful, with two reservations.
Obviously, if the one of the machines is down, cron will not run. You could set up some mechanism to compensate for that (write a timestamp file, and check the file was created), but it would be a bother.
You could make the two machines run a job at the same time, but you would have to make sure the clocks are exactly the same. It's probably better to let one of them do it's think first, and then an hour or whatever later, let the other one. Or might be some way to do everything on one machine, and it runs a remote process on the other.
I want to take daily backup(11pm) of /var/www to /mnt/bak excluding /var/www/videos and /var/www/old. HOW to implement a rotating snapshot method, so that i can have multiple(say 4) automatically rotating backups. (0 Replies)
hello,
i need to modified my synch/back scripts....
i want that this script only syncro folders in destinationfolder.
f.e. when in destination are two folders
1) admin
2) users
but in SOURCE are three:
1) admin
2) users
3) antivirus
the script should only increnmential sync the... (0 Replies)
I've got a new MythTV box at home and figured it would be a great opportunity to use it to do daily mirrors of my mysqlbackup directory (let's say /mysqlbackup/backups) and my website at /usr/local/apache/htdocs and below.
I figured it would be a best practice NOT to use a root login but to... (0 Replies)
How do i use Rsync yo pickup only new or modified files from source?
I am using rsync -ravzpotu --delete-excluded but sometimes it goes thru all files again (5 Replies)
I'm using this script to backup an external hdd to another external hdd -
rsync -aE --delete --exclude Volumes/Disk\ A/.Trashes "/Volumes/Disk A" "/Volumes/Disk A Backup"The source drive being "Disk A", and the drive I wish to backup to being "Disk A Backup".
I'm constantly getting this error,... (4 Replies)
Hi Everyone,
we are running rsync with --backup mode, Are there any rsync options to remove backup folders on successful deployment?
Thanks in adv. (0 Replies)
Hello everybody
I'm triing since few days to do this. So sorry if my question looks stupide, but i've tried.
I have to get picture from a folder (who is updated automaticly and with subfolder) with theirs extensions (i'm ok on that) and this files have to me copied in a folder where a website... (7 Replies)
Hi,
I am trying to use rsync utility through ssh to synchronize some root files of 2 servers.
I have a rsyncusr user in each server. I configured ssh with no password. I set NOPASSWD in the /etc/sudoers file:
rsyncusr ALL= NOPASSWD:/usr/bin/rsync
In order to make rsync able to sudo and be... (2 Replies)
Hello All,
I am looking at a fast way to script some backups. I am looking at using rsync to do the leg work. I am having a hard time conceiving a script though.
I have a tree with subfolders within subfolders. I was looking at the /xd option to parse the tree.
Directory of k:\
... (4 Replies)
Discussion started by: jvamos
4 Replies
LEARN ABOUT OSX
cron
CRON(8) BSD System Manager's Manual CRON(8)NAME
cron -- daemon to execute scheduled commands (Vixie Cron)
SYNOPSIS
cron [-s] [-o] [-x debugflag[,...]]
DESCRIPTION
The cron utility is launched by launchd(8) when it sees the existence of /etc/crontab or files in /usr/lib/cron/tabs. There should be no
need to start it manually. See /System/Library/LaunchDaemons/com.vix.cron.plist for details.
The cron utility searches /usr/lib/cron/tabs for crontab files which are named after accounts in /etc/passwd; crontabs found are loaded into
memory. The cron utility also searches for /etc/crontab which is in a different format (see crontab(5)).
The cron utility then wakes up every minute, examining all stored crontabs, checking each command to see if it should be run in the current
minute. When executing commands, any output is mailed to the owner of the crontab (or to the user named in the MAILTO environment variable
in the crontab, if such exists).
Additionally, cron checks each minute to see if its spool directory's modification time (or the modification time on /etc/crontab) has
changed, and if it has, cron will then examine the modification time on all crontabs and reload those which have changed. Thus cron need not
be restarted whenever a crontab file is modified. Note that the crontab(1) command updates the modification time of the spool directory
whenever it changes a crontab.
Available options:
-s Enable special handling of situations when the GMT offset of the local timezone changes, such as the switches between the standard
time and daylight saving time.
The jobs run during the GMT offset changes time as intuitively expected. If a job falls into a time interval that disappears (for
example, during the switch from standard time) to daylight saving time or is duplicated (for example, during the reverse switch),
then it is handled in one of two ways:
The first case is for the jobs that run every at hour of a time interval overlapping with the disappearing or duplicated interval.
In other words, if the job had run within one hour before the GMT offset change (and cron was not restarted nor the crontab(5)
changed after that) or would run after the change at the next hour. They work as always, skip the skipped time or run in the added
time as usual.
The second case is for the jobs that run less frequently. They are executed exactly once, they are not skipped nor executed twice
(unless cron is restarted or the user's crontab(5) is changed during such a time interval). If an interval disappears due to the GMT
offset change, such jobs are executed at the same absolute point of time as they would be in the old time zone. For example, if
exactly one hour disappears, this point would be during the next hour at the first minute that is specified for them in crontab(5).
-o Disable the special handling of situations when the GMT offset of the local timezone changes, to be compatible with the old (default)
behavior. If both options -o and -s are specified, the option specified last wins.
-x debugflag[,...]
Enable writing of debugging information to standard output. One or more of the following comma separated debugflag identifiers must
be specified:
bit currently not used
ext make the other debug flags more verbose
load be verbose when loading crontab files
misc be verbose about miscellaneous one-off events
pars be verbose about parsing individual crontab lines
proc be verbose about the state of the process, including all of its offspring
sch be verbose when iterating through the scheduling algorithms
test trace through the execution, but do not perform any actions
FILES
/usr/lib/cron/tabs Directory for personal crontab files
SEE ALSO crontab(1), launchctl(1), crontab(5), launchd.plist(5), launchd(8)AUTHORS
Paul Vixie <paul@vix.com>
BSD June 17, 2007 BSD