All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
rsync error.. please help :(
Hello,
Can anyone help please.. i am using the following script.. but keep getting error message:
/usr/local/sbin/backup-cpanel.sh: line 5: fg: no job control
Unexpected local arg: /backup/current/
If arg is a remote file/dir, prefix it with a colon (:).
rsync error: syntax or usage error (code 1) at main.c(1215) [receiver=3.0.6]
^C
**here is the code:
**
!/bin/bash
/bin/mail -s "Server backup started" "[email protected]"
BACKUPDIR='date %A';
nice rsync root@ip:/backup/cpbackup/daily/ /backup/current --progress --force --ignore-errors --delete-excluded \ --delete --backup --backup-dir=/backup/$BACKUPDIR \ -avs --recursive
/bin/mail -s "Server backup completed" "[email protected]"
Comments
@joshuah can't see the problem but the code is mangled so might be missing something...try formatting the script as code and use the comment preview function to check it looks right...
Put the source and destinations at the end and see if it helps
nice rsync --progress --force --ignore-errors --delete-excluded \ --delete --backup --backup-dir=/backup/$BACKUPDIR \ -avs --recursive root@ip:/backup/cpbackup/daily/ /backup/current
Also, -a has --recursive in it already, --delete-excluded is useless without a list of excluded files.
Setting of BACKUPDIR looks very wrong - should be backquotes (vanilla formatting?) and have a plus sign in front of the percent sign.
Since I can't get backquotes to show up right, going with another way:
$() should ALWAYS be used instead of backticks.
Also, yes the date is the issue.
You're right but uppercasing it gives it more importance than it deserves
@zen ?