LinuxQuestions.org
Review your favorite Linux distribution.
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 12-04-2003, 12:10 PM   #1
Phaethar
Member
 
Registered: Oct 2003
Location: MN
Distribution: CentOS, Fedora
Posts: 182

Rep: Reputation: 30
Rsync for incremental backups?


I'm looking to find a way to get rsync to only do incremental backups of files. We have a fileserver, which in turns is running a script that continually runs rsync to back up files. However, rsync is copying every file every time. Some of these files are huge, and during our testing none of them were changed. I would like to know if there is a method to get rsync to compare files before copying somehow, rather than just copy each and every file. I've looked through the arguments for the rsync app and didn't see anything that would work. Right now, I believe the script is running it as:

rsync -uaqzrpg

It's copying everything to the right place, it's just doing it over and over again, overwriting the same files each time. Anyone have any ideas?

Thanks.
 
Old 12-04-2003, 12:52 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Re: Rsync for incremental backups?

Quote:
Originally posted by Phaethar
would work. Right now, I believe the script is running it as:

rsync -uaqzrpg

It's copying everything to the right place, it's just doing it over and over again, overwriting the same files each time. Anyone have any ideas?
Hi ....

Firstly, using -a makes -rpg unnecessary.
Secondly, -u actually should only copy
modified files.
Thirdly, to check whether there are problems
you should temporarily remove -q.

That said, I've seen a similar problem in
a rsync backup where the target filesystem
didn't support linux permissions and attributes.

Where are you copying to?


Cheers,
Tink
 
Old 12-04-2003, 01:12 PM   #3
iainr
Member
 
Registered: Nov 2002
Location: England
Distribution: Ubuntu 9.04
Posts: 631

Rep: Reputation: 30
rsync -ave ssh <LOCAL_DIR> <REMOTE_HOST>:<REMOTE_DIR> works fine for me.
 
Old 12-04-2003, 01:27 PM   #4
Phaethar
Member
 
Registered: Oct 2003
Location: MN
Distribution: CentOS, Fedora
Posts: 182

Original Poster
Rep: Reputation: 30
Thanks for the replies.

Quote:
Where are you copying to?
I'm actually copying to another Fedora machine, so I don't think this is the problem.

Thanks for the tip about the arguments, I'll give it a shot without the -rpg to see if it helps any. As for the -q, I'm only using that to cut down on some of the text that shows up. Running it from terminal via python produces the same text over and over again ('file not found' when the folder is empty for instance), so I wanted to keep that to a minimum. Even before I did that though, I didn't see any errors. It just keeps copying all the files over each time.

Iainr, does that setup you're using do incremental backups, or is that doing everything each time it runs? I thought the -u argument was needed for incremental.

Edit: Couple things to add. First, it seems it's not copying every file over each time. It is however copying the same group of files over each time. I don't know how it's choosing the files it's moving, but there are still quite a few that are copied each time. It doesn't matter if I use the -u or not either.. it always seems to only do certain files, even though none of them have been changed.

Second, it appears I'm not the only one having the problem. A quick check at http://samba.anu.edu.au/rsync/ shows that this is in the FAQ, and that people are still experiencing this issue, and have been for a long time. Unfortunately, it seems that nobody have found a way to get it to copy only modified files yet.

Last edited by Phaethar; 12-04-2003 at 03:03 PM.
 
  


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 incremental backup sachin_keluskar Linux - Software 1 06-29-2005 02:09 AM
rsync and cp -al for staggered backups babyphil Linux - Software 2 06-14-2005 12:24 AM
Are incremental backups possible/safe? imagirlgeek Linux - Newbie 4 08-25-2004 04:11 PM
incremental & differential backups to CD? SheldonPlankton Linux - General 0 06-30-2004 05:33 PM
Incremental tar backups Pepe Linux - General 5 03-18-2002 03:31 AM

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

All times are GMT -5. The time now is 06:11 AM.

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