Hello John, <br><br><div class="gmail_quote">On Mon, Oct 31, 2011 at 2:27 AM, John Moser <span dir="ltr"><<a href="mailto:john.r.moser@gmail.com">john.r.moser@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
The simple way to create a restore point system ...<br>
<br>
... is to mount / as an overlay FS, which you periodically merge (to<br>
remove prior restore points), condense into a squashfs (to take a<br>
point backup), or wipe (to restore to backup). This of course means<br>
/home should be its own partition.<br></blockquote><div>I think this is the idea used by nexenta by mounting / on a ZFS partition, Can a similar approach used for ubuntu ? But that needs / to be mounted on a brtfs filesystem, Does that need a thorough reinstall of the system ? </div>
<div>This approach along with package saved state can help to create a break free upgrade mechanism as is done in nexenta currently.</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5"><br>
On Sun, Oct 30, 2011 at 4:40 PM, Bear Giles <<a href="mailto:bgiles@coyotesong.com">bgiles@coyotesong.com</a>> wrote:<br>
> You need to either have a local repository or download from the internet<br>
> again. I've used 'apt-mirror' in the past to maintain a local cache but that<br>
> was when I was building local systems with a minimal Debian installer. I<br>
> don't even know if the standard Ubuntu installer can load off a local cache.<br>
> (I guess the process is to do the install "without updates", change your<br>
> sources.list files, then upgrade from the cache.)<br>
><br>
> It's also worth remembering that the specific versions of your packages may<br>
> not be available when you need to restore your system. This is usually a<br>
> good thing since more recent versions have a shot at preventing whatever<br>
> caused you to lose your system in the first place (e.g., closing<br>
> vulnerabilities) but some people may need to restore the system exactly.<br>
> On checksums - I checked my system and almost none of the conffiles have<br>
> checksums. (In fact that may be against packaging standards - I would have<br>
> to check.) That's a bummer since it means that there's no easy way of seeing<br>
> what's changed unless you peek into the .deb file. There are some deb tools<br>
> that can do this but since I can do it programmatically I usually just did<br>
> that.<br>
> The 'monster diff' is just a comment on the number of files involved. What I<br>
> actually did create two lists, one generated by walking the filesystem and<br>
> the other generated by concatenating all of the *.files and *.md5sums<br>
> metadata and then comparing them. I did this programmatically but you could<br>
> also create actual files, sort them, and then run a diff on them. IIRC I<br>
> typically had over 70k files.<br>
> On Fri, Oct 28, 2011 at 3:33 AM, Gaurav Saxena <<a href="mailto:grvsaxena419@gmail.com">grvsaxena419@gmail.com</a>><br>
> wrote:<br>
>><br>
>> Hello all<br>
>><br>
>> On Fri, Oct 7, 2011 at 4:45 AM, Bear Giles <<a href="mailto:bgiles@coyotesong.com">bgiles@coyotesong.com</a>> wrote:<br>
>>><br>
>>> I've written a few prototypes and this comes down to four issues. Some of<br>
>>> the details below are debian/ubuntu-specific but the same concepts will<br>
>>> apply to redhat.<br>
>>><br>
>>> 1. User data (/home) must be backed up explicitly. (ditto server data on<br>
>>> servers).<br>
>>> 2. Packages should NOT be backed up. All you need is the package name and<br>
>>> version. Reinstall from .deb and .rpm if necessary since this way you're<br>
>>> sure that you never restore compromised files.<br>
>><br>
>> But it might be possible that the package files are not available on the<br>
>> system. That means for all the packages installed the .deb files need to be<br>
>> downloaded from the internet for restore purpose ?<br>
>>><br>
>>> 3. Configuration data (/etc) must be backed up explicitly. This is tricky<br>
>>> because backing up the entire directory will cause its own problems. Worse,<br>
>>> some applications keep their configuration files elsewhere. The best<br>
>>> solution I've found is to scan the package metadata to identify<br>
>>> configuration files and to only save those with a different checksum than<br>
>>> the standard file.<br>
>><br>
>> Ok. Nice idea indeed , but is there checksum associated with the files in<br>
>> the package ? Or that can be calculated at the time of restore ? What you<br>
>> say ?<br>
>><br>
>>><br>
>>> 4. Local files. Ideally everyone would keep these files under /usr/local<br>
>>> and /opt but that's rarely the case. The best solution I've found is to scan<br>
>>> the debian package metadata and do a monster diff between what's on the<br>
>>> filesystem under /bin, /sbin, /usr and (chunks of) /var with what's in the<br>
>>> metadata.<br>
>><br>
>> Could you suggest me some way of scanning the debian package metadata<br>
>> without actually downloading the packages? and how to this monster diff ?<br>
>>><br>
>>> It's worth noting that the last item isn't that hard if you have a strict<br>
>>> security policy that everything under those directories MUST be in a<br>
>>> package. It's deleted without a second thought if it's not. You can still do<br>
>>> everything you could before, you just need to create a local package for it.<br>
>>> So what do you do with this? The best solution, which I haven't<br>
>>> implemented yet, is to handle #2 and #3 with autogenerated packages. You set<br>
>>> up one or more local packages that will install the right software and then<br>
>>> overwrite the configuration files. You can fit everything, including<br>
>>> original package archive, on a single DVD.<br>
>><br>
>> Could you please tell some detail about autogenerated packages ? Like if<br>
>> we have a list of packages installed on the system, We need to reinstall<br>
>> those all softwares and remove those which are installed after the restore<br>
>> point?<br>
>>><br>
>>> BTW Debian has a C++ interface to the package metadata. I've never used<br>
>>> it - I find it easier to just scan the metadata directory myself. There's<br>
>>> also hooks that will allow your application to be called at each step during<br>
>>> a package installation or removal. You could, in theory, keep your snapshots<br>
>>> current to the last minute that way.<br>
>><br>
>> So whenever a package is installed or removed I will update my backup<br>
>> according to that ? By reading package metadata determine which files are<br>
>> changed by that package and update those files in the backup ?<br>
>>><br>
>>> On Fri, Sep 30, 2011 at 12:01 AM, Gaurav Saxena <<a href="mailto:grvsaxena419@gmail.com">grvsaxena419@gmail.com</a>><br>
>>> wrote:<br>
>>>><br>
>>>> Hello Aaron<br>
>>>> Thanks a lot for your quick reply.<br>
>>>><br>
>>>> On Fri, Sep 30, 2011 at 10:03 AM, Aaron C. de Bruyn <<a href="mailto:aaron@heyaaron.com">aaron@heyaaron.com</a>><br>
>>>> wrote:<br>
>>>>><br>
>>>>> In Windows, the ability to snapshot is built into the filesystem.<br>
>>>>> In Linux, you must be running a filesystem that supports snapshots. I<br>
>>>>> know LVM supports snapshotting and I believe BRTFS has support, but<br>
>>>>> other than that I'm not sure.<br>
>>>>><br>
>>>> Yes I read the logic behind windows system restore. But I think we can<br>
>>>> take some other approach for this, that will be better as all users won't be<br>
>>>> able to spare an extra partition formatted brtfs.<br>
>>>><br>
>>>>><br>
>>>>> Basically, your program would have to check the file system that is<br>
>>>>> used on the computer (remember Linux can have many types of file<br>
>>>>> systems mounted at the same time), then (in the case of LVM) make sure<br>
>>>>> there's enough free space to snapshot, and finally take the snapshot.<br>
>>>>><br>
>>>> Ok. Do I have to snapshot the whole system partition / important system<br>
>>>> files to the brtfs partition ?<br>
>>>><br>
>>>>><br>
>>>>> When the snapshots start filling up, you would either need to delete<br>
>>>>> them or detect the low space and resize them.<br>
>>>>><br>
>>>>> In my personal opinion, snapshotting in Linux is currently a pain in<br>
>>>>> the rear. It sounds like BTRFS could change that, but it's still a<br>
>>>>> ways off.<br>
>>>>><br>
>>>> Ok. I will try another approach that will be better as suggested by<br>
>>>> people here.<br>
>>>><br>
>>>>><br>
>>>>> -A<br>
>>>>><br>
>>>>> On Thu, Sep 29, 2011 at 21:00, Gaurav Saxena <<a href="mailto:grvsaxena419@gmail.com">grvsaxena419@gmail.com</a>><br>
>>>>> wrote:<br>
>>>>> > Hello all,<br>
>>>>> > I want to write a windows system restore like program for ubuntu ,<br>
>>>>> > which<br>
>>>>> > will have options for creating restore points for the system and then<br>
>>>>> > restoring it back to that point. Also I will as an extension provide<br>
>>>>> > support<br>
>>>>> > for older version of a file as is in windows currently. I need your<br>
>>>>> > help to<br>
>>>>> > find how to start with this in ubuntu. I know that I have to snapshot<br>
>>>>> > the<br>
>>>>> > system when creating a restore point and then restore it. I need some<br>
>>>>> > starting pointers so that I can start doing this work. Also if this<br>
>>>>> > has<br>
>>>>> > already been done please inform me. I got this idea from<br>
>>>>> > <a href="https://wiki.ubuntu.com/SystemRestore" target="_blank">https://wiki.ubuntu.com/SystemRestore</a>.<br>
>>>>> > --<br>
>>>>> > Thanks and Regards ,<br>
>>>>> > Gaurav<br>
>>>>> ><br>
>>>>> > --<br>
>>>>> > Ubuntu-devel-discuss mailing list<br>
>>>>> > <a href="mailto:Ubuntu-devel-discuss@lists.ubuntu.com">Ubuntu-devel-discuss@lists.ubuntu.com</a><br>
>>>>> > Modify settings or unsubscribe at:<br>
>>>>> > <a href="https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss" target="_blank">https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss</a><br>
>>>>> ><br>
>>>>> ><br>
>>>><br>
>>>><br>
>>>><br>
>>>> --<br>
>>>> Thanks and Regards ,<br>
>>>> Gaurav<br>
>>>><br>
>>>><br>
>>>><br>
>>>> --<br>
>>>> Thanks and Regards ,<br>
>>>> Gaurav<br>
>>>><br>
>>>> --<br>
>>>> Ubuntu-devel-discuss mailing list<br>
>>>> <a href="mailto:Ubuntu-devel-discuss@lists.ubuntu.com">Ubuntu-devel-discuss@lists.ubuntu.com</a><br>
>>>> Modify settings or unsubscribe at:<br>
>>>> <a href="https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss" target="_blank">https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss</a><br>
>>>><br>
>>><br>
>><br>
>><br>
>><br>
>> --<br>
>> Thanks and Regards ,<br>
>> Gaurav<br>
><br>
><br>
> --<br>
> Ubuntu-devel-discuss mailing list<br>
> <a href="mailto:Ubuntu-devel-discuss@lists.ubuntu.com">Ubuntu-devel-discuss@lists.ubuntu.com</a><br>
> Modify settings or unsubscribe at:<br>
> <a href="https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss" target="_blank">https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss</a><br>
><br>
><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Thanks and Regards ,<br>Gaurav<br>