0

I have a task to create a passive sync between a production server and a staging server which are located in two different geographical locations.

The environment is fully Linux based (CentOS/RHEL) and the size of the data to be synced is about 1.5GB per day and only once per day.

The method I chose is rsync.

The source directory to sync resides on a CentOS database server called 'pg4' which has a NFS mounted share to another server in the same LAN, let's refer to this other server as 'mass1'.

My idea was to create a cron job of rsync on 'mass1' and to push the files from there to the target server around the globe on a line which is capable for the task.

The DBA which gave me this task insists that the rsync cron job should be configured straight on the database server 'pg4' rather than on the server where the data is but the one which holds the mount to the folder to sync.

My question is:

Will rsync copy the data first to the 'pg4' server and then to the target server if I configure the cron job there? or will it do the rsync straight from the 'mass1' server?

I would think that logically, configuring the cron job on 'mass1' server would be the right way to do it, what do you think?

Thanks in advance

1 Answer 1

2

What I understand is your situation:

Data is on pg4 and should go to server remote. You have the directory with the data mounted via NFS on mass1.

This is what will happen:

  • If you run the rsync on mass1, e.g. rsync -av /mnt/pg4/data user@remote:/data, the data will be copied per NFS to mass1 and then copied to remote via rsync.
  • If you run the rsync on pg4 directly to remote, eg. with rsync -av /data user@remote:/data, it will not be copied to another server but to remote directly.
  • rsync can't copy with both ends being remote, so rsync -av user@pg4:/data user@remote:/data on mass1 won't work.
2
  • Thanks for your answer. My idea was to run on mass1 rsync -av local_path user@remote:/date but your second point answers my question. Will any of the methods affect the speed of the transfer?
    – Itai Ganot
    Jan 21, 2015 at 14:05
  • @ItaiGanot Depending on your infrastructure NFS speed will most likely rank in the 100Mbit speed range. Your upload speed will probably rank in the low 10Mbit speed range. Chances are your upload speed is such a major bottleneck compared to the local copying that you won't notice much difference on a 1,5GB sync.
    – Reaces
    Jan 21, 2015 at 14:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .