LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 01-24-2008, 07:05 PM   #1
packets
Member
 
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?

E.g.

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
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

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

Original Poster
Rep: Reputation: 32
thanks mate.
 
  


Reply


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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

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