SCP copying directories between servers
I have an SCP query like this(its on the same server but different port):
scp -r /path/xml_documents_content/ ip_address:/path/xml_documents What it does is copy everything from xml_documents_content into xml_documents folder on target, BUT it creates a new folder xml_documents_content under the/xml_documents folder, and I just want the files to go straight into the xml_documents folder. Any help? Please? |
rsync instead? Other than that, does a .* help?
scp -r /path/to/files/.* ip:/path/to/files Cool |
Quote:
scp -r /path/xml_documents_content/* ip_address:/path/xml_documents but then I got errors, as Ive got a heap of directories under xml_documents_content and got errors like '61414' is not a regular file |
Is rsync a bad (or unavailable) option?
Cool |
Quote:
Could you perhaps give me an example of how I'd do the rsync? |
Sure, I'll show you what I use, and then point you to the document describing how to do what I use:
Code:
* * * * 1 rsync -e ssh -avz user@example.com:/path/to/files/ /path/to/backup/ 2>&1 /var/log/weekly-backup.log http://www.linuxquestions.org/linux/...etween_servers and then to have the public key arrangement to automate this process in cron (also linked in the above document): http://www.linuxquestions.org/linux/...ation_with_ssh HTH Cool |
All times are GMT -5. The time now is 05:13 AM. |