doguibnu
(Douglas)
October 30, 2020, 7:27pm
1
I am trying to do a remote backup with script:
find /path/*.gz -exec rm {} \; && tar -czpvf $BACKUP_DIR/bdsomething-$DATE.tar.gz --exclude='this-file' /source/path && rsync -avhz --progress --delete /path-dir-backup root@10.x.x.x:/path-remote-server
and give me error:
rsync error: syntax or usage error (code 1) at main.c(1637) [Receiver=3.1.0]
./script_bkp.sh: line 9: --delete: command not found
I Have the same kind of script but without –exlude in other script and it works nice and it is in crontab
where wrong syntax? or usage? I do not understand.
Please somebody can help me?
Thank you
Douglas
justin
(Justin DiRose)
October 30, 2020, 7:48pm
2
Hi there - are you trying to perform a Discourse backup this way? You can run a Discourse backup from the command line.
Backup discourse from the command line
3 Likes
pfaffman
(Jay Pfaffman)
October 31, 2020, 2:09pm
3
My guess is that the error you describe is because you have the delete at the start of a new line and the previous line is not ending with a backslash.
But it’s not clear what your are trying to do.
doguibnu
(Douglas)
October 31, 2020, 2:50pm
4
Hello @pfaffman
I did use --delete to delete what not “new” at the path-remote-server. I did try without --delete but returns that I can not use or syntax or usage error about --progress parameter. I try other forms but not work!
Thanks
doguibnu
(Douglas)
October 31, 2020, 2:53pm
5
Hello @justin
I am sorry I not found where can I post there!
Thank you!