LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   home dir data backup in rhel 5.2 (https://www.linuxquestions.org/questions/linux-server-73/home-dir-data-backup-in-rhel-5-2-a-845361/)

pankajd 11-19-2010 12:42 PM

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 .

valen_tino 11-19-2010 01:18 PM

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.

goldenbarb 11-19-2010 01:46 PM

You can also use rsync:

Code:

-p, --perms                preserve permissions

-l, --links                copy symlinks as symlinks


arizonagroovejet 11-19-2010 03:10 PM

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.

goldenbarb 11-19-2010 03:17 PM

Quote:

Originally Posted by arizonagroovejet (Post 4164736)
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.


All times are GMT -5. The time now is 09:03 AM.