LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-04-2017, 11:29 AM   #1
Robert.Thompson
Member
 
Registered: Nov 2009
Location: Montreal, Quebec, Canada
Distribution: LinuxMint 20 Cinnamon
Posts: 589

Rep: Reputation: 49
Having trouble with rsync command - can you help?


Hello:

I am getting this error:
Code:
Unexpected remote arg: root@205.xxx.xx.xx:/*
rsync error: syntax or usage error (code 1) at main.c(1201) [sender=3.0.6]
after running:
Code:
rsync -auHxvz -e “ssh –p 20022” --numeric-ids --exclude=”/etc/fstab” --exclude=”/etc/sysconfig/network-scripts/*” --exclude=”/proc/*” --exclude=”/tmp/*” --exclude=”/sys/*” --exclude=”/dev/*” --exclude=”/mnt/*” --exclude=”/boot/*” --exclude=”/root/*” root@205.xxx.xx.xx:/* /
I have done a bunch of Googling on this problem but no luck yet.

I am trying to migrate one VPS to another VPS and am using this tutorial: https://lowendbox.com/blog/how-to-mi...comment-643482

Any suggestions would be appreciated.

Rob.

Last edited by Robert.Thompson; 03-04-2017 at 04:23 PM. Reason: Change title
 
Old 03-04-2017, 01:49 PM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,257

Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
Try
Code:
rsync://root@205.xxx.xxx.xxx
as the last option. You haven't told it the protocol, so it's treating that as a file spec.

I find it handier to specify what to include. So I use a filespec like /{bin,boot,etc,lib,lib64,...} to exclude things like /dev, /proc, /sys, & /tmp.
 
Old 03-04-2017, 02:46 PM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,680

Rep: Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893
As far as I know rsync:// is not required. The OP is using the -e option which specifies ssh remote shell/protocol.

Quote:
rsync -auHxvz -e “ssh –p 20022”
Is this the real command i.e did you copy and paste? Looks like a double backtick versus a double quote.

Try single quotes:
rsync -auHxvz -e 'ssh –p 20022'
 
Old 03-04-2017, 03:02 PM   #4
Robert.Thompson
Member
 
Registered: Nov 2009
Location: Montreal, Quebec, Canada
Distribution: LinuxMint 20 Cinnamon
Posts: 589

Original Poster
Rep: Reputation: 49
Thanks for your time, business_kid & michaelk.

I changed my new server to a Digital Ocean server and used a “push” command instead of a “pull” command:

Code:
rsync -auHxvz /* --exclude=/.ssh/* --exclude=/etc/fstab --exclude=/etc/sysconfig/network-scripts/* --exclude=/proc/* --exclude=/tmp/* --exclude=/sys/* --exclude=/dev/* --exclude=/mnt/* --exclude=/boot/* --exclude=/root/* root@159.xxx.xx.xxx:/ --progress
Atleast, this didn't throw an error.

Now, I'll try to check the integrity of the "cloning".
 
Old 10-04-2019, 08:54 AM   #5
linuxinlove
LQ Newbie
 
Registered: Oct 2019
Posts: 1

Rep: Reputation: Disabled
Hello Rob, may I ask how do you boot the Digital ocean VPS with the freshly copied system to have it load everything that has been copied? I have run the same code like u, AND rsync copying finished successfully, but when i reboot my destination server, i cannot access the server via ssh, error”Could not connect to ‘ip’’ (port 22): Connection failed.” and i reinstall the os and start over to rsync and also try to update grub using command”grub2-mkconfig -o /boot/grub2/grub.cfg” but still got the same error, can you please tell me what did u do after rsync copy finished ? thanks for your time so much.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Trouble excluding file from rsync mfoley Linux - Server 4 01-02-2017 08:09 PM
Is anyone else having trouble with rsync and Alien_Bob kde? 2handband Slackware 6 12-13-2010 06:30 AM
rsync problems, can you look at my command? - Rsync gurus. Spuddy Linux - Software 4 09-21-2010 10:25 AM
Trouble with rsync and charsets OldPlanet Linux - General 0 05-21-2006 10:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration