LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 05-24-2003, 03:53 PM   #1
falco365
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

or

-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, 04:15 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

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

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

--ignore-existing
This tells rsync not to update files that already
exist on the destination.
Bye
 
Old 05-24-2003, 11:56 PM   #4
falco365
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, 09:24 AM   #5
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

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

Code:
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)
 
  


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


All times are GMT -5. The time now is 08:48 PM.

Main Menu
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