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

Sterbezahlen Deutschland - Was läuft schief, bei CORRECTIV? (Samuel Eckert)

Samuel Eckert manipuliert wissend Statistiken um Aufmerksamkeit zu erzeugen, und niemand interessiert's.   https://youtu.be/rJzeZ-TRMRI Mein Kommentar zu dem Video: Hmm, ein paar Fragen:  Auf S.4 des Slides/ Minute 6 des Videos sieht man Ende 2020 einen deutlichen Anstieg der Sterberate auf 25tsd gegenüber durchschnittlich 18tsd /KW, das sind 30% mehr Tote. Aber gegen Ende des Videos behauptest Du, in keiner Altersgruppe gäbe in diesem Jahr eine Zunahme der Sterberate, woher kommt dann die Zunahme. Ist unsere Bevölkerung plötzlich um 30% gewachsen? Haben wir innerhalb weniger Wochen 30% mehr Alte?  Für Sterbefälle liegen alle Daten bis 2020 vor, aber für die Bevölkerungszahlen liegen bei den von dir genannten Quellen (Statistisches Bundesamt) für 2020 noch keine Zahlen vor. Wo kommen also Deine Zahlen auf Slide 6 / Minute 10 her, hast Du Dir die ausgedacht? Da du behauptest, die deutliche Steigerung bei den Toten kommt durch das Bevölkerungswachstum, ist es komisch, dass ...

migrating from kmail to thunderbird

While I gave up local mails and subordinated entirely to google meanwhile, my partner still wants to be independant and prefers local mails. Since KMail seemst to be wrecked, I have to migrate her mails to the old mbox format of thunderbird. This one-command-recipe worked for me. I replaced Archive/ by e.g. .kde/share/apps/kmail/mail/inbox and sarchive by sMBOXinbox . To import  MBOXinbox they simply have to be copied to   ~/.thunderbird/.....default/Mail/Local\ Folders . Converting Maildir to mbox via mutt Ran into an issue today where I needed to convert a Maildir containing over 50k messages to mbox format and couldn’t really find any good tools. So I found  this blog post  about using mutt to do it. Unfortunately, it converted one Maildir to another. =( One crucial piece is missing, so here is the one-liner in all its glory: $ mutt -f Archive/ -e 'set mbox_type=mbox; set confirmcreate=no; \ set delete=no; push "T.* ;sarchive "' The above convert...

Durch die letzte Generation erhöht sich die durchschnittlich jährliche Stauzeit deutlich weniger als von 40h auf 40,06h

  Bis zum 20. Februar 2022 registrierte die Berliner Polizei 44 Blockaden , bei denen 180 Menschen vorläufig festgenommen wurden. https://de.m.wikipedia.org/wiki/Letzte_Generation#:~:text=Bis%20zum%2020.%20Februar%202022,180%20Menschen%20vorl%C3%A4ufig%20festgenommen%20wurden. Laut diesen taz Bericht zu den extremsten Demos war der letzte Aktivist nach drei Stunden beseitigt https://taz.de/Letzte-Generation-in-Berlin/!5927344/ Verkehrs-Durchfloss Ernst Reuter Platz laut https://www.berlin.de/sen/uvk/mobilitaet-und-verkehr/verkehrsmanagement/verkehrserhebungen/#strassenverkehrszaehlung Verkehr auf den Zufahrtsstraßen in Tausend pro 24h beide Richtungen 43,4+24,1+13,5+42,7+29 =151,7 k/24h  (dadurch jedes Auto doppelt gezählt, kompensiert höheres Aufkommen morgens) in 3h: 151,7k/24h * 3h = 151,7k *3/24 = 19'000 3h warten: 57'000h  Das ist sehr grob überschätzt: diese 19000 Autos kommen ja nur peu a peu dazu und stehen nicht alle komplette 3h, außerdem weichen viele Autos aus...