Re: backup compress on the fly

From: Mike McCarty (mike.mccarty_at_sbcglobal.net)
Date: 09/30/05

  • Next message: matt77_at_jacobflooringwashington.com: "Pre-Installed Debian System"
    Date: Fri, 30 Sep 2005 13:56:45 -0500
    To: debian-user@lists.debian.org
    
    

    Joe Mc Cool wrote:
    > Please,
    >
    > my ancient, but reliable, backup script is essentially:
    >
    > find /my_dir | cpio -ov > /dev/st0
    >
    > But, (now that I have installed all those lovely debian goodies), the
    > wretched tape is filling up and asking for another. (I erase the
    > tape beforehand.)
    >
    > I really want to fit all my current data, or certainly selected dirs
    > unto one tape. Surely I should be able to compress the files before
    > they are sent to the tape. I suspect it can be done with gzip, but I am not
    > sure of the syntax. Obviously I need to get it right.

    Whether compression is advisable depends on what your goal is.

    If you are making archives, or you are backing up a system which,
    if it failed and you lost everything it would be a terrible
    disaster, then I recommend you *not* to compress your backups.

    Compressed file formats are notoriously intolerant of medium
    errors. It might be better to do subset backups each of which
    fits onto a single tape.

    Proceeding on,

    There are three (at least) ways to proceed.

    Abandon cpio and use a tar which can compress/decompress as it goes.
    Continue to use cpio, and compress the image it creates.
    Continue to use cpio, and compress the files before they are stored.

    I am more familiar with tar than cpio. With the current GNU tar
    releases, this would be

            # tar cvz [list of places to back up]

    The "c" means "create", the "v" is "verbose" (optional) and the "z"
    means "compress as with gzip the entire tar image".

    To test the backup, use

            # tar tvz

    To restore

            # tar xvz [list of places to restore]

    (Again, the "v" is optional.)

    See the man page or info for more. If you have a favorite
    compression program, you can even use that, if you like.

    Mike

    -- 
    p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
    This message made from 100% recycled bits.
    You have found the bank of Larn.
    I can explain it for you, but I can't understand it for you.
    I speak only for myself, and I am unanimous in that!
    -- 
    To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
    

  • Next message: matt77_at_jacobflooringwashington.com: "Pre-Installed Debian System"

    Relevant Pages

    • Re: Tape backup using tar
      ... On Thursday 04 August 2005 11:06, Stuart Bailey wrote: ... >I'm haviong trouble using tar to backup to tape. ...
      (Fedora)
    • Re: Checking a Sun L9 autoloader.
      ... > got a real HVD SCSI card. ... > The HVD SCSI card is now reconsised at the OBP, along with the tape ... DO NOT use tar to backup your system. ...
      (comp.sys.sun.admin)
    • Re: FTPing a folder across to remote webspace
      ... > lot of repeated test it will compress a lot. ... > gzip only processes single files, so yes you should tar first. ... > In your message you mentioned databases, but not which sort of database. ... MySQL backup. ...
      (uk.comp.os.linux)
    • RE: problem with restore
      ... Have you tried taking backup using tar utility instead of rdump. ... If you take backup and try restore using tar, ... Also you can verify the content of tape after backup using ...
      (RedHat)
    • Re: problem with restore
      ... can tar be used to backup files on a machine with remote tape drive..?? ... the '-' on the tar command makes the 'f' go to stdout. ... Have you tried taking backup using tar utility instead of rdump. ... If you take backup and try restore using tar, ...
      (RedHat)