LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Using tar for backup. (https://www.linuxquestions.org/questions/linux-general-1/using-tar-for-backup-216017/)

TheRealDeal 08-10-2004 09:32 PM

Using tar for backup.
 
Hello.

I have created a cronjob which is going to run at 1:30am each Saturday. I have done this with...

crontab -e
30 1 * * 0 /runfile

I am backing up around about 60GB of data, only a seperate HDD in th eserver. I want all of the files to preserve their file ownership, permissions, and full directory paths.

Basically so, If I have a disaster and the RAID pack dies and the data gets lost, I can untar the latest backup file and everything will be as it was.

Can anyone please help me out with the tar command. I want to nail it first time as it is a production server.

Thanks alot.

Best Regards,
Craig

foo_bar_foo 08-10-2004 10:11 PM

hi,

tar -czf tarfile.tar.gz directory
if you want to backup everything
tar -czf totalBackup.tar.gz /
if your server handles tar.bz2 better
tar -cjf backup.tar-bz2 /

TheRealDeal 08-10-2004 11:46 PM

Cool thanks alot foo!!!!

I'll give that a go.

Thanks again.
>Craig :)


All times are GMT -5. The time now is 02:33 PM.