Unix Technical Forum

Essential backup directories

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 ...


Go Back   Unix Technical Forum > Unix Operating Systems > Debian Linux > Debian Linux support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-19-2008, 08:44 AM
Michael Hopkins
 
Posts: n/a
Default 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
_/ _/ _/ _/
_/_/_/_/ _/_/_/ http://www.hopkins-research.com/
_/ _/ _/ _/
_/ _/ _/ _/ 'touch the future'

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-19-2008, 08:44 AM
anahata
 
Posts: n/a
Default Re: Essential backup directories

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-19-2008, 08:44 AM
Martin Gregorie
 
Posts: n/a
Default Re: Essential backup directories

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 |
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-19-2008, 08:44 AM
Michael C.
 
Posts: n/a
Default 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:
>
>
> 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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 01-19-2008, 08:44 AM
Simon Waters
 
Posts: n/a
Default Re: Essential backup directories

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).
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 01-19-2008, 08:44 AM
Darren Salt
 
Posts: n/a
Default Re: Essential backup directories

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?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 01-19-2008, 08:44 AM
ray
 
Posts: n/a
Default Re: Essential backup directories

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.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 01-19-2008, 08:44 AM
Roger Leigh
 
Posts: n/a
Default Re: Essential backup directories

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)

iD8DBQFEXStkVcFcaSW/uEgRAsDQAKC/y848CZYrr5KJP6ipgUycI5pB/wCeLXsv
i2QnhuIHyypPbSfvYq63bxI=
=IWWI
-----END PGP SIGNATURE-----
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 01-19-2008, 08:44 AM
Nix
 
Posts: n/a
Default Re: Essential backup directories

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 01-19-2008, 08:44 AM
Stephen Chadfield
 
Posts: n/a
Default Re: Essential backup directories

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/
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:19 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com