LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 05-29-2009, 12:54 AM   #1
Yashwant
LQ Newbie
 
Registered: Sep 2008
Posts: 5

Rep: Reputation: 0
Incremental Backup in SUSE10


Hi,
Its my first posting here in this forum...

I am using suse10 and facing problem to perform incremental backup in my tape drive, I have tried to take incremental backup using "tar" command but after performing first backup again it go the beginning of the tape and starts writing from there, even I tried using the command:-
$tar -czvf /dev/nst0 /home/(dir name)

but even i am unable to get back my backed up files which I took first.

Can I get support from this forum

Thanks
 
Old 05-29-2009, 01:14 AM   #2
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
Have you looked at Amanda or Bacula for the purpose? These are packages made for backups.
Tar would not obviously append to the original tar unless you tell it to. -a option is I guess to append files to the tar archive.
 
Old 06-01-2009, 07:09 AM   #3
choogendyk
Senior Member
 
Registered: Aug 2007
Location: Massachusetts, USA
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,197

Rep: Reputation: 105Reputation: 105
You will need to give more detail to get help on that. What did you try? What happened? Was there an error message?

nst0 will be the non-rewinding tape drive. You should use the mt command to get the status and to rewind the tape. Then tar should be able to extract from the tape.

Of course, you could also adopt some actual backup software, but you should understand the tools you are using first (sort of like understanding and being comfortable with hand tools before jumping into power tools). Then maybe try http://wiki.zmanda.com/index.php/Quick_start (after reading a bit more from the rest of the wiki to understand what it is and how it works).
 
Old 06-01-2009, 03:58 PM   #4
soleilarw
Member
 
Registered: Apr 2009
Posts: 107

Rep: Reputation: 19
Your posting said that you did:
Quote:
$tar -czvf /dev/nst0 /home/(dir name)
-c will ALWAYS create a new tarball, you need to use the -u (update) flag instead. The -u flag will create a new tarball anyway, if it doesn't exist, but it will concatenate update/new data for existing tarballs.

Linux Archive

Last edited by soleilarw; 06-18-2009 at 04:19 AM.
 
Old 06-05-2009, 12:03 AM   #5
Yashwant
LQ Newbie
 
Registered: Sep 2008
Posts: 5

Original Poster
Rep: Reputation: 0
details (what i did)

I first performed my quick erase operation, after that i took backup using command "tar -czvf /dev/st0 /home/bin" after that I gave the command to go to the end of the data i.e., "mt -f /dev/nst0 eod" after that i performed my backup of /etc directory with the command "tar -f -czvf /dev/st0 /home/etc" but after that command when I gave the command to see the list of files on the tape "tar -xzvf /dev/st0" then it was showing only the /etc directory which I took at the second time, So I could not get my /bin dir. which I took at the first set of backup.
So can you guys help me out with this.


Thanks
 
Old 06-05-2009, 05:03 AM   #6
soleilarw
Member
 
Registered: Apr 2009
Posts: 107

Rep: Reputation: 19
The command that moved operations to the end of the previous backup session, should also be able to move you back to the start position. Other than that I would have made the backup like "tar -czvf /dev/st0 /home/bin /home/etc" - it's still easier to extract only certain directories from a tarball, then to mangle with many subsequent tarballs on a tape.
 
Old 06-05-2009, 07:25 AM   #7
choogendyk
Senior Member
 
Registered: Aug 2007
Location: Massachusetts, USA
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,197

Rep: Reputation: 105Reputation: 105
Couple of problems. You're mixing the use of st0 and nst0. The first rewinds after use, the second does not. To understand what you are doing, I would do a `mt -f /dev/nst0 status` either before or after every command to see what you are dealing with.

If you stick with the nst0, then you can use mt with fsf and rewind to get where you want, if it isn't already there.

If you want separate tar files for each of those, then just issue the tar commands one after the other using the nst0 device. They will be separate files on the tape. You can see the file position with the mt status command, and use rewind and fsf to position it. Or use soleilarw's suggestion and put them all in one tar (one file).

