Keith C. Perry on 30 Aug 2014 06:15:09 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Image-based partial backup?


Rich,

I would be asking the opposite question to Eric- does it really have to be a file based solution?  You mentioned that you were looking for something offline so that would exclude most native Linux apps.  ntfsclone from ntfsprogs however is exactly designed for that.  It understands the filesystem and is very efficient in storing it.  Even in Linux, most file backups are inefficient when is comes to storing sparse files and ntfs is no exception in that regard.  That may or may not be an issue with your workloads but it is something to be aware of.

With this approach you could clone the file filesystem to a file- even run it through some compression.  When restoring it, you could delete what you don't need or want.

If you want to be able to use this to rebuild a bootable system you can also grab the boot sectors with "dd".  Up until windows 2008 I used this (or just images with created with dd) to be able to rebuild my windows boxes.  2008 has a very good and native snapshot facility so I no longer do this except for some virtualization projects.


~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ 
Keith C. Perry, MS E.E. 
Owner, DAO Technologies LLC 
(O) +1.215.525.4165 x2033 
(M) +1.215.432.5167 
www.daotechnologies.com 

----- Original Message -----
From: "David Z" <unimportantdavidz@gmail.com>
To: plug@lists.phillylinux.org
Sent: Saturday, August 30, 2014 8:55:12 AM
Subject: Re: [PLUG] Image-based partial backup?

What I would probably do is simple and a bit hack-ish, but would
certainly do the trick, without relying on specialized software, and it
would also be filesystem-agnostic.

First, I'd prepare a text list of the files to be excluded. This (or
something like it) is probably an equivalent task to whatever solution
you will use.

I'd then make a full copy of the image, with dd (or ddrescue) or
similar. This obviously includes the excluded files.

After that, I'd simply mount the backup image and use the list of files
to be excluded as an argument with rsync's --exclude-from=FILE flag, and
also include the --delete flag to erase the files on the backup that are
excluded. Optionally, the mounted backup image can then have the
deletions overwritten with zerofill or similar, or even just good old
'dd if=/dev/zero of={$mountedbackup/zero.tmp} ; rm $mountedbackup/zero.tmp'.

After this, if you keep (and update) the exclusion list, simple rsync
updates are all that's needed.

On 08/30/2014 08:10 AM, Eric at Lucii.org wrote:
> On 08/29/2014 10:47 PM, Rich Freeman wrote:
>> Does anybody know the best way to do an image-based backup which excludes files?  I'm thinking about something like clonezilla.
>>
>> I realize that an image-based solution might have fundamental limitations.  I'm perfectly fine with a restored backup containing the excluded files but with zeroed-out content.  I can clean that up easily enough after restore.  I just want something that is going to restore the OS without my having to reinstall everything.
>>
>> Oh, and I'd like to be able to do this on NTFS and not just traditional linux filesystems.  The backup process should not modify the hard drives.
>>
>> I already looked at clonezilla to see if I could extend the existing logic that excludes swap files.  The thing is, that logic actually DELETES the swapfile from the drive to be backed up (which is a bit messed up if you ask me).  Obviously I can't use that as a general exclude function.
>>
>> Is there anything out there that does this out of the box, including for NTFS?  Ideally it should support running on clients via PXE boot, and be flexible about storing to a networked location (nfs, ssh, etc).
>>
>> -- Rich
> 
> 
> Rich, does it *have* to be an image?
> 
> I used http://www.mondorescue.org/ last year in a project and
> it is great.  It does not take an image but rather maps the hard
> drive and stores the files.  You can specify which files it saves so
> skip the /home /share if you want... you can tailor it to do exactly
> what you need.  It's geared toward making a bootable iso (or multiple)
> to rescue your system.
> 
> When restoring, it uses it's map of the hard drive to partition
> and format the new HD (if you choose) and restores your system.
> When you are restoring you can drop into a shell and edit things so,
> for example, you can have it restore a 150 GB drive onto a 500 GB drive
> and (re)construct the new partitions exactly as you want.  It's very
> flexible.
> 
> I use it to create restore DVDs for some test stations and also to
> re-build some test stations that had been improperly built:
>    single disk test station ->  Mondo rescue backup DVDs
>    add hard drive to test station
>    Mondo restore (w/edit) -> same test station but now with RAID 0
> 
> The community was helpful and friendly.  A member of this list was
> especially helpful to me in dealing with the Solaris/SPARC side of
> the project and the project was a success.
> 
> Recommend you investigate Mondo Rescue.
> 
> Eric
> 


___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug