LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 10-21-2009, 11:09 AM   #1
visitnag
Member
 
Registered: Mar 2008
Posts: 147

Rep: Reputation: 15
RHEL4 backup files using tar command...


Hi all,

I have my program files(especially awk) in a particular directory. I keep adding new progs to the same directory. I carry these files to my home pc using the command

tar cvf mybackup.tar *

and untar the same in my pc and vice versa.

My problem is:

1. If I untar in my pc it is writing the the current date and time for all the files.

2. Is there any other command to backup my changed program files and extra added files(is it called incremental backup?). so I can avoid each time creating a new tar file.

Gimmi a better backup solution for my problem. Thanks in advance.
 
Old 10-21-2009, 11:43 AM   #2
Forrest Coredump
Member
 
Registered: Oct 2009
Location: Southwestern United States
Distribution: Redhat Enterprise Linux 4-5 (Current RHCE), Fedora Core 11 (FC11), Arch Linux, BT3 (Current GCIH)
Posts: 42

Rep: Reputation: 16
What options are you using to tar? If you are using "tar -xvf/-cvf", as far as I'm aware neither m-time or c-time should be modified. Perhaps adding "--atime-preserve" to your create command string "tar --atime-preserve -cvf"?

As far as a better way to accomplish the task. I would recommend using "rsync -av /source-dir /backup-device/backup-dir" to a usb device, and "rsync -av /backup-device/backup-dir /dest-dir". This will accomplish the same task, while increasing reliability + decreasing the amount of data that needs to be copied (only updates blocks which have changed, i.e., delta of changes). Rsync also uses a rolling md4 checksum algorithm which will give you the ability to verify the integrity of you files.

Hope this helps

Last edited by Forrest Coredump; 10-22-2009 at 11:12 AM.
 
Old 10-24-2009, 10:54 AM   #3
visitnag
Member
 
Registered: Mar 2008
Posts: 147

Original Poster
Rep: Reputation: 15
Thank you for your suggestion. But at the time of backup only i want to zip the backup file also(to save space). Through rsync it will copy each file into destination. I want all to be written as one file. So it is easy to copy the entire file into my usb or something else.
 
Old 10-24-2009, 04:09 PM   #4
Forrest Coredump
Member
 
Registered: Oct 2009
Location: Southwestern United States
Distribution: Redhat Enterprise Linux 4-5 (Current RHCE), Fedora Core 11 (FC11), Arch Linux, BT3 (Current GCIH)
Posts: 42

Rep: Reputation: 16
How about zipping (gzip) the directory, and then rsync'ing the *.zip file (only changed blocks will be transferred so you'll save both space and time).
 
  


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
Backup files but not using tar tqz Linux - Newbie 6 08-14-2009 11:02 AM
[SOLVED] Simple tar based backup command? Bryan88 Linux - Newbie 3 04-21-2007 09:04 AM
BackUp & Restore with TAR (.tar / .tar.gz / .tar.bz2 / tar.Z) asgarcymed Linux - General 5 12-31-2006 02:53 AM
Incremental Backup (tar command) maginotjr Slackware 4 07-21-2005 01:04 AM
restoring /etc files from tar backup hdagelic Linux - General 1 09-24-2003 07:04 AM


All times are GMT -5. The time now is 07:00 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration