[K12OSN] tar to take an image for checkpointing

Les Mikesell les at futuresource.com
Wed Sep 6 17:28:01 UTC 2006


On Wed, 2006-09-06 at 12:51 -0400, Robert Moskowitz wrote:

> > I always do a 'df' or 'mount' first to note the filesystems that
> > I want to save, then repeat the command for each one (with a
> > different destination name, of course) using the
> > --one-file-system option to tar (or rsync, etc.).  This keeps
> > it from walking into /proc and and nfs or iso mount points
> > that it might encounter.  You do have to be careful not to
> > miss anything, though.
> Further evidence there is a lot I don't know  :)
> 
> I use df occationally, just to check space available (df -h), but have 
> not used it for anything else.
> 
> It seems you are implying there is a way to tar a partition.

You can tar anything you want, either giving it a list of filenames
or a directory as a starting point.  To tar a partition, you give it
the mount point and the --one-file-system option to keep it from
recursing into other mount points. 

> Also you seem to imply that TARing /proc is bad.  Yet it seems I have 
> seen a comment that for a rebuild, you need that directory?

The directory has to exist.  If you've excluded it with tar exclude
options it won't, and you have to create it yourself.  If you tar
/ with the --one-file-system option the directory will exist after
a restore but not the contents.

> Since /home is in its own partition, I really don't want to include it 
> in my OS backup....

The df or mount commands I mentioned were just so you understand the
layout and don't miss any partitions that you want to back up.  If
you already know the layout you can just do the filesystems you want.
Normally I cd to the mount point and tar '.' (current directory) so
it would be easy to put them back with a different layout.

-- 
  Les Mikesell
   les at futuresource.com





More information about the K12OSN mailing list