David Z on 30 Aug 2014 05:55:30 -0700


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

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
> 

Attachment: signature.asc
Description: OpenPGP digital signature

___________________________________________________________________________
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