Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 09-22-2011, 12:33 PM   #1
Registered: Aug 2011
Posts: 68

Rep: Reputation: Disabled
Commands to incremental backup with tar

Hi..all, I googled for shell script for incremental backup with tar and found it works fine. But I just want to check incremental backup using the commands manualy. As per man page I found -g/-G for incremental backup but I don't know how use those. First I ran
"tar -cjvf data.tar.bz2 data"
#ls -ltrh
total 3.3M
drwxr-xr-x 4 root root 4.0K 2011-09-22 21:17 data
-rw-r--r-- 1 root root 3.3M 2011-09-22 22:34 data.tar.bz2
#du -sh data
4.9M data
Then I added some files in data folder and ran
"tar -cjGvf data.tar.bz2 data"
found 0 for "echo $?", then I removed data directory and extracted using
"tar -xjvf data.tar.bz2" and found that the new files were exist in data folder.
Is this correct for incremental backup or the incremental should be happening with new files or in different than these two when we run it manually? If u r yes 2nd and 3rd, could u plz show the commands that how it should be?
Old 09-22-2011, 02:03 PM   #2
Registered: Nov 2003
Location: Los Angeles
Distribution: debian
Posts: 538

Rep: Reputation: 71
Rsyc greatly simplifies this task.
Old 09-22-2011, 02:24 PM   #3
Registered: Feb 2010
Location: chennai - India
Distribution: centos
Posts: 289

Rep: Reputation: 10
use Rsync compare to tar its more reliable !!
1 members found this post helpful.


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
using tar --listed-incremental as backup lrt Linux - Software 12 06-19-2009 07:55 AM
incremental backup using tar eaglegst Linux - Software 9 02-01-2009 05:00 PM
incremental backup using tar ARsenthil Linux - General 1 03-19-2008 08:29 AM
Incremental Backup (tar command) maginotjr Slackware 4 07-21-2005 01:04 AM
Getting date format right in tar incremental backup jonr Linux - Software 3 08-19-2004 09:53 AM > Forums > Linux Forums > Linux - Newbie

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

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration