[Discuss] OS image
Patrick
Nixnik-sneaking at sneakEmail.com
Fri Jan 24 05:43:22 PST 2014
Speaking of diving into manuals and stuff... Four years of
Xubuntu 9.04 kind of blunted me. I mainly used it to check my
email, other day-to-day stuff, it Just Worked, and I didn't
question that too much. So lately, sitting around the house
absorbing all kinds of fascinating new ideas and getting *no*
fresh air at all has been, uh... a breath of fresh air,
actually. :-)
Anyway...
On Thu, 23 Jan 2014 11:49:00 -0800
John Blomfield wrote:
[...]
>
> Question "What is the best way to capture an image of my OS?". I have
> used dd for backing up some small partitions and usb drives etc but not
> for a job like this. Is dd the best method? In the future if I get a new
> desktop I will probably try RAID but until then any suggestions will be
> welcome.
I've been thinking about that too, even though I only lost a
couple files [literally, only two, which couldn't be read from
the old drive].
RAID -- I happen to have a few semi-trustworthy HDs that could be
`put out to pasture' in a safe way -- with plenty of redundancy,
of course. Haven't tried that yet.
But I have installed two OSes here [not counting WinXP], for the
same reason a lot of airplanes have more than one engine... Both
are on the same physical drive though, and they do share a common
/home and /boot . As for keeping them in sync, I think I'd only
have to ignore the differing /etc/fstab files, /dev , /proc ,
skip some other semi-fictional filesystems, and copy everything
else.
Probably better to sync the `sleeping' OS with the `working' one
manually, and not too often, because I don't want cron copying a
freshly broken system over top of a perfectly good [if slightly
older] one, when I'm not looking. Kind of defeats the purpose of
making a backup.
Grsync looks great, btw. I haven't done much with it yet, but
it's pretty self-evidently cool. Thanks Murray. :-)
Clonezilla doesn't support incremental backups, yet, so maybe...
snapdate="$(date "+%F")"
cp -lr --preserve=all "$old_snapshot_d" "${snapshot}_$snapdate"
# Creates hard links, not copies of files.
# But this is still just a copy of a stale snapshot.
# So...
rsync [update today's snapshot to match running OS]
# But first, check used/free space, then archive and/or delete
# the oldest snapshots to make room, if necessary.
With the --delete-before option, rsync would remove hard links
before copying, instead of overwriting anything. So your snapshot
of a given file from last month would still be a faithful copy of
last month's changes, not today's.
Interesting, btw;
http://packages.debian.org/jessie/hardlink
================================================================
For Windows, I was thinking about dd too. But copying all that
blank space between files...? From within Windows, CCleaner can
overwrite the free space with nulls -- ostensibly for privacy and
security, but in this case, for better compression. Vast expanses
of 0x00000000000000... will compress much better than some random
mess of previously deleted/overwritten noise.
>
> My openSuse 12.3 used about 24GB (excluding data of course) with all the
> bloatware I had accumulated over time, trying out various apps. My newly
> installed openSuse 13.1 with most of my basic apps is only about 9GB but
> I am sure it will grow over the next year or so.
8-O I'm hovering at about 3 GB right now, and that's after going
on a bit of a new-toy download binge.
> I am not sure how long
> it would take to dd my OS. Is there a faster way than dd?
There must be. You'd be surprised how fast cp -lr will duplicate
a directory tree, once you've made the initial backup. Then just
update the files that have changed since last time...
I wonder if an ext3 partition would run out of available inodes
before it filled up. There is a limit to the number of *files*
you can have in any given partition, not just the amount of
space they can take up. Not sure if hard link count...?
>
> John
Patrick.
--
Real Men don't make backups. They upload it via ftp and let the
world mirror it.
-- Linus Torvalds
More information about the Discuss
mailing list