Rsync by cron spawning multitudes of processes

Status
Not open for further replies.

hazy

Cadet
Joined
Feb 25, 2012
Messages
3
Hi,

I've just installed a fresh Freenas 8.2 and thought I was nearing the end of initial setup, however, I have set up cron jobs to run half hourly local backups from three local drives to a fourth...

rsync_chron_jobs.jpg

The commands are executing but, unlike Freenas7, where a duplicate process would be knocked back by an existing one, I'm getting more and more processes running..

multiple_rsyncs.jpg

and the data is somehow building up and filling the 1TB disk..

Backup_overflow.jpg

Perhaps starting processes with cron isn't as smart as using the rsync sheduler?

However, my impression from using Freenas7 is that 'client' and 'server' would be separate machines.

I've created a module and rsyncd task to pull data from one drive to the other but I'm not getting any rsyncd processes.

It seems a shame, when the scheduling functionality is clearly present in freenas8, not to include a local drive to local drive rsync option like we had before.

Any pointers would be appreciated.

Cheers

Nigel
 

hazy

Cadet
Joined
Feb 25, 2012
Messages
3
Thanks for your swift response William.. I followed your link and hope it is the answer to my problem but I find the manual language a little difficult..

Quoting from the man page
========================================
DESCRIPTION
The lockf utility acquires an exclusive lock on a file

========================================

Does the above mean that using lockf should prevent my multiply spawned rsync processes by locking access to the folders currently being copied to?

Or is it the following part..?

========================================
If the lockf utility is being used to facilitate concurrency between a
number of processes, it is recommended that the -k option be used."
========================================

Initially this seemed more like what I need but then it's followed by..

========================================
"-k Causes the lock file to be kept (not removed) after the command completes."
========================================

Sorry for my lack of litaracy, I find it a lot easier if there are example commands but there aren't any on lockf. If you could simply add the appropriate lockf syntax to this simple command I would be very grateful..

rsync -av /mnt/work mnt/backup/

Thanks in advance
Nigel
 
Status
Not open for further replies.
Top