General
cancel
Showing results for 
Search instead for 
Did you mean: 

Incremental/Diffrential Backup via 'tar'

SOLVED
Go to solution
Maaz
Valued Contributor

Incremental/Diffrential Backup via 'tar'

Hello All Great Gurus
Please kindly let me know how can I take incremental/diffrential backups, via tar utility. Please let me know the syntax

#tar -cvf /mnt/backup /

so what should i write now to take incremental/diffrential backup, please write the SYNTAX.

Many Many Thanks in Advance
Best Regards
Maaz
7 REPLIES
Maaz
Valued Contributor

Re: Incremental/Diffrential Backup via 'tar'

Hello Great Folks, please provide me your kind feedbacks/assistance ASAP.

Thaanks
Martin P.J. Zinser
Honored Contributor
Solution

Re: Incremental/Diffrential Backup via 'tar'

Hello Maaz,

you might want to checkout

http://tille.soti.org/training/tldp/ch09.html#sect_09_01_01_02

for documentation on this.

Also amanda (www.amanda.org) might be worth a look.

Greetings, Martin

Olivier Drouin
Trusted Contributor

Re: Incremental/Diffrential Backup via 'tar'

huh, didnt know we could do it with tar.

Anyway dump/restore (or ufsdump/ufsrestore on other unices) will let you do incremental backups... see the man pages
James A. Donovan
Honored Contributor

Re: Incremental/Diffrential Backup via 'tar'

You have to have the Gnu version of tar for that particular -N option to wrok (shouldn't be a problem form most Linux installs).

Alternatively, you could whip something together using the -newer option of the find command and piping the output to tar.

e.g.

find /somedir -newer somefile | tar cvf /dev/mytapedevice
Remember, wherever you go, there you are...
Jeroen Peereboom
Honored Contributor

Re: Incremental/Diffrential Backup via 'tar'

Maaz,tar -u : appends files to the tar archive that are newer than those in the archive.So tar -uvf /mnt/backup will do it.If you are using tapes, you might want to use something like tar --create -- verbose -- listed-incremental --file /dev/Or tar cvf -g /Check the man page for all the commands and qualifiers.Do some simple test on a small subdirectory.JP.
Maaz
Valued Contributor

Re: Incremental/Diffrential Backup via 'tar'

Thanks Martin, ur suggested url worked for me, and i m successful in acheiving my target, again many thanks, I acheived as

# tar -cvf /mnt/backup040320 -g snapshot-20040320 /
# tar -cvf /mnt/backup040321 -g snapshot-20040320 /
Many Thanks Martin.

And Jim Donovan, could u please explain a bit more, I didnt get you, u wrote:
find /somedir -newer somefile | tar cvf /dev/mytapedevice
could u please kindly explain it. i just didnt understand "find /somedir -newer somefile" could u please write the EXACT syntax. Do u mean "find / - newer backup.tar |tar -cvf /mnt/backupmedia" Infact I just didnt understand what do mean by "-newer somefile" portion of the syntax. But many thanks for ur feedback Jim.

And Olivier Drouin, I try my best to follow ur suggestions, anyway many thanks.

And in last Many Thanks Jeroen Peereboom. Infact i dont want to replace previos files, with modified ones. what i want is to take backup in new archive, if there is any modification occured, as compare to prevois archive.

THANKS A MILLION, TO U ALL FOR THE FEEDBACKS.

Best Regards
Maaz
James A. Donovan
Honored Contributor

Re: Incremental/Diffrential Backup via 'tar'

The '-newer' switch for the find command tells find to list only those files which have a newer timestamp than the specified file.

The standard find command that comes with RHAS2.1 also allows for '-anewer file' and '-cnewer file', which 'find' files that have been Accessed more recently or Changed more recently, respectively.

Remember, wherever you go, there you are...