Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

rsync question...

Status
Not open for further replies.

Chapter11

Technical User
Apr 15, 2002
791
US
I have a script that calls rsync in the following way:

rsync -x -v -rlptgoD --delete-after --progress --exclude-from=/etc/rsync.exclude.list ${FS} rsync://(server)/(module)

The intent is to perform a backup of this machine via rsync. This is placed in a while-do-done loop to fill in the value of ${FS}

The problem I am having is that it seems to be doing a full re-copy of everything every time. For example, /usr/bin is dead static - on this machine, /usr doesn't change, but the logging I have on the server side indicates that every file in /usr/bin is being deleted and resynced every time the script is run.

How can I stop this? I went over the flag list, and it appears that the flags are in order.
 
What values are being submitted to the while loop?



--
Andy
"Historically speaking, the presence of wheels in Unix has never precluded their reinvention."
Larry Wall
 
The while loop loops through a list of filesystems, which are fed as ${FS}
 
don't us FS as your variable name. FS is shell's FieldSeparator builtin variable. You might be having a name conflict.

vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
vlad,
FS is a builtin variable in awk.
In shell, this is IFS.
 
the script is in ksh, and FS is not a reserved name. I've used it extensively as a variable in other scripts with no problems.
 
ooops - misread the post.
nevermind me.

vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top