Ubuntu QA:
BlogBrainstormPackage status
Log in
Ubuntu QA
The Ubuntu community has contributed 21986 ideas, 135057 comments, 2615221 votes
Idea sandbox Idea sandbox
Popular ideas Popular ideas
Ideas in development Ideas in development
Implemented ideas Implemented ideas
Idea #15048: Backups of critical files

Written by ardchoille42 the 31 Oct 08 at 09:49. Related project: Live CD installer. Status: New
Rationale
For the past few years I have been helping out in #ubuntu and #kubuntu on the Freenode network. Sitting in these channels I have seen many things and helped solve many problems. I have an idea that I feel would be of great help in assisting users in solving certain problems.

When installing or upgrading Ubuntu/Kubuntu/Xubuntu, the installer, perhaps as a final step, should make backups (maybe call them "masters") of critical files such as /etc/X11/xorg.conf and /etc/sudoers. Then, if a new user happens to destroy them, it's a simple matter of getting into the file system, say with a livecd, or single user, and copying the "master" back to its original location - overwriting the errant or missing file. These "master" files could even be buried somewhere the user wouldn't normally go. The installer could even "chattr +i" (immutable) the master files so that they can't be deleted using sudo - maybe even with a special file extension that sudo can't delete. A system might be put into place, say with cron, to overwrite the master with an updated copy of a known-good version - in case sudoers is updated. Maybe this could be done with some kind of file change detection but immediately replacing the master would defeat the whole purpose if a new user were to lock him/her self out of sudoers.

Possible candidates for the "master" category:
/boot/grub/menu.lst
/etc/apt/sources.list
/etc/fstab
/etc/sudoers
/etc/X11/xorg.conf

I feel that this would go a long way in assisting people in solving problems related to critical files.
Tags: backup

69
votes
up equal down
Solution #1: Auto-generated solution of idea #15048
Written by ardchoille42 the 31 Oct 08 at 09:49.
Ubuntu Brainstorm was updated in January 2009. Since the idea #15048 was submitted before this update, its rationale and solution are not separated. Please vote accordingly, and if you have the necessary rights, please separate the rationale from the solution. Thanks!

Propose your solution

Attachments
No attachments.


Duplicates


Comments
v1nce wrote on the 31 Oct 08 at 18:47
Question is what is a critical file ?

zarg wrote on the 31 Oct 08 at 18:51
At least creating a folder with "master copies" of a few important files right after installation wouldn't hurt ... :-)

ardchoille42 wrote on the 31 Oct 08 at 23:46
@v1nce: That is a very good question and one which is probably better left to the developers to answer as they would be the ones who know the most about the system. At any rate, I feel that /etc/X11/xorg.conf and /etc/sudoers would automatically fall into the "critical" category as those two files can leave a new system completely unusable, and I'm sure there are other files which would fall into this category.

Squichie wrote on the 1 Nov 08 at 02:15
Yes. If at the very least, backup those 2. Xorg backups tend to be my lifeline~

ardchoille42 wrote on the 1 Nov 08 at 02:37
I've added a list of possible candidates to the body of the idea above, but I'm sure there are more.

CydeWeys wrote on the 8 Nov 08 at 02:24
I like it. I've definitely been bitten by the xorg.conf thing before, and this is a really easy feature to add. We're talking a couple of lines of really easy shell script.

ardchoille42 wrote on the 24 Feb 10 at 18:20
One of the first things I do after a fresh install is (depending on the Ubuntu release):

sudo mkdir /etc/master_copies
sudo cp /etc/fstab /etc/apt/sources.list /etc/sudoers /etc/X11/xorg.conf /etc/default/grub /boot/grub/grub.cfg /etc/master_copies/

Auzy wrote on the 25 Feb 10 at 03:47
I think this is a poor solution.. What we actually need is a full snapshotting/backup system (or Copy on Write system), so that users can revert their system to its state from a previous day.

Do it properly (as Microsoft, Apple and Sun are doing), or don't bother at all. We shouldn't lull users into a false sense of security



Post your comment