All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Lembark <lembark@wrkhors.com>
To: linux-lvm@sistina.com
Subject: Re: [linux-lvm] OK to backup physical volume to tape?
Date: Fri, 29 Dec 2000 18:15:53 -0600	[thread overview]
Message-ID: <3A4D2939.C089EC3B@wrkhors.com> (raw)
In-Reply-To: 3A4D0C25.A4BB534B@xenotrope.com

Mits Yanagihashi wrote:
> 
> Hello,
> 
> I'm a LVM newbie with a question.  I haven't managed to find an answer
> yet, so I'm posting my question here.
> 
> I have a hardware RAID 5 volume on my server; Linux sees this as one 130
> GB disk (/dev/sda).
> 
> I have one tape drive that can store 33 GB (uncompressed).  I want to
> backup 130 GB over a 5 day week.  I want my users to see two directories
> "/dir1" and "/dir2", but my tape cannot fit a full dump of either one
> directory.
> 
> This is what I want to do:
> 
> 1. Divide /dev/sda into 5 partitions of 26 GB each.  Make each partition
> a physical volume.
> 
> 2. Make one volume group.  Add two logical volumes (that together use
> the 5 physical volumes) to the volume group.
> 
> 3. My users can use the two logical volumes (dir1 and /dir2, which may
> be 52 and 78 GB respectively).  Each night a full backup of one physical
> volume, and incrementals of the other four physical volumes are written
> to tape.  One tape can store 26 GB, and still have space for incremental
> backups of the other physical volumes.
> 
> My question is, is it safe to backup the physical volume (i.e. dump
> /dev/sda1 to tape)?  Or are there complications with file system
> state/meta information?


backing up physical volumes is suicide.  dd is the only tool that will
copy the stuff out and it cannot verify the output.  better way to fit
daily backups is zip them or restrict the number of files backed up
by directory, or simply store the backups on mutiple tapes.

make incremental backups:

	find /dir1 -mtime -1 |
		cpio -o -Hcrc --file=/dev/tape --io-size=$((1024*1024*16));

this is the safest way, and if it runs over one tape
then you will be asked to place in another tape and
keep going.  viola, multiple tape backup sets.

zip the dailys (not a good idea for long-term storage but quite
workable for q&d backups, also speeds up recovery:

	find /dir1 | cpio -o -Hcrc | gzip --fast |
		dd of=/dev/tape obs=16386k;

if you need to REALLY squish the stuff:

	... | bzip -9 | ...

or 

	... | gzip --best | ...

will maximize the compression.

if people are paranoid about loosing work you can also make 
since-the-weekly-backup incrementals:

	touch start-of-weekly-backup-file;
	make_weekly_backup;

then daily:

	find /dir1 -newer start-of-weekly-backup-file |
		cpio -o -Hcrc | blah | blah | blah;

this will make successively larger backups each day.


if you use the "--file" option then when one tape runs out cpio
will rewind and ask you to hit return when the second tape is
loaded.  dd will not support multiple tapes.


you can also find /dir1/foo onto one backup, find /dir1/bar 
onto another, etc.  

-- 
 Steven Lembark                                   2930 W. Palmer St.
                                                 Chicago, IL  60647
 lembark@wrkhors.com                                   800-762-1582

  reply	other threads:[~2000-12-30  0:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-12-29 22:11 [linux-lvm] OK to backup physical volume to tape? Mits Yanagihashi
2000-12-30  0:15 ` Steven Lembark [this message]
2000-12-30  0:59   ` Mits Yanagihashi
2000-12-30  2:38     ` Steven Lembark
2000-12-30 20:36 ` Andreas Dilger
2001-01-03 17:15 ` Rik van Riel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3A4D2939.C089EC3B@wrkhors.com \
    --to=lembark@wrkhors.com \
    --cc=linux-lvm@sistina.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.