Help with command

Pfd27

New Member
Joined
Jan 27, 2021
Messages
8
Reaction score
0
Credits
65
I am trying to write a script to backup a folder to my server, but I'm making a error in the rsync command somewhere.

I'm able to do what I want in grsync, but when I use the command that grsync gives me I get a error.
The command I'm using is below

"rsync -r -t -v --progress -s /home/rob/.local/share/American Truck Simulator 192.168.1.61:/media/Spare/Lenny/test /"

The error I get is

"Unexpected remote arg: 192.168.1.61:/media/Spare/Lenny/test
rsync error: syntax or usage error (code 1) at main.c(1496) [sender=3.2.3]"

I'm thinking it has something to do with the spaces in the folder name, but I'm unable to figure it out.

Any help would be great
 


Hey, yes it's a name problem : the command take too much arguments.

Try this :
Code:
rsync -r -t -v --progress --protect-args -s "/home/rob/.local/share/American Truck Simulator" 192.168.1.61:/media/Spare/Lenny/test /
If I don’t make a mistake, it should works.
 
Thanks. I tried it and got this error
Unexpected remote arg: 192.168.1.61:/media/Spare/Lenny/test
rsync error: syntax or usage error (code 1) at main.c(1496) [sender=3.2.3]
 
I have tried adding the user and got the same error.
I have "rsync -r -t -v --progress --delete -s /home/rob/Stuff/ 192.168.1.61:/media/Storage/Lenny/Stuff/"
In the same script and this command works fine. Thats why I thought the problem was because of the spaces in the folder name
 
OK, let's try this :

Code:
rsync -r -t -v --progress -s '/home/rob/.local/share/American\ Truck\ Simulator' 192.168.1.61:/media/Spare/Lenny/test /
 
rob@lenny:~$ rsync -r -t -v --progress -s '/home/rob/.local/share/American\ Truck\ Simulator' 192.168.1.61:/media/Spare
/Lenny/test /
Unexpected remote arg: 192.168.1.61:/media/Spare/Lenny/test
rsync error: syntax or usage error (code 1) at main.c(1496) [sender=3.2.3]
 
The command is not supposed to work without an user with your IP if it's a remote host... and remove the space at the end, after "/test"
 
Strange. The command "rsync -r -t -v --progress --delete -s /home/rob/Stuff/ 192.168.1.61:/media/Storage/Lenny/Stuff/" Works fine in another script. I'll have to keep working on it. Thanks for your help
 
Does more than it has :)

rsync -r -t -v --progress -s /home/rob/.local/share/American Truck Simulator 192.168.1.61:/media/Spare/Lenny/test/
sending incremental file list
rsync: [sender] link_stat "/home/rob/.local/share/American" failed: No such file or directory (2)
rsync: [sender] link_stat "/home/rob/Truck" failed: No such file or directory (2)
rsync: [sender] link_stat "/home/rob/Simulator" failed: No such file or directory (2)

sent 18 bytes received 12 bytes 12.00 bytes/sec
total size is 0 speedup is 0.00
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1330) [sender=3.2.3]
 
OK. So try this ;) :
Code:
rsync -r -t -v --progress -s '/home/rob/.local/share/American\ Truck\ Simulator' 192.168.1.61:/media/Spare/Lenny/test
 
I just tried adding the backslashes seconds before you posted this. It's running the backup as I'm typing
 

Members online


Latest posts

Top