tarballed
June 26th, 2003, 18:44
Hello everyone.

Ok, im trying to setup a rsync job to backup some data on a machine.

Basically, I have a Linux server that has two windows shares mounted to it so I can perform nightly backups of the windows shares.

However, i'd like to run a rsync job during the day so I can grab a quick snapshot of the data incase one of my users messes something up (which happens more than it should...)

I have a partition called /backupstorage/D/. Underneath D there are about 16 directories, 8 of which i'd like to have rsync backup.

So I've read the man pages and have done a few tests. What i've found is that I can use include or excludes and put it into a file for rsync to query.

however, every time I point rsync to the file, it either backups nothing or backups everything. It does not exclude what i've specified in the file.

However, if I do a test rsync run on the command line and put in all my excludes, it works fine.

Anyone have any idea on what im doing wrong?

Here is a quick snip of the command im running:

rsync -av --exclude=declines/ --exclude=DSI/ /backupstorage/D/ /backupstorage/rsyncbackup

That works great. Its when i put data into a file and have rsync point to it is where it does not work:

rsync -av --exclude-from=exclude.conf /backupstorage/D/ /backupstorage/rsyncbackup

Anyone have any input or thoughts?

Thanks..

Tarballed

frisco
June 26th, 2003, 19:49
What are the contents of exclude.conf? I believe it should look like this:
[code:1:b2389699fd]declines
DSI
[/code:1:b2389699fd]

|MiNi0n|
June 26th, 2003, 20:23
aurora# cat /etc/backup_exclude
Tunez/
apps/
Maildir/

See here for more:

http://www.screamingelectron.org/phpBB2/viewtopic.php?t=101

tarballed
June 26th, 2003, 21:42
Very nice MiNiOn...

I did figure out my problem though. Doing further research, rsync by default grabs everything. DOH!

So what I did was alter my exclude file to just ignore the directories I do not want to backup. I made a few changes to the file, specifically, I edited the directories in exclude like so:

/<directory/

I did a dry run and now it works very nicely.
However, I am working on a script that will run a snap shot of this data and push it over to a different server. :)

I will read that link though, it looks good.

Thanks guys.

Tarballed