LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Backing up debian

[ILUG] Backing up debian

Rick Moen rick at linuxmafia.com
Sat Jun 4 21:07:28 IST 2005


Quoting Colin O'Keeffe (ilugcolin at gmail.com):

> Is there a way to backup important debian files like X settings and
> kernel image incase I break something ?

Well, I sometimes make a safety copy of /etc like this:

# cd /etc
# tar cvzf etc-$(date --iso-8601).tar.gz /etc

The resulting tarball's tiny enough to fit on {shudder} a floppy, if
need be.

I'm not clear on why you'd need/want to keep a copy of a kernel _image_.
You would certainly want to keep a copy of your kernel .config file, if
you compile your own.

What you might want to make a safety copy of is your current list of
installed packages:

     # dpkg --get-selections >selections.txt

And get their current versions:

     # COLUMNS=150 dpkg -l > packages.txt

> Also , where is the package list stored on a machine or does it fetch
> it from the server ?

The _available_ packages list is stored as text file
/var/lib/dpkg/available, mashed down from the individual package
repositories' Packages[.gz] files fetched to /var/lib/apt/lists .  
(There's also a binary index somewhere to speed up reads, generated
dynamically as needed.)  The _installed_ packages are recorded in
/var/lib/dpkg/status -- and I believe that's likewise hashed
dynamically, somewhere.

But doing the above commands, honestly, gets you what you need to make a
copy of.  Because, given "selections.txt", you can rebuild your system, 
not including local customisations and data files, from a minimal Debian
Base System install plus this:

# dpkg --set-selections <selections.txt
# apt-get -u dist-upgrade
  (or maybe "apt-get dselect-upgrade" might be better -- same idea,
  anyway)




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell