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

Re: Best way of restoring /etc from backups after fresh install?



--- On Sat, 6/6/09, Andrei Popescu <andreimpopescu@gmail.com> wrote:
> Seems to me like you tried to restore more than just /etc

I did. :)  I reinstalled the full system: personal data and customized settings from my backup, and the installed packages from the Debian archives, automatically from a backed-up list file generated by aptitude search '~i!~M'.
 
[edited my own quote for clarity]
> - restore /etc before installing the packages
> - install etckeeper, install all packages, restore 
>     /etc from backups
> - install packages, restore everything in /etc except
>     passwd, shadow and group
> 
> Why not restore those as well?

When the packages are installed from scratch, some of them create their own user accounts to operate from (such as postfix, hal, gdm, logcheck). The directories are chowned during installation to these user ids, and they'll end up belonging to the wrong users if I owerwrite passwd, shadow and group with the backed up copies having different numerical ids for the corresponding user names (there are different ids since I did the original config manually, installing and configuring packages as I slowly built and secured the installation, not everything at once like now). I assume the user ids are dynamically generated during install - I have no other idea for how the lock directories ended up with the wrong owner.  I found an old Debian bug report from 2003 about logcheck reporting it had the wrong owners on its config directories, but it was also fixed back then.

> I don't have that much experience with restoring (I like
> the opportunity 
> to start fresh), but options 2 and 3 sound good to me

I configured everything over many months, no way I start that again... :) After reading the debconf manual, I think the first option might also work, provided I set DEBIAN_FRONTEND to "noninteractive" (I hope the defaults are to leave the existing config alone, not really sure).  I think I like the etckeeper way the most, since it'll give me a complete overview of what changed in /etc not just now, but also in the future if something breaks.  Yep, I thought about this the whole night... :)

> There are ways to follow the list without being subscribed
> (gmane, 
> googlegroups, ...)
 
Yes, you're right.  Debian's Mailing List Archives are not bad either. The big problem is that the Yahoo web interface doesn't seem to allow custom mail headers, such as the "In-Reply-To" used by the mailing list (or maybe it just doesn't show it?).  Unfortunately, this seems to have touched a sensitive chord with some people, although I didn't mean it in a bad way...

Thanks, this was really helpful, I'll give it a try.

Best regards,
Laurentiu





Reply to: