Ask Experts Questions for FREE Help !
Ask
    kharmale_anil's Avatar
    kharmale_anil Posts: 15, Reputation: 0
    New Member
     
    #1

    Jul 18, 2008, 11:18 PM
    How to restore backup in linux taken by TAR Command
    Hiiiii
    I'm new in linux. In my office I have taken baukup of Oracle data using Tar files. Now my mangaer tell me to resotre one of the data from tape. So can you tell the command for restornig backup.

    Usually for backup I use command
    Tar -rvf /dev/st0 /Folder name
    gctts's Avatar
    gctts Posts: 20, Reputation: 3
    New Member
     
    #2

    Aug 23, 2008, 07:13 PM
    You can retrieve the files by mounting the CD and copying the files from CD to hard drive using the cp command

    Cp /dev/st0 (mine are on use dev/cdrom so use whatever device yours is called) new.location (for new.location, use whatever directory you want it in)

    Move to the directory you copied the tar files to:
    Cd whatever directory you put the tar file in
    Tar -xp filename.tar
    pauline896's Avatar
    pauline896 Posts: 1, Reputation: 1
    New Member
     
    #3

    Aug 29, 2008, 04:19 PM
    you can retrieve the files by mounting the CD and copying the files from CD to hard drive using the cp command

    cp /dev/st0 (mine are on use dev/cdrom so use whatever device yours is called) new.location (for new.location, use whatever directory you want it in)

    move to the directory you copied the tar files to:
    cd whatever directory you put the tar file in
    tar -xp filename.tar
    ================================================== =========
    widecircles
    pauline
    kharmale_anil's Avatar
    kharmale_anil Posts: 15, Reputation: 0
    New Member
     
    #4

    Sep 10, 2008, 11:28 PM
    [
    Hiiii
    Thanks for the reply

    Actulayy size of backup file which is on tape is more than 10GB. And this file was deleted from my syatem. And now I want to retrive that file from tape to Hard disk. So please tell me the command line so that I can easily restore the file form Tape to Nachine.

    Thanks






    QUOTE=pauline896]you can retrieve the files by mounting the CD and copying the files from CD to hard drive using the cp command

    cp /dev/st0 (mine are on use dev/cdrom so use whatever device yours is called) new.location (for new.location, use whatever directory you want it in)

    move to the directory you copied the tar files to:
    cd whatever directory you put the tar file in
    tar -xp filename.tar
    ================================================== =========
    widecircles
    pauline[/QUOTE]
    derobert's Avatar
    derobert Posts: 34, Reputation: 2
    Junior Member
     
    #5

    Sep 14, 2008, 03:25 AM
    You can use tar to read the tape if it was written by tar.

    e.g. tar xf /dev/st0

    I'd suggest setting the read-only tab on your tape if it has one.

    Hopefully however you backed up the Oracle files, you did it correctly. Just taring up the Oracle data dir usually isn't the right way.
    kharmale_anil's Avatar
    kharmale_anil Posts: 15, Reputation: 0
    New Member
     
    #6

    Sep 15, 2008, 11:28 PM
    Thanks for reply...
    Its done. I have restore file successfully using tar xf /dev/st0 this command, thanks very much.
    Now I want help that can I delete unnecessary backup files from tape? If so please give me the command line for the same?

    Thanks
    Anil




    QUOTE=derobert]You can use tar to read the tape if it was written by tar.

    e.g. tar xf /dev/st0

    I'd suggest setting the read-only tab on your tape if it has one.

    Hopefully however you backed up the Oracle files, you did it correctly. Just taring up the Oracle data dir usually isn't the right way.[/QUOTE]
    derobert's Avatar
    derobert Posts: 34, Reputation: 2
    Junior Member
     
    #7

    Sep 16, 2008, 05:55 PM
    Tape doesn't work like that. It isn't a file system. You can erase the tape, or just write over it, but you don't add and delete files like you do a file system.

    If you want to write over it, just use your original tar command — that'll overwrite the tape. If you need to erase it (e.g. for security reasons), you can (depending on tape type) use either a bulk eraser or something like dd if=/dev/urandom of=/dev/st0 bs=32768 (and repeat as many times as your security needs require).

    I strongly suggest learning more about how tape operates if you're going to rely on them. I don't know of a good reference off the top of my head, unfortunately. Also, as a backup strategy, tar is rather lacking in features; there are plenty of backup packages that'll make like much easier. Personally, I use Bacula, but that's an overkill for a single machine.

    Edit: Also, no backup strategy should be trusted until you've done at least one restore!

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Command line is telling that "javac" is no internal or external command [ 1 Answers ]

Hi fellow I have just started java , my operating system is windows vista , I have installed java but when I give "javac" command on command line after writng the code in note pad the command line gives an error that javac is not an internal or exetrnal command... if any 1 can help ...

How can I use net send command? [ 1 Answers ]

How can I use "net send" command for the purpose of send massage PC to PC?

System restore won't restore [ 5 Answers ]

Can anyone help me to restore to earlier point, each time I try it goes through motions then say canot restore.:confused:

System restore - unable to restore [ 2 Answers ]

I have tried to use the system restore. It keeps coming back cannot be restored. I have created a date and then tried to restore and still says it is unable to restore. Any suggestions?


View more questions Search