Direkt zum Hauptbereich

Systembackup using dpkg and dselect

Systembackup by integr8e
As a result of many reinstallations, I've begun developing a method that quickly allows me to restore my new installation to the setup of my old one. As such, I decided to share my knowledge:

-> MAKE A LIST

- To create an easily restoreable list of all installed software on your system (from the repos), open Konsole and enter the following command:

dpkg --get-selections | grep [^de]install$ > installed-software.txt


- That will create an entry in your "/home//" directory entitled "installed-software.txt" ( is your username).


-> [u]BACKUP

- Backup all your important files to an external storage device (hard drive / flash disk); you may wish to backup your "/etc/X11/xorg.conf" and "/etc/apt/sources.list" configs. If you have the Medibuntu/Wine repo(s), you'll need to additionally backup your "/etc/apt/sources.list.d" directory. For an excellent guide on backing up using the "dd" command, see Qqmike's [u]dd Command (http://kubuntuforums.net/forums/index.php?topic=3090824.0).

- I generally format my external hard drive as XFS (http://en.wikipedia.org/wiki/Xfs) because it allows me to quickly transfer/move large files. You can format your hard drive using any number of formatting utilities; I prefer using the GParted LiveCD (http://gparted-livecd.tuxfamily.org/).

- It's a very good idea to backup periodically, because you'll be out of luck if you don't have a copy and you frag your system beyond repair. Also, keep a list of any software you installed outside of the repositories (such as those downloaded/installed from 3rd party websites).


-> FRY YOUR SYSTEM ( ;D )

- Configure your BIOS to boot from CD first. Then, insert the Kubuntu installation CD (I used the Alternate CD for this example, but it doesn't matter which you use), and reboot. When the CD loads, choose the "Install a Command-Line System" option, fill out all the requested information, and choose the "Manual" option to partition your hard drive.

- I would suggest creating 3 basic partitions: SWAP, "/" , and "/home". For SWAP, create a partition roughly 1.5 - 2 times the amount of RAM you have installed (SWAP is similar to "Virtual Memory" in Windows). Then, create your "/" (or "/root") partition. You shouldn't need more than 8 GB for your "/root" partition; if you ever use more than 10 GB, my hat's off to you :o You can make it any format you wish (check the list of File Systems (http://en.wikipedia.org/wiki/Comparison_of_file_systems) (FS) to see which you prefer; just look for the “Linux” entries in the far-right column). Finally, create a "/home" partition; choose whichever FS type you would like to use, and create it as large as you want (this is the partition you'll be storing your personal data in). If you already have a separate “/home” partition, keep it the way it is (don't format it), and select it again as your “/home” partition. This way you can keep your application settings/customizations and personal data intact. Then, use the same username you had before so the installer will associate your previous “/home//” directory with your new “/home//” directory.

- I create an additional 200MB “/boot” partition for the GRUB bootloader, and format as [u]ext3 (http://en.wikipedia.org/wiki/Ext3); I do this because my FS of choice is XFS, which currently is incompatible with GRUB. I also create an extended partition where I create logical “/root” partitions; this way, I can install as many operating systems I want, and use the same “/home” directory (BIOS currently only allows 4 primary partitions on your hard drive, including 1 extended partition; an extended partition is a primary partition within which you can create as many "logical" partitions you want).


-> [u]RESTORE YOUR STUFF

Once Kubuntu is installed, remove the installation CD from your computer and reboot. Login, restore your repositories, and update your system with the command

sudo aptitude update; sudo aptitude safe-upgrade

- You're now ready to restore all your previously installed software. To do so, you'll need the dselect package manager:

sudo aptitude install dselect


- Restore the “installed-software.txt” file you created, and reinstall your software with the following commands:

sudo dpkg --set-selections < installed-software.txt


sudo dselect

- Choose option "3. [ I ]nststall Install and upgrade wanted packages." That should install everything you had before!

- You'll have to manually install anything you installed outside the repos, sorry :P

- Most of your application settings will already be in your “/home/[username]/” directory, for those that aren't (such as your “xorg.conf”), simply replace the existing ones with those you backed up. Once everything has reinstalled, start KDM with

sudo /etc/init.d/kdm start

Everything should now be as it was before ;)

;D ;D ;D


Edit: Using the many suggestions of those who contributed to this thread, I've re-written it in attempt to make it simpler, easier, quicker, and more effective. Thank you all who helped :)
http://www.kubuntuforums.net/archive/index.php/t-26184.html


Kommentare

Beliebte Posts aus diesem Blog

ssh pubkey verfahren funktioniert nicht

trotz ssh-copy-id usf. werde ich immer noch aufgefordert, das Passwort einzugeben. Grund: Die Rechte von authorized-keys sind nicht richtig gesetzt. sshd achtet darauf, dass alle rechte so gesetzt sind, dass ein Angreifer diese Datei nicht verändern kann. Sind die Rechte zu lax gesetzt, weigert sich sshd, dieses Verfahren durchzuführen. Daher dürfen folgende Dateien nur für den Benutzer beschreibbar sein: .ssh/authorized-keys .ssh . Das Dritte Verzeichnis ist das home-Verzeichnis des Nutzers, sonst könnte ja ein Angfreifer einfach .ssh überschreiben.

Open Office Vorlagen

http://de.openoffice.org/downloads/komponenten.html Vorlagen Hier bieten wir eine Sammlung von Vorlagen für den deutschsprachigen Raum an. Momentan handelt es sich um ca. 130 Vorlagen Die Vorlagen im Open Document Format können hier heruntergeladen werden: * OOo-Extension vorlagen_de_opendoc.oxt (ca. 2,5 MB) * Zip-Achiv vorlagen_de_opendoc.zip (ca. 2,5 MB) Vorlagen im OpenOffice.org 1.x-Format sind hier zu finden: vorlagen_de_sissl.zip (ca. 1 MB) Hinweise, Verbesserungsvorschläge oder neue Vorlagen können Sie über unsere Mailinglisten oder Issuezilla einbringen. Weitere Vorlagen finden Sie * in unserem Dateibereich , * auf dem deutschen OpenOffice.org -Portal, * auf der PrOOo -Box oder * bei office-center-epj .

Mausgeschwindigkeit einzelner Mäuse unter Ubuntu anpassen

Mäuse mit einer sehr hohen Abtastrate bewegen den Pointer viel zu schnell. Leider gibt es keinen Regler, mit dem man die Geschwindigkeit unmittelbar herunterregeln kann. Helfen kann das Kommando "xinput": In Kürze: Open a terminal Run the command: xinput --list --short ⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] ⎜ ↳ Razer USA, Ltd DeathAdder Mouse id=6 [slave pointer (2)] ⎜ ↳ Razer USA, Ltd DeathAdder Mouse id=7 [slave pointer (2)] ⎜ ↳ Razer DeathAdder id=11 [slave pointer (2)] ⎜ ↳ Macintosh mouse button emulation id=12 [slave pointer (2)] ⎣ Virtual core keyboard id=3 [master keyboard (2)] ↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)] ↳ Power Button id=8 [slave keyboard (3)] ↳ Power Button id=9 [slave k