LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-19-2010, 12:42 PM   #1
pankajd
Member
 
Registered: Oct 2008
Posts: 54

Rep: Reputation: 15
home dir data backup in rhel 5.2


hi,
we have rhel 5.2 server inn which 570 GB of home area required to be backed up (backup it in some other location on the same server) with same files,permissions,preserving all soft links etc.....
i am going to use tar but i am in doubt whether it takes care of soft links also cap take care of all kind of files etc..
can any body give me proper command with proper flags .
 
Old 11-19-2010, 01:18 PM   #2
valen_tino
Member
 
Registered: Jan 2008
Posts: 105

Rep: Reputation: 28
The following switches may be useful for you:

Code:
-h, --dereference
              don't dump symlinks; dump the files they point to
Code:
-p, --same-permissions, --preserve-permissions
              extract all protection information
Here is the explanation.
 
Old 11-19-2010, 01:46 PM   #3
goldenbarb
Member
 
Registered: Aug 2010
Distribution: Fedora, Centos, Debian
Posts: 49

Rep: Reputation: 7
You can also use rsync:

Code:
-p, --perms                 preserve permissions

-l, --links                 copy symlinks as symlinks
 
Old 11-19-2010, 03:10 PM   #4
arizonagroovejet
Senior Member
 
Registered: Jun 2005
Location: England
Distribution: openSUSE, Fedora, CentOS
Posts: 1,094

Rep: Reputation: 198Reputation: 198
rsync is the way is the way to go. That's a lot of data you're copying - I doubt you want to copy the whole 570GB every time. rsync will only copy the changes. So the first time you use rsync you'll copy all 570GB. Run it again the next day and it'll only copy what has been changed. The best option to use is -a

Code:
 -a, --archive               archive mode; equals -rlptgoD (no -H,-A,-X)
Which includes both the options goldenbarb mentions.

Backing up 'some other location on the same server' is better than no back up but it's not much of a back up. If any of that data is considered at all important I hope you have another back up. Ideally in a second location (rsync will work over an ssh connection), though I realise sometimes that's not always do-able depending upon budgets and such.
 
Old 11-19-2010, 03:17 PM   #5
goldenbarb
Member
 
Registered: Aug 2010
Distribution: Fedora, Centos, Debian
Posts: 49

Rep: Reputation: 7
Quote:
Originally Posted by arizonagroovejet View Post
Backing up 'some other location on the same server' is better than no back up but it's not much of a back up. If any of that data is considered at all important I hope you have another back up. Ideally in a second location (rsync will work over an ssh connection), though I realise sometimes that's not always do-able depending upon budgets and such.
Absolutely.

pankajd, you might also want to exclude some files, so --exclude option could be useful.
 
  


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
Messed up mbr what do I do? I need data in my home dir... ieatbunnies Linux - Newbie 3 09-20-2010 02:43 PM
backup script causing data to be lost on main server- RHEL fedora_user Linux - Newbie 4 02-16-2010 06:40 AM
backup and restore user home dir ssilayaraja Linux - General 4 07-08-2008 12:33 AM
Backup My Home Dir Using Tar? carlosinfl Linux - General 2 03-19-2008 01:30 PM
Backup my home dir ernesto_cgf Linux - General 5 03-27-2007 02:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:15 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