Ask a Question related to Ubuntu, Design and Development.
-
Michael Hopkins #1
Essential backup directories
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
_/ _/ _/ _/
_/_/_/_/ _/_/_/ [url]http://www.hopkins-research.com/[/url]
_/ _/ _/ _/
_/ _/ _/ _/ 'touch the future'
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
Michael Hopkins Guest
-
The book on essential systems administration
Hi, all: As a student of the system administration field, which I'm hoping to get into that field with certification, classes, practice, I came... -
Essential Perl Modules
I've been developing small scripts in Perl for a while now, and would like to think that I have a pretty good grasp of the fundamentals. I've... -
Using virtual directories for common directories (scripts, images, styles, etc.)
Hi, (sorry for the crosspost, I wasn't sure which was the best place to put this). I was just thinking about something and wondered if any of... -
essential extensions- php?
Hi All Keeping in mind that I'm a beginner at using DMX with php/mysql, what are the basic/essential extensions I should install? So far I've... -
loop - begin backup, end backup Oracle 8.1.7
Hello, we have the problem named after: last weekend (22.12.2002), we did a reorganisation of a tablespace with the tool "sapdba" from SAP.... -
Martin Gregorie #2
Re: Essential backup directories
Michael Hopkins wrote:
A trick I use is to copy the contents of /usr/local to /home/local and>
> ..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.
>
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 |
Martin Gregorie Guest
-
Michael C. #3
Re: Essential backup directories
["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:Though it changes infrequently, I'd add /boot if you use grub.>
>
> 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.
You'll definately want /var, though not necessarily all of it's
subdirectories.
Michael C.
--
[email]mcsuper5@usol.com[/email] [url]http://mcsuper5.freeshell.org/[/url]
Most people are dumb as bricks; some people are dumber than that. -- Lyle
Michael C. Guest
-
Simon Waters #4
Re: Essential backup directories
On Sat, 06 May 2006 14:43:04 +0100, Michael Hopkins wrote:
It may be one companies marketing, but there is much wisdom at;> 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.
[url]http://www.taobackup.com/[/url]
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).
Simon Waters Guest
-
Darren Salt #5
Re: Essential backup directories
I demand that Simon Waters may or may not have written...
[snip]/dev> 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".
/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. [url]http://www.no2id.net/[/url]
Daddy, what does "Formatting drive C:" mean?
Darren Salt Guest
-
ray #6
Re: Essential backup directories
On Sat, 06 May 2006 14:43:04 +0100, Michael Hopkins wrote:
IMHO - /home is the essential one. Doing another install is a trivial task.>
>
> 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
>
ray Guest
-
Roger Leigh #7
Re: Essential backup directories
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
iD8DBQFEXStkVcFcaSW/uEgRAsDQAKC/y848CZYrr5KJP6ipgUycI5pB/wCeLXsv
i2QnhuIHyypPbSfvYq63bxI=
=IWWI
-----END PGP SIGNATURE-----
Roger Leigh Guest
-
Nix #8
Re: Essential backup directories
On Sat, 06 May 2006, Martin Gregorie spake:
I'd use mount --bind rather than a symlink, myself: find(1) and many> Michael Hopkins wrote:> A trick I use is to copy the contents of /usr/local to /home/local and>>
>> ..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.
>>
> 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.
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
Nix Guest
-
Stephen Chadfield #9
Re: Essential backup directories
ray <ray@zianet.com> wrote:
"/etc" is useful for saving all those configurations you have spent> 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.
*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
[url]http://www.chadfield.com/[/url]
Stephen Chadfield Guest
-
ray #10
Re: Essential backup directories
On Sun, 07 May 2006 00:04:01 +0100, Roger Leigh wrote:
A few months ago I had a hard disk go bad. The entire sequence of events> ray <ray@zianet.com> writes:
>>>> 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.
>> IMHO - /home is the essential one. Doing another install is a trivial task.
> It's not usually trivial. On a system that has been in any real use
> for any length of time, there will be endless customisations you'll
> have made, lots of extra software installed, and recreating the old
> setup from scratch will be difficult, since the base install will need
> a lot of work. As a result, you'll need to save /etc and the package
> manager's package list in order to recreate it. Some parts of /var
> are also useful here in some cases (e.g. PostgreSQL databases).
>
> For user data, you'll need /home, but nowadays you'll also likely need
> to backup /srv as well for your system's data (databases, websites,
> shared data, CVS/SVN/TLA/BZR RCS data, chroots, etc.)
>
>
> I back up:
> $(dpkg --get-selections)
> /etc
> /home
> /srv
> /var/lib
>
> I blat it over the network onto a set of Zip discs, since I don't have
> a tape drive.
>
> To back up to another system, rsync is OK. You might want to look at
> Amanda backup to tape if you want a decent backup system.
>
>
> Regards,
> Roger
that followed consisted of:
1) get a new disk and install.
2) install Elive to new disk.
3) boot Elive - and copy needed partitions from hard disk -
basically the entire distro from two different installs - to files on the
new disk.
4) mount partition copies on loop device to check for data retrieval - all
there.
5) add Ubuntu and complete set-up. I had been running Mandrake and was
going to be doing an upgrade soon anyway.
ray Guest
-
Michael Hopkins #11
Re: Essential backup directories
On 7/5/06 16:01, in article [email]pan.2006.05.07.15.01.33.728604@zianet.com[/email], "ray"
<ray@zianet.com> wrote:
Thanks to all for ideas.> On Sun, 07 May 2006 00:04:01 +0100, Roger Leigh wrote:
>>>> ray <ray@zianet.com> writes:
>>>>>>> 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.
>>>
>>> IMHO - /home is the essential one. Doing another install is a trivial task.
>> It's not usually trivial. On a system that has been in any real use
>> for any length of time, there will be endless customisations you'll
>> have made, lots of extra software installed, and recreating the old
>> setup from scratch will be difficult, since the base install will need
>> a lot of work. As a result, you'll need to save /etc and the package
>> manager's package list in order to recreate it. Some parts of /var
>> are also useful here in some cases (e.g. PostgreSQL databases).
>>
>> For user data, you'll need /home, but nowadays you'll also likely need
>> to backup /srv as well for your system's data (databases, websites,
>> shared data, CVS/SVN/TLA/BZR RCS data, chroots, etc.)
>>
>>
>> I back up:
>> $(dpkg --get-selections)
>> /etc
>> /home
>> /srv
>> /var/lib
>>
>> I blat it over the network onto a set of Zip discs, since I don't have
>> a tape drive.
>>
>> To back up to another system, rsync is OK. You might want to look at
>> Amanda backup to tape if you want a decent backup system.
>>
>>
>> Regards,
>> Roger
> A few months ago I had a hard disk go bad. The entire sequence of events
> that followed consisted of:
>
> 1) get a new disk and install.
> 2) install Elive to new disk.
> 3) boot Elive - and copy needed partitions from hard disk -
> basically the entire distro from two different installs - to files on the
> new disk.
> 4) mount partition copies on loop device to check for data retrieval - all
> there.
> 5) add Ubuntu and complete set-up. I had been running Mandrake and was
> going to be doing an upgrade soon anyway.
>
>
M
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
_/ _/ _/_/_/ Hopkins Research Ltd
_/ _/ _/ _/
_/_/_/_/ _/_/_/ [url]http://www.hopkins-research.com/[/url]
_/ _/ _/ _/
_/ _/ _/ _/ 'touch the future'
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
Michael Hopkins Guest
-
Lennart #12
Re: Essential backup directories
Michael Hopkins wrote:
Here's how:> Would like to be able to use apt-get and
> related tools to rebuild the whole system setup as easily as possible.
>
Keep /home, /etc (maybe /usr/local) and all data (like databases and web
documents) on separate partitions (and back them up). Keep a list of
installed packages on a safe spot - create it with:
dpkg --get-selections > /some/safe/spot/package_list.txt
A reinstall is then really trivial and fast: do a ubuntu server install,
at partitioning stage wipe other partitions but keep /home /etc and data
partitions intact, finish installation and then select all packages using:
dpkg --set-selections < /some/safe/spot/package_list.txt
Then run dselect to install the selected packages and voila, you have a
fresh system with all apps, settings and data intact. :)
Lennart
Lennart Guest



Reply With Quote