I'm not sure about the eod. I use eom on solaris. eom positions after the last file mark at the end of the written portion of the tape. So, if you've written one file, it will position at the beginning of what will be the second file. I don't know if eod does the same thing, or if it goes to the end of the written data before the file mark. The result would be quite different. mt status ought to let you know where it is.
 
Old 06-16-2009, 11:56 PM   #8
Yashwant
LQ Newbie
 
Registered: Sep 2008
Posts: 5

Original Poster
Rep: Reputation: 0
Smile Thanks

Thanks to all of you group member for your support.
I am able to create the another tar ball with the help of nst0, but now here i am getting another problem, after creating first file when i am creating second file and when i am going to see what are the files are there in the media then i am able to see only the files which has been in the first set of tar ball but the second session of tar ball is not visible in the list.
So please can you tell me the solution for seeing the second set of tar ball and also how I can restore the second set of tar ball.

Thanks once again.
 
Old 06-17-2009, 08:58 AM   #9
choogendyk
Senior Member
 
Registered: Aug 2007
Location: Massachusetts, USA
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,197

Rep: Reputation: 105Reputation: 105
It would be helpful if you would tell what command you used and what the output was. When you try to describe it in general terms, what you describe could be interpreted to mean a number of different things, each of which would have a different set of possible answers.

For example, if you did

$ mt -f /dev/nst0 rewind
$ tar -czvf /dev/nst0 /home/dir1
$ tar -czvf /dev/nst0 /home/dir2
$ mt -f /dev/nst0 rewind
$ tar -tvf /dev/nst0

then, of course, the table of contents generated by the last command will only show what is in the first tar file on the tape. However, if you then do

$ mt -f /dev/nst0 status

and find that you are on file position 2 of the tape, then you can do

$ tar -tvf /dev/nst0

again, and you will get the table of contents of the second tar file on the tape.

However, without explicit commands and output from you, it's difficult to tell what you did or what happened.
 
Old 06-17-2009, 10:09 PM   #10
Yashwant
LQ Newbie
 
Registered: Sep 2008
Posts: 5

Original Poster
Rep: Reputation: 0
Smile Reply

I did it as follows:

mt -f /dev/st0 weof 2000

tar -czvf /dev/st0 /home/dir1

mt -f /dev/nst0 rewind

tar -czvf /dev/st0 /home/dir2

tar -tvf /dev/st0

and at the end i was able to see the only dir1 but dir2 was not visible on the list
 
Old 06-18-2009, 07:27 AM   #11
choogendyk
Senior Member
 
Registered: Aug 2007
Location: Massachusetts, USA
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,197

Rep: Reputation: 105Reputation: 105
Your use of /dev/st0 versus /dev/nst0 makes no sense. The only place you are using /dev/nst0 (the no automatic rewind version of the tape device) is when you are issuing the rewind command. And what's with the 2000?

Take a look at this thread http://www.linuxquestions.org/questi...nd-file-33514/. It's a bit old, but it covers exactly what you are trying to do. You might also want to read over the `man mt` and `info tar` and see if that helps.
 
Old 06-19-2009, 12:14 AM   #12
Yashwant
LQ Newbie
 
Registered: Sep 2008
Posts: 5

Original Poster
Rep: Reputation: 0
thanks

thanks for your help,,,,,,,,,
and that 2000 I have given because the tape drive to perform quick erase and for that I have the no. of bites to be written in the file mark area.
 
  


Reply

Tags
member



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
[SOLVED] Incremental Backup me_spearhead Programming 1 01-09-2009 06:09 AM
incremental backup jdeeptir Linux - Newbie 5 05-24-2008 06:51 PM
Incremental backup Ammad Linux - Software 2 02-22-2008 03:41 PM
About incremental backup satimis Linux - Software 0 06-15-2006 04:01 AM
incremental backup reaky Linux - Software 3 03-10-2004 03:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:21 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
Open Source Consulting | Domain Registration