Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


Closed Thread
  Search this Thread
Old 09-07-2005, 09:44 AM   #1
Registered: Aug 2003
Distribution: RedHat 9, SuSE 9.2
Posts: 49

Rep: Reputation: 15
rsync syntax for local copy

i'm trying to use rsync to copy files locally as a nightly backup. i have successfully used rsync to copy files between a host and a remote system, but when i try this local operation i do not get the results i expect.

reading the man pages has not helped. again, most of the examples are for copying between a host and a remote system.

here is my current syntax:
rsync -aq /drawings/2005 /archives/2005

i'm trying to copy cad drawings from one directory to another on the same machine. according to the man pages you can use rsync in this fashion by simply specifying a source and destination without any colon separators.

what i'm getting is an additional 2005 folder each time. instead of syncing the files between /drawings/2005 and /archives/2005 i'm getting all files copied to /archives/2005/2005

if i run the operation again the next night, all files are copied again, this time to /archives/2005/2005/2005

what am i missing? i tried putting a trailing slash in my syntax:
rsync -aq /drawings/2005 /archives/2005/

but that didn't help.

thanks in advance.
Old 09-07-2005, 10:54 AM   #2
Senior Member
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 59
rsync -aq /drawings/2005 /archives/2005
Try it without 2005 on the destination ....
rsync -aq /drawings/2005 /archives
Old 12-20-2012, 07:38 PM   #3
LQ Newbie
Registered: Dec 2012
Posts: 2

Rep: Reputation: Disabled
just add slash on source dictinary, like rsync /aaa/aaa/ /bbb/aaa/
you should not use rsync /aaa/aaa
1 members found this post helpful.
Old 12-21-2012, 02:39 AM   #4
LQ Guru
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979
I doubt the OP is still interested in this topic after 7 years! Please, don't resurrect old threads.

Closed Thread

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 syntax to skip directory, but copy select files.. tnicol Linux - Software 3 07-24-2007 05:40 AM
rsync Syntax Question for Connecting to Remote Windows Machine Linux31 Linux - Networking 3 10-09-2005 02:55 PM
local rsync shell script eradrix Programming 13 07-09-2005 12:57 AM
copy/ftp/sftp/rsync from ssh'd machine allelopath Linux - Software 5 05-05-2005 02:16 PM
copy syntax tomap Linux - Newbie 3 11-14-2004 07:43 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:34 AM.

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