linux sync

16 Jul

Correct approach for this is to use rsync:

rsync -auv directoryA directoryB

Correct approach for this is to use rsync:

rsync -auv directoryA directoryB

Have a look at:

man rsync, and ensure that you totally understand the settings given:

a – archive
u – update only – do not overwrite newer files
v – verbose

Basically checks everything and updates if any file is older.

Next problem is that you are worried about using all the resources. You need to check resources being used:

top

If resources are getting short then you need to:

ps -ef

to find the process id of the rsync process, and then:

kill the process and then run the above program undeer nice:

nice 19 “rsync -auv directoryA directoryB”

This will run the rsync command with reduced priority. You can pick any number between -20 (highest priority) to 19 lowest priority.

Because the above command works as a synchronising process, you can do the process in bits. Do an hours run, kill the process, restart next evening etc, and it will incrementally do what you want:

HTH:)