LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-09-2011, 09:19 AM   #1
gabriel01
LQ Newbie
 
Registered: Feb 2011
Posts: 6

Rep: Reputation: 0
rsync - Remote to local


Hey guys,

this method works fine to sync file, dir from remote to local server.

but, how can i also sync for any deletion that was made on the remote server? Thanks.

rsync -rvtpc -e ssh root@192.168.30.141:/root/data/* /var/backup
 
Old 03-09-2011, 09:21 AM   #2
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,237

Rep: Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653
Quote:
Originally Posted by gabriel01 View Post
Hey guys,

this method works fine to sync file, dir from remote to local server.

but, how can i also sync for any deletion that was made on the remote server? Thanks.

rsync -rvtpc -e ssh root@192.168.30.141:/root/data/* /var/backup
Code:
rsync -rvtpc --delete -e ssh root@192.168.30.141:/root/data/* /var/backup
Probably want to use the options:

Code:
-varhc
Instead

Last edited by szboardstretcher; 03-09-2011 at 09:23 AM.
 
1 members found this post helpful.
Old 03-09-2011, 09:38 AM   #3
gabriel01
LQ Newbie
 
Registered: Feb 2011
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by szboardstretcher View Post
Code:
rsync -rvtpc --delete -e ssh root@192.168.30.141:/root/data/* /var/backup
Probably want to use the options:

Code:
-varhc
Instead
Your a champ! Thanks heaps.
 
Old 03-09-2011, 09:40 AM   #4
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,237

Rep: Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653
Quote:
Originally Posted by gabriel01 View Post
Your a champ! Thanks heaps.
Welcome.

Also, if you want to see a readable progress of what is going on, you can add:

Code:
--progress
to the beginning. I find that useful sometimes.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Trying to rsync from remote to local dooley28 Linux - Software 1 09-23-2010 02:03 AM
rsync local web folder to remote web folder? Almost working... Ultrus Linux - General 2 03-25-2009 03:49 PM
shell script to compare filese b/w local and remote and delete files from local serve dsids Linux - Networking 9 08-23-2006 08:20 AM
Complicated one: MySQL, rsync, remote machine, local machine daiver Linux - General 2 02-27-2006 01:14 PM
Remote Mounting? (Mount remote folder on local filesystem) mac_phil Linux - Networking 1 11-15-2003 04:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:44 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration