LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 09-22-2010, 02:40 PM   #1
dooley28
LQ Newbie
 
Registered: Mar 2007
Posts: 5

Rep: Reputation: 0
Trying to rsync from remote to local


Hey all,

I'm trying to rsync a folder(and all subfolders) down to a local directory, upon completion I'd like the remote folder to be deleted.

What I've come up with is

Code:
rsync -rvtW --remove-sent-files -e ssh user@example.com:/remote/folder /local/folder
What this is doing is simply wiping the remote files within folders(not the folders themselves) and not actually syncing anything down to my local folder(as in no files at all on my /local/folder)

Can anyone help with this?
 
Old 09-23-2010, 01:03 AM   #2
Jerre Cope
Member
 
Registered: Oct 2003
Location: Texas (central)
Distribution: ubuntu,Slackware,knoppix
Posts: 323

Rep: Reputation: 37
I think one problem is a missing trailing / on the source. Try:

rsync -rvtW --remove-sent-files -e ssh user@example.com:/remote/folder/ /local/folder

I'm not sure why you'd use the -W option with rsync. If you're going to do that, rcp would work as well and you wouldn't need rsync on both machines.

Maybe:

rsync -arzv -e ssh user@example.com:/remote/folder/ /local/folder && ssh user@example "rm -rf /remote/folder"
 
  


Reply

Tags
rsync


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
rsync local web folder to remote web folder? Almost working... Ultrus Linux - General 2 03-25-2009 02:49 PM
Local rsync Yalla-One Slackware 7 09-20-2006 10:40 AM
shell script to compare filese b/w local and remote and delete files from local serve dsids Linux - Networking 9 08-23-2006 07:20 AM
Complicated one: MySQL, rsync, remote machine, local machine daiver Linux - General 2 02-27-2006 12:14 PM
Remote Mounting? (Mount remote folder on local filesystem) mac_phil Linux - Networking 1 11-15-2003 03:48 PM


All times are GMT -5. The time now is 11:22 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration