Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a doc management app on shared CentOS server and docs from all clients/users are saved in one folder(not in public_html).

I backed all docs to a VPS box but now would like just to sync difference every hour or so from shared CentOS box to VPS.

How can I do that?

Thanx

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

Assumptions:

  1. VPS has OpenSSH installed
  2. You have configured password-less public key access to VPS from CentOS

On the CentOS system, create a crontab entry as root, similar to this:

0 * * * * rsync -avz -e ssh /path/to/docs vpsuser@vps:/destination/path

share|improve this answer
    
This works Ok. I had some issues with passwordless public key access to VPS but this works. Thank you. I have a subquestion. How can i sync deleted files on shared CentOS with VPS? –  mojeime Mar 4 '11 at 0:39
    
Are you wanting to remove files on the VPS that were removed from CentOS, or remove the files from CentOS after they are transferred to the VPS? –  JeffG Mar 4 '11 at 13:45
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.