LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 03-26-2008, 05:28 AM   #1
IanSolo666
LQ Newbie
 
Registered: Oct 2007
Posts: 4

Rep: Reputation: 0
RHEL4 : Backup directories without content


Hello everybody !

I'm running an FTP cluster on RHEL4 with DRBD and we have a huge number of homedirs on our /ftp partition dedicated to the corresponding customers.

The fact is that we don't care of the content because it's just a support for exchanging files and data.

So, I'd like to build a backup of this /ftp partition with only the homedirectories and without the files ; in case of a restore, I only need the arborescence and I don't have disk space for a complete backup. Of course, I need to keep the rights. How can I do that ?

I tried with a find combined with tar but it didn't give the wanted result.

Thanks for your help.

Marco
 
Old 03-26-2008, 05:53 AM   #2
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
You should be able to use find with -type d

Did you try that? If so, what did you try and what didn't work?
 
Old 03-26-2008, 06:27 AM   #3
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Or you can use rsync like this
Code:
rsync -av --include '*/' --exclude '*' -e ssh /source/dir user@host:/destination/dir
the --include and --exclude options take care of selecting only the directories.
 
Old 03-26-2008, 09:20 AM   #4
roland_bapst
LQ Newbie
 
Registered: Mar 2008
Posts: 1

Rep: Reputation: 0
You can use something like
Code:
find /ftp -type d | cpio -pdumv /tmp/bkp
 
Old 03-27-2008, 02:54 AM   #5
IanSolo666
LQ Newbie
 
Registered: Oct 2007
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by roland_bapst View Post
You can use something like
Code:
find /ftp -type d | cpio -pdumv /tmp/bkp
YES !!! That's it ! Worked perfectly, thanks Roland )
 
  


Reply



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
How to backup on DVD in RHEL4 and 5? samengr Linux - General 1 02-28-2008 07:50 AM
How to take a OS backup in RHEL4 jitendra.gondaliya Linux - Enterprise 6 05-08-2007 12:10 PM
remote backup from RHEL4 to another RHEL4? dkgoalie Linux - Newbie 2 10-27-2006 11:14 PM
VSFTP - problems uploading directories full of content animehair Linux - Software 1 01-03-2005 08:34 AM
How does one delete directories with content as the SU? Ferrell Ramey Linux - General 2 08-22-2002 07:16 PM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 04:16 AM.

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