LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 05-09-2013, 09:48 PM   #1
andy713
Member
 
Registered: Sep 2009
Location: Louisiana
Distribution: Slackware64-14
Posts: 38

Rep: Reputation: 0
Rsync backups and delete


My system has two drives, one system and one for backups. I got to test my backups this week when my system drive died. The good news is I'm back on current again, and I had all my files. And more. I'd been using rsync in a cron job with the --archive --backup --suffix=~`date +%Y%m%d` options, so after restoring getting rid of the prior versions was easy enough. But as it turns out, what doesn't happen is when a file is moved or deleted the destination copy isn't tagged with the suffix. Now I have to redelete them, which doesn't sound bad until you get to the maildirs. Any ideas on how I can solve this problem going forward, keeping my current scheme relatively intact?

Andy
 
Old 05-10-2013, 07:52 AM   #2
qweasd
Member
 
Registered: May 2010
Posts: 484

Rep: Reputation: Disabled
This is not a Slackware question.

Looks like you are screwed, since you lost information. If you wanted to restore like that, you could have used --delete (or --delete-excluded if your exclusion list keeps changing). As it stands, you have polluted the "backup". It's not really backup, what you are doing, you know? At no point do you have an option of rolling back to any particular date in the past. If you want backup, you need to rsync with --delete or into an empty dir, checksum that baby, and freeze it forever. What you are doing is a "dirty mirror" of sorts.
 
Old 05-10-2013, 04:56 PM   #3
granth
Member
 
Registered: Jul 2004
Location: USA
Distribution: Slackware64
Posts: 210

Rep: Reputation: 50
You should take a look at rsnapshot. It uses rsync to create incremental backups, which is a much better approach.
 
Old 05-10-2013, 06:02 PM   #4
AlvaroG
Member
 
Registered: Jul 2009
Location: Canelones, Uruguay
Distribution: Slackware
Posts: 128

Rep: Reputation: 31
Quote:
Originally Posted by andy713 View Post
My system has two drives, one system and one for backups. I got to test my backups this week when my system drive died. The good news is I'm back on current again, and I had all my files. And more. I'd been using rsync in a cron job with the --archive --backup --suffix=~`date +%Y%m%d` options, so after restoring getting rid of the prior versions was easy enough. But as it turns out, what doesn't happen is when a file is moved or deleted the destination copy isn't tagged with the suffix. Now I have to redelete them, which doesn't sound bad until you get to the maildirs. Any ideas on how I can solve this problem going forward, keeping my current scheme relatively intact?

Andy
I got the same issue with rsync, I had the --delete in place, but somehow the mirror I was creating was still having deleted files. I re-created the copy from scratch, and it has been behaving correctly since then.
Quote:
Originally Posted by granth View Post
You should take a look at rsnapshot. It uses rsync to create incremental backups, which is a much better approach.
+1 to rsnapshot. Incremental + rotating backups with a simple command, and based on rsync.
 
Old 05-10-2013, 07:32 PM   #5
GazL
Senior Member
 
Registered: May 2008
Posts: 3,503

Rep: Reputation: 1025Reputation: 1025Reputation: 1025Reputation: 1025Reputation: 1025Reputation: 1025Reputation: 1025Reputation: 1025
I use gnu/tar's listed-incremental mode myself.
 
  


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
[SOLVED] rsync Backups d072330 Linux - Software 11 01-30-2013 07:09 PM
rsync - Backups pkraus109 Linux - Server 2 05-21-2009 01:36 PM
Rsync backups gabsik Linux - General 3 11-24-2006 08:14 PM
Rsync Errors during backups shawnbishop Linux - Software 4 05-18-2006 04:26 AM
Rsync backups gabsik Linux - Networking 1 03-30-2006 11:31 AM


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