Solved

using rsync on linix

Posted on 2013-06-10
2
400 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
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 28

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

Free camera licenses with purchase of My Cloud NAS

Milestone Arcus software is compatible with thousands of industry-leading cameras for added flexibility. Upon installation on your My Cloud NAS, you will receive two (2) camera licenses already enabled in the software. And for a limited time, get additional camera licenses FREE.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Oracle 12c patching 1 59
Remove a very long string from all files in Linux 6 83
nagios remote hosts 9 42
Backup & Restore 3 46
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

948 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now