This is a discussion on Essential backup directories within the Debian Linux support forums, part of the Debian Linux category; --> Hi all Fairly new to Debian/Ubuntu server and wanting to backup the essential directories (with rsync and cron or ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi all Fairly new to Debian/Ubuntu server and wanting to backup the essential directories (with rsync and cron or possibly compressed) to a smaller backup disk so that, if the worst happens, a system rebuild won't be too painful. The obvious ones are: /etc /home /usr/local ...but are there any others that I should know about? Particularly thinking about the apt-get database etc. Would like to be able to use apt-get and related tools to rebuild the whole system setup as easily as possible. Feel free to CC direct to my email - TIA Michael _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ _/ _/ _/_/_/ Hopkins Research Ltd _/ _/ _/ _/ _/_/_/_/ _/_/_/ http://www.hopkins-research.com/ _/ _/ _/ _/ _/ _/ _/ _/ 'touch the future' _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ |
| |||
| Michael Hopkins wrote: > Fairly new to Debian/Ubuntu server and wanting to backup the essential > directories (with rsync and cron or possibly compressed) to a smaller backup > disk so that, if the worst happens, a system rebuild won't be too painful. > > The obvious ones are: > > /etc > /home > /usr/local > > ..but are there any others that I should know about? Particularly thinking > about the apt-get database etc. Would like to be able to use apt-get and > related tools to rebuild the whole system setup as easily as possible. dpkg --get-selections >selections.list Will make a text file listing all the packages you have installed. Back up that text file and you can use it to rebuild a system (or clone it on another box) with the commands: dpkg --get-selections <selections.list dselect install That will install the latest versions of everything from whatever sources you have chosen in /etc/apt/sources.list. There may be better ways but that one's fairly simple to understand, which suits me :-) -- Anahata anahata@treewind.co.uk -+- http://www.treewind.co.uk Home: 01638 720444 Mob: 07976 263827 |
| |||
| Michael Hopkins wrote: > > ..but are there any others that I should know about? Particularly thinking > about the apt-get database etc. Would like to be able to use apt-get and > related tools to rebuild the whole system setup as easily as possible. > A trick I use is to copy the contents of /usr/local to /home/local and then replace /usr/local with a symlink to /home/local. Search paths work as usual because the search crosses symlinks. Doing this gives one less directory structure to back up and stops a fresh install from overwriting it. In any case /usr/local contains a set of empty directories after the installation of every distro I've seen. Depending on what packages you have installed and which distro you're using you may want to back up at least part of /var too. In FC4 the following are held in /var: - mailboxes filled by sendmail or postscript are in /var/spool/mail - the root of Apache's HTML storage structure is in /var/www - named's zone files are in /var/named -- martin@ | Martin Gregorie gregorie. | Essex, UK org | |
| |||
| ["Followup-To:" header set to alt.os.linux.debian.] On Sat, 06 May 2006 14:43:04 +0100, Michael Hopkins <michael.hopkins@hopkins-research.com> wrote: > > > Hi all > > Fairly new to Debian/Ubuntu server and wanting to backup the essential > directories (with rsync and cron or possibly compressed) to a smaller backup > disk so that, if the worst happens, a system rebuild won't be too painful. > > The obvious ones are: > > /etc > > /home > > /usr/local > > ..but are there any others that I should know about? Particularly thinking > about the apt-get database etc. Would like to be able to use apt-get and > related tools to rebuild the whole system setup as easily as possible. Though it changes infrequently, I'd add /boot if you use grub. You'll definately want /var, though not necessarily all of it's subdirectories. Michael C. -- mcsuper5@usol.com http://mcsuper5.freeshell.org/ Most people are dumb as bricks; some people are dumber than that. -- Lyle |
| |||
| On Sat, 06 May 2006 14:43:04 +0100, Michael Hopkins wrote: > Fairly new to Debian/Ubuntu server and wanting to backup the essential > directories (with rsync and cron or possibly compressed) to a smaller backup > disk so that, if the worst happens, a system rebuild won't be too painful. It may be one companies marketing, but there is much wisdom at; http://www.taobackup.com/ If your backup system really has too little capacity, and you can't afford better, perhaps the question should be "which directories/files can I safely omit". As long as the machine is always patched up to date, any file that matches its checksum stored in the deb, can be easily restored from the original source media. Although this does make several assumptions about the environment you wish to restore it in, such as access to the source media (so often the Internet these days). |
| |||
| I demand that Simon Waters may or may not have written... [snip] > If your backup system really has too little capacity, and you can't afford > better, perhaps the question should be "which directories/files can I > safely omit". /dev /proc /sys /tmp /var/backups (probably) /var/cache /var/games (probably) /var/lock /var/log (maybe keep files whose names don't end in .gz or a number) /var/run /var/spool /var/tmp And the content of any directory which is immediately below a mount point and is named lost+found. [snip] -- | Darren Salt | d @ youmustbejoking,demon,co,uk | nr. Ashington, | Toon | RISC OS, Linux | s zap,tartarus,org | Northumberland | Army | Say NO to UK ID cards. http://www.no2id.net/ Daddy, what does "Formatting drive C:" mean? |
| |||
| On Sat, 06 May 2006 14:43:04 +0100, Michael Hopkins wrote: > > > Hi all > > Fairly new to Debian/Ubuntu server and wanting to backup the essential > directories (with rsync and cron or possibly compressed) to a smaller backup > disk so that, if the worst happens, a system rebuild won't be too painful. > > The obvious ones are: > > /etc > > /home > > /usr/local > IMHO - /home is the essential one. Doing another install is a trivial task. |
| |||
| On Sat, 06 May 2006, Martin Gregorie spake: > Michael Hopkins wrote: >> >> ..but are there any others that I should know about? Particularly thinking >> about the apt-get database etc. Would like to be able to use apt-get and >> related tools to rebuild the whole system setup as easily as possible. >> > A trick I use is to copy the contents of /usr/local to /home/local and > then replace /usr/local with a symlink to /home/local. Search paths > work as usual because the search crosses symlinks. Doing this gives > one less directory structure to back up and stops a fresh install from > overwriting it. In any case /usr/local contains a set of empty > directories after the installation of every distro I've seen. I'd use mount --bind rather than a symlink, myself: find(1) and many other tools do not cross symlinks without explicit request. -- `On a scale of 1-10, X's "brokenness rating" is 1.1, but that's only because bringing Windows into the picture rescaled "brokenness" by a factor of 10.' --- Peter da Silva |
| ||||
| ray <ray@zianet.com> wrote: > On Sat, 06 May 2006 14:43:04 +0100, Michael Hopkins wrote: >> Fairly new to Debian/Ubuntu server and wanting to backup the essential >> directories (with rsync and cron or possibly compressed) to a smaller backup >> disk so that, if the worst happens, a system rebuild won't be too painful. >> >> The obvious ones are: >> >> /etc >> /home >> /usr/local > > IMHO - /home is the essential one. Doing another install is a trivial task. "/etc" is useful for saving all those configurations you have spent *hours* perfecting. I would get an external USB disk and make regular copies of all my partitions. I do this and also have multiple copies on DVD of *really* important stuff like my digital photographs stashed in various locations. -- Stephen Chadfield http://www.chadfield.com/ |