LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 08-23-2015, 01:08 PM   #1
edmundo_ba
Member
 
Registered: Jun 2004
Location: Buenos Aires
Distribution: kubuntu 20.04, Slackware64 14.2
Posts: 43

Rep: Reputation: 15
rsync --delete question


Hi everyone. I'm having a problem related to --delete option of rsync.

I want the files that don't exist anymore at the source to be deleted, but I want to keep a backup copy.

For this I run:
rsync -avz -b --backup-dir=/home/edg/br/b01 --delete Documents/ rsync://rsyncclient@192.168.0.50/documents
The backup dir is created, but then it is deleted, along with all the files that are supposed to be deleted, and rsync is also trying to delete a lot more.
This is the result I get:

sending incremental file list
Created backup_dir /home/edg/rb/b01/
deleting home/edg/rb/b01/
deleting home/edg/rb/
deleting home/edg/
deleting home/
./


sent 140 bytes received 114 bytes 101.60 bytes/sec
total size is 350,697 speedup is 1,380.70
Any suggestions on how to fix this?
 
Old 08-23-2015, 03:05 PM   #2
edmundo_ba
Member
 
Registered: Jun 2004
Location: Buenos Aires
Distribution: kubuntu 20.04, Slackware64 14.2
Posts: 43

Original Poster
Rep: Reputation: 15
I found my mistake, it's working now.

I thought the --backup-dir was the actual directory at the destination file system, but it's the path inside the module accessed by rsync.
 
  


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
rsync --delete not working shea1roh Linux - Software 8 08-10-2015 10:08 PM
rsync --delete question jms89 Linux - Software 4 02-11-2013 06:14 AM
rsync doesn't seem to delete cooks44 Linux - Software 10 11-21-2007 11:57 PM
rsync newbie --delete -b noir911 Linux - General 1 11-23-2006 12:21 AM
rsync --delete question Red Squirrel Linux - Software 2 10-10-2005 09:55 PM

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

All times are GMT -5. The time now is 12:37 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