?
Solved

using rsync on linix

Posted on 2013-06-10
2
Medium Priority
?
470 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 1000 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 30

Assisted Solution

by:serialband
serialband earned 1000 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
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.
Suggested Courses

649 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