Solved

using rsync on linix

Posted on 2013-06-10
2
430 Views
Last Modified: 2013-06-18
hello there,
I currently use this command to sync my site with my backup server.
I removed some files and I am wondering if by using this the files in the backup server will be deleted too..

rsync -azrtlpog -e ssh /home/virtual/sites/site.com root@74.86.98.12:/backup/sites/
0
Comment
Question by:XK8ER
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 250 total points
ID: 39236902
No, they won't.

Deleting extraneous files from dest dirs must be forced by using one of the "--delete" options (see below).

By the way, the option "-a" already includes the options "-rtlpog" so there's no need to specify them explicitly.


      --del                            an alias for --delete-during
     --delete                       delete extraneous files from dest dirs
     --delete-before        receiver deletes before xfer, not during
     --delete-during        receiver deletes during the transfer
     --delete-delay          find deletions during, delete after
     --delete-after           receiver deletes after transfer, not during
0
 
LVL 29

Assisted Solution

by:serialband
serialband earned 250 total points
ID: 39242646
Here's the command to use.

rsync -az -e ssh --delete  /home/virtual/sites/site.com root@74.86.98.12:/backup/sites/ 

Open in new window

0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question