Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 05-24-2003, 04:53 PM   #1
LQ Newbie
Registered: May 2003
Posts: 2

Rep: Reputation: 0
rsync question

I found a problem with my backups. This is what i have the rysnc command doing for my backups

rsync -r --delete --ignore-existing --exclude-from=/root/exlcudes-v -v --progress --compress /mnt/* /backup1/web1/

I run my backups every wednesday. They have been running fine so i thought. The problem that i saw is that i was no backup up current modifications to my documents.

Example: /home/jason.txt was created 4/15/2003 and was 1MB. Backups ran lets say 4/22/2003 I modified /home/jason.txt 4/20/2003 and was now 3mb. It didn't copy or overwrite the current backup i had in my /backup1/web1 directory. It was as if it just looked to see if there was a jason.txt file and then proceed to look for the next file, not looking at teh size or anything to that nautre. I was looking at the rsync man pages. Maybe i should put this line in my coding also i just wanted ot get your thoghts.

Man Pages
--size-only only use file size when determining if a file should be transferred


-u, --update update only (don't overwrite newer files)

i tired the -u and it didn't update the files.

any help or suggestions would be greatful on this.

Old 05-24-2003, 05:15 PM   #2
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
Try removing "--ignore-existing".
Old 05-24-2003, 05:20 PM   #3
LQ Newbie
Registered: May 2003
Location: Italy
Distribution: Debian
Posts: 1

Rep: Reputation: 0
From man page rsync(1)

This tells rsync not to update files that already
exist on the destination.
Old 05-25-2003, 12:56 AM   #4
LQ Newbie
Registered: May 2003
Posts: 2

Original Poster
Rep: Reputation: 0
--ignore existing.

I took that out and it worked fine thanks. Though now i guess when i run my backups it will be a full backup? I kind of wanted the first time i run a backup to be a full then incrementals after so if i deleted something from my local computer /home it would delete from my backup. It looks like when i take out the --ignore existing

Could i just do a

rsync -r --delete --ignore-existing --size-only --exclude-from=/root/excludes -v -v --progress --compress /mnt/* /backup1/web1/

May i am just reading the man pages wrong. To much sitting behind the computer for 12 hours.
Old 05-25-2003, 10:24 AM   #5
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
The rsync command I use for my work's Intranet is:

rsync -e ssh -arz --delete /home/httpd root@other.server:/home
I run that with a cron job every hour. If I delete the destination (ie the very first time I ran it and once after a full redesign) it takes about 5 - 10 mins but under normay use it takes about 10 seconds (obviously depending on how much has changed)


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 question Red Squirrel Linux - Software 2 10-10-2005 10:55 PM
rsync question kpachopoulos Linux - General 3 07-15-2005 04:33 PM
Question about rsync bgriesi Linux - Networking 4 12-31-2004 09:19 AM
rsync error AND/OR dump question Sinope Linux - General 4 08-26-2004 06:57 PM
Another Rsync question phatboyz Linux - Networking 2 07-02-2004 09:46 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:03 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration