Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Other Operating Systems (https://www.askmehelpdesk.com/forumdisplay.php?f=433)
-   -   How to restore backup in linux taken by TAR Command (https://www.askmehelpdesk.com/showthread.php?t=239113)

  • Jul 18, 2008, 11:18 PM
    kharmale_anil
    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
  • Aug 23, 2008, 07:13 PM
    gctts
    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
  • Aug 29, 2008, 04:19 PM
    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
  • Sep 10, 2008, 11:28 PM
    kharmale_anil
    [
    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]
  • Sep 14, 2008, 03:25 AM
    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.
  • Sep 15, 2008, 11:28 PM
    kharmale_anil
    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]
  • Sep 16, 2008, 05:55 PM
    derobert
    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!

  • All times are GMT -7. The time now is 11:36 AM.