Here is the script I'm using
#!/bin/bash
#backup
rsync -av --progress 192.168.3.20::BACKUP/word /media/nss/BACKUP/current
# backup rotation script
BACKUPBASE=/media/nss/BACKUP
BACKUPDIR=current
DATEDIR=`date +%Y-%m-%d-%a_%H-%M`
mkdir $BACKUPBASE/$DATEDIR
cp -Rl $BACKUPBASE/$BACKUPDIR/* $BACKUPBASE/$DATEDIR/
the rsync part is working fine but when it tried to make a new directory I'm getting the following
sent 1092 bytes received 5733 bytes 546.00 bytes/sec
total size is 5729690 speedup is 839.52
: command not found
: command not found
mkdir: cannot create directory `/media/nss/BACKUP\r/2005-12-07-Wed_10-46\r\r'😱 such file or directory
cp: cannot stat `/media/nss/BACKUP\r/current\r/*': No such file or directory
: command not found
server2:/usr/bin #
Where is the \r coming from?
Thanks.
#!/bin/bash
#backup
rsync -av --progress 192.168.3.20::BACKUP/word /media/nss/BACKUP/current
# backup rotation script
BACKUPBASE=/media/nss/BACKUP
BACKUPDIR=current
DATEDIR=`date +%Y-%m-%d-%a_%H-%M`
mkdir $BACKUPBASE/$DATEDIR
cp -Rl $BACKUPBASE/$BACKUPDIR/* $BACKUPBASE/$DATEDIR/
the rsync part is working fine but when it tried to make a new directory I'm getting the following
sent 1092 bytes received 5733 bytes 546.00 bytes/sec
total size is 5729690 speedup is 839.52
: command not found
: command not found
mkdir: cannot create directory `/media/nss/BACKUP\r/2005-12-07-Wed_10-46\r\r'😱 such file or directory
cp: cannot stat `/media/nss/BACKUP\r/current\r/*': No such file or directory
: command not found
server2:/usr/bin #
Where is the \r coming from?
Thanks.