Results 1 to 4 of 4
I am trying to use RSYNC to copy files from one hard drive to another (as a sort of accessable backup). I have written the BASH "SH" script and also ...
- 02-08-2006 #1Just Joined!
- Join Date
- Feb 2006
- Posts
- 2
RSYNC Help
I am trying to use RSYNC to copy files from one hard drive to another (as a sort of accessable backup). I have written the BASH "SH" script and also configured CRONTAB. The files get copied accross just fine, however the folder name on the receiving side has a blank string suffix after it. Because of this suffix, i can not share the folder.
my Bash script is:
#=======================================
#!/bin/sh
echo "starting"
rsync -av /mnt/sda1/Folder/ /mnt/sdb1/Folder
echo "done"
#=======================================
Please help - Thank you
- 02-08-2006 #2Linux Enthusiast
- Join Date
- Jun 2005
- Posts
- 668
There doesnt look anything wrong with that
- 02-08-2006 #3
Can you clarify what you mean by a "blank string suffix"? Do you mean the target directory, instead of being called "Folder", is called "Folder "? I agree with kern, there appears to be nothing wrong with your script, and I've never come across the problem you're describing.
Anything unusual about your setup? Which distro/release you using? What happens when you manually do the rsync command - does it work?
One last thing, check your script very carefully. It's within the realm of possibility you've got an embedded space in the command that isn't being parsed properly by cron and it's adding it to the name. Try manually(and carefully) retyping the rsync line after being sure to completely delete the original line. Also, just for laughs, be sure you have a blank line with a carriage return at the end of the script. None of this will necessarily help, it's all just little things that might effect it depending on version of cron, rsync, etc.
DT
- 02-09-2006 #4Just Joined!
- Join Date
- Feb 2006
- Posts
- 2
Thank you
Thanks for the help. it works beautifully now. there was an extra line in the script which i just failed to see. Take it out and the thing works like a charm. thanks for the advise.


Reply With Quote
