Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to upgrade my Debian lenny to squeeze but as I'm doing it for the first time I was thinking how to create the backup mentioned in the release notes:

The main things you'll want to back up are the contents of /etc, /var/lib/dpkg, /var/lib/apt/extended_states and the output of dpkg --get-selections "*" (the quotes are important). If you use aptitude to manage packages on your system, you will also want to back up /var/lib/aptitude/pkgstates.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

rsync to copy the data to another machine, or tar up those directories and then just copy that file somewhere else.

The key thing is that once you've starting migrating to Squeeze, if it goes really badly, you're better off trashing your server and just installing Squeeze and putting your data back.

For that you need,

  1. a complete list of what's installed (dpkg --get-selections)
  2. how everything is configured (mostly /etc)
  3. a copy of all your user data (/home, /srv, /var in some cases)
  4. knowledge of how to put it back together

So it's not enough just to do what the Debian docs suggest, you need to secure all your data and now how to rebuild the server from scratch (IMO).

share|improve this answer
    
The Debian docs already seem scary and now this.. Just makes we want to stay in Lenny. :D –  Richards Sep 5 '11 at 13:45
    
I moved to squeeze without any issues, just saying that if you get into a mess with dependencies, it can be easier to start again - if you have the data ready. –  EightBitTony Sep 5 '11 at 16:03
    
By the way, one more thing which worries me. I'm using WinSCP and Putty to connect to the server and do everything in the command line. Will the command line window and connection to WinSCP be active while I upgrade so I can fix the issues? –  Richards Sep 5 '11 at 16:16
    
You should make sure you run everything inside screen or tmux so that a dropped connection doesn't immediately cause issues, but if the upgrade stuffs openssh/network, then you'll need a remote console session to fix it. –  EightBitTony Sep 5 '11 at 18:44
    
Sorry, but what's inside screen? It's like I run the linux server in virtual machine program on my windows? –  Richards Sep 5 '11 at 20:34

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.