LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-03-2007, 08:07 AM   #1
carlosinfl
Senior Member
 
Registered: May 2004
Location: Orlando, FL
Distribution: Arch
Posts: 2,905

Rep: Reputation: 77
RSYCN Help


I am trying to sync two servers on my LAN as a backup and was wondering if I am running the correct command. The production server is "server-1" and the backup server I am copying everything to is "server-2".

I basically just want any changes made on server-1 to be copied to server-2 including if a file is removed / changed from server-1, it should mirror to server-2.

Is this command correct to be ran from "server-1"?

Code:
rsync -ave ssh --stats --delete-after /share/ctia/share/ root@10.1.1.29:/ctia/LT2FS1
 
Old 12-03-2007, 11:18 AM   #2
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
It should probably be run as root, so you won't need the root@.
Code:
/usr/bin/rsync -ave ssh --stats --delete-after /path/to/directory server-2:/path/to
Don't know where you want it to end up on server-2, but if the command is putting things in the right place, then your command is fine. If it isn't try to use what I've written to help you figure it out.

HTH

Forrest
 
Old 12-04-2007, 01:14 PM   #3
carlosinfl
Senior Member
 
Registered: May 2004
Location: Orlando, FL
Distribution: Arch
Posts: 2,905

Original Poster
Rep: Reputation: 77
Yes,

my command is placing the items in the right place so all looks well. I made a new file in server-1 and ran RSYCN and it shows up on server-2. I then remove it from server-1 and next time I run the command, it is no longer on server-2. Exactly what I want.

Now my only question is if there is a difference in the command --delete-after and --delete?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration