Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 01-24-2008, 07:05 PM   #1
Registered: Oct 2005
Posts: 330

Rep: Reputation: 32
save parent directory in rsync

I'm writing script using rsync to backup files. However, is it possible to copy the parent directory of the file?


rsync -rvae /usr/bin/ssh backuppc@testing:/etc/passwd /backup

When I checked backup, it has passwd files. Can it be possible that also the etc folder will be download and the files inside is only passwd?
Old 01-24-2008, 08:05 PM   #2
Senior Member
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
I think -R does what you want
For example:
rsync -Rav /etc/passwd /home
Old 01-24-2008, 08:22 PM   #3
Registered: Oct 2005
Posts: 330

Original Poster
Rep: Reputation: 32
thanks mate.


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
Goto Parent Directory anjanesh Linux - Newbie 6 01-03-2006 12:46 AM
.htaccess restricting parent directory Braytac Linux - Networking 2 05-26-2005 05:27 PM
'cp -rv .*' recurses into the parent directory??? stefanlasiewski SUSE / openSUSE 5 02-02-2005 05:36 PM
List only the parent directory scottrell Linux - General 6 11-07-2003 09:10 AM
mv the contents of one directory to the parent directory warkrime Linux - Newbie 4 07-14-2003 07:03 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:26 PM.

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
Open Source Consulting | Domain Registration