Tag Archives: Debian

How to Backup an Ubuntu Desktop (12.04, 14.04)

Source: http://askubuntu.com/questions/9135/how-to-backup-settings-and-list-of-installed-packages

Warning: Read about caveats in the link above before use

#——————————————————-

## The backup script
 dpkg --get-selections > ~/Package.list
 sudo cp -R /etc/apt/sources.list* ~/
 sudo apt-key exportall > ~/Repo.keys
 rsync --progress /home/`whoami` /path/to/user/profile/backup/here
## The Restore Script
 rsync --progress /path/to/user/profile/backup/here /home/`whoami`
 sudo apt-key add ~/Repo.keys
 sudo cp -R ~/sources.list* /etc/apt/
 sudo apt-get update
 sudo apt-get install dselect
 sudo dpkg --set-selections < ~/Package.list
 sudo dselect

#——————————————————-

Who is this for: users that have normal regular use of their computer, that have done minimal or no configuration outside their home folder, did not mess up startup scripts and services. A user that wants to have his software restored to how it was when he installed it with all customizations being done and kept in their home folder.

Who this will not fit for: servers geeks, power users with software installed by source (restoring the package list might break your system), users that have changed the startup script of some application to fit better their needs. Caution: there is a big chance any modifications outside home will be over written.

Diving in with Arch Linux

The Problem

The time had come for me to “invest” in getting some new equipment. The only workstation that I had up until recently was a company laptop which I had toted back and forth between VMware and my home office. I keep my personal documents on removable storage, but that doesn’t really help when you don’t have a workstation at home, so lugging the laptop around with me was a must.

Don’t get me wrong, I have systems, but their mostly systems running as file servers or VM servers doing various little things automagically, and they’re not sitting in or around my actual desk at home. Also, my printers/scanner at home relied on my laptop to be of any use. It was time to fix all of these unecessary grievences.

The Dilemma

For the past couple of weeks I had been thinking hard about what kind of system I should buy – should it be a powerful / modern desktop system with lots of RAM and screaming CPU/Video? Or would it be a powerful laptop/notebook which would serve as a desktop replacement? Should I go for the i3, i5, or i7 processor? ATI or Nvidia? What kind of budget was I looking at?

All of these questions plagued me for quite some time (okay, not that long.. I admit I’m a bit of an impulse buyer). I’ve spent long enough thinking about this that I realized a lot about myself. For one, I’m not a gamer. I was once one of those people who would have been ecstatic about getting next-gen hardware to play the lastest power-hungry games. Not any more.. and not for quite some time. The last time I seriously played a PC game was about 3 years ago. When I say “seriously”, I mean played it regulary, at least once a week. The last game I played was a game that I was really into; it was X2 of the X-Series space combat simulators.

Since then, I’ve touched a game or two, on and off, but the has fascination is no longer there. i’m more interested in hacking around with open source programs and becoming a better developer.

The Solution

Since I wasn’t going to focus on gaming and media for my new system purchase, this opened the door for a lot of possibilities that I haven’t considered, and some unexpected disappointments. First off, since I wasn’t going to plop $1,000.00 on a single system, I could, theoretically buy two lower-powered systems. And that’s exactly what I did. Instead of going with a full-fledged desktop or power-house laptop, I ended up buying an Acer Aspire Revo net-top unit as my primary workstation, and a Samsung N110 Netbook as my portable. This Revo is awesome! It has 2GB of RAM (upgradable to 4), an Nvidia ION chipset, and an Intel Atom processor (dual-core). I didn’t need much more than this for my purposes, this was perfect. The Samsung N110 was also a nice little beauty. It was a Atom processor with integrated graphics, but was light, pretty, and had a 6-cell battery, which meant that it would last about 8 hours during heavy use. I quickly installed JoliCloud Express on the Netbook, and have been very happy with it ever since.

The Disappointment (In myself)

The disappointment that I experienced was not in the purchase or the hardware, but it was in the fact that I hesitated for a long time to wipe away the Revo’s bundled OS to install Linux. The OS that the Revo came with was Windows 7 Home edition (the Samsung netbook had Windows XP). I haven’t used windows as my primary OS in years, and have always been proud to say so. For the last four years or so, I’ve been using Ubuntu (severely customized), and before that I was using Debian. When I initially started up the Revo, I was impressed by the windows 7 user interface, the nice colors, the clean lines, and the fact that it picked up all my hardware. It was pretty simple, and I have to admit somewhat luring. I’m definately not the little hacker I was 10 years ago. I don’t have time to spend hours hacking away into the wee morning just on my OS configuration. At least that’s what I keep telling myself :) But then it dawned on me – that’s how I got where I am today, by embracing curiousity, and defying conformity. That’s where life becomes interesting and liberating, and that’s where I feel at home. All these thoughts of nostalgia hit me shortly after I hard-reset the Revo, and windows 7 came up saying “system wasn’t shut down correctly – use safe mode” or something to that effect. There was no way for me to tell it to disregard the unclean boot-up, it persisted to ask me to go into safe mode, with no specific explanation. That’s when I wish I had a grub prompt or command line handy.

Diving in with Arch Linux

After coming to my senses, I realized that I definately didn’t want to go back to using Ubuntu for my primary workstation. For a while I’ve been feeling like Ubuntu has lost much of it’s luster, especially for someone like me who loves simplicity and minimalism over fancy GUIs and extra features. I wanted a distribution that tried to stay at the cutting edge with it’s packages, but didn’t screw with the basics of linux so much that you’re forced to use GUIs to configure your OS. Debian didn’t fit the bill here – it’s great for servers – rock solid, but it’s not that great if you want a cutting edge workstation without having to compile things from source.

After a little bit of reading and browsing distrowatch.com, I came across Arch Linux (which I’ve known of only in passing before), and decided that this was the OS for me. The Arch Linux community is small enough that I could make some significant contributions without much effort. The distribution itself is awesome, very clean, and very minimal. And most importantly, all of the system configurations are done by editing text files!

The Arch Way

Installing Arch was relatively straight-forward (IMO). It wasn’t as easy as installing, say, Linux Mint, but it also wasn’t as hard as installing Debian 3.0 either. The installation dialogs were ncurses based, but they were descriptive, linear, and logical. When it came time to supply arguments for the initial configuration of the packages I selected, they were all text files (very well documented) which I could edit with vim! I think at that point I knew that was about to embrace a distribution that was very special indeed. This distro was going back to basics, and not flooding it’s users with fancy splash screens and progress meters, it was doing the needful, and it was doing it well.

I still have a lot more to learn about Arch, as I’ve only scratched the surface so far. I’ve been able to set up sound (with alsa) and video using the latest Nvidia drivers. I’ve configured Xmonad as my window manager, and have gotten a handle of how to query and install packages with “pacman”, the Arch package installer. The only real problem that I’ve run into is setting up CUPS for my printers. After some research, it seems that the version of CUPS (1.4.3-2) available in the Arch packages is the latest version available from the CUPS source repository, and that I may have to downgrade (to 1.3.9) it in order to get my printers working.

Overall, I like what I see so far with Arch. I expect to post more on my experiences with it as I learn.