What is wrong with my rsync backup sh script?
The following is a shell script (backup.sh)
rsync -abr --files-from='backup.txt' --delete --stats --progress --exclude={/home/rob} --log-file=/var/log/backup.log /home/ root@remote:/home/
I created the above as root. The backup.txt is 4 lines of simple path (/home/linda/ etc..)
I edited crontab to run monday through friday beginning at a certain time.
I can run the script manually and it works fine.
When I leave it to run on it's own and I come back and look at the log, it shows 2 errors:
rsync: failed to open files-from file backup.txt: No such file or directory
rsync error: syntax or usage error (code 1) at main.c(1453) [client=3.0.9]
What am I doing wrong or forgetting?
The following is a shell script (backup.sh)
rsync -abr --files-from='backup.txt' --delete --stats --progress --exclude={/home/rob} --log-file=/var/log/backup.log /home/ root@remote:/home/
I created the above as root. The backup.txt is 4 lines of simple path (/home/linda/ etc..)
I edited crontab to run monday through friday beginning at a certain time.
I can run the script manually and it works fine.
When I leave it to run on it's own and I come back and look at the log, it shows 2 errors:
rsync: failed to open files-from file backup.txt: No such file or directory
rsync error: syntax or usage error (code 1) at main.c(1453) [client=3.0.9]
What am I doing wrong or forgetting?
No comments:
Post a Comment