Re: tar'ing a entire system to a file

From: Stu (stu_at_santa-li.com)
Date: 12/17/03


Date: Wed, 17 Dec 2003 13:53:29 -0500

You're going to probably want the file permissions to be preserved and to
exclude directories that don't need to be backed up--like /proc, /tmp,
and /mnt. Something like this should do the trick:

tar -jcvvpf /root/full-backup.tar.bz2 \
    --directory / \
    --exclude=mnt \
    --exclude=proc \
    --exclude=tmp/* \
    --exclude=root/full-backup.tar.bz2 \
    .

This'll take a while to run, I use a similar command to back one of my
systems up that has 3.4 GB worth of data on it, it takes about an hour to
run, and produces a ~1.3 GB file.

Stu

James Campbell wrote:

> Hello group,
>
> I am tring to tar Redhat 7.2 to one file then take that file and ftp
> to a bare bones install of 7.2 on another machine. in hopes to expand
> it and have all of it there. I guess like a disk image.
>
> I will start up the current box with init -s in hopes to have most
> files closed during tar operation.
>
> can I just use :-> tar cfz archive.tar.gz /
>
> will that do it?
>
> --james