You are not logged in.

#1 2014-09-26 00:32:45

stevebach
Member
Registered: 2013-06-13
Posts: 7

What to think about before an arch reinstall with a backup beforehand?

Updates did break stuff about every two months in the past, usually due to user error (e.g., other users seem to have problems too [2]). My first mistake when I installed Arch was that I didn’t of not using LLVM, so I could not make LLVM snapshots before software upgrades. Finally, I went by "never touch a running system", so I didn't update arch linux for the last one and a half years

Problems were partly due to the horrible and dreaded Nvidia optimus hardware which is not reliably supported in Linux. This is the thing where Linus Torvalds said: "fuck you Nvidia", because Nvidia doesn't care about Linux support. BTW, as of June 2014 people still tremendously suffer when using Nvidia hardware[1].

I now want to reinstall arch linux as a kind of “galvanic” separation of my old installation. Plus I want to switch to LLVM now, for  which a reinstall seems a  good idea.

Info:
I have a company laptop (ThinkPad W540 with nvidea  NVIDIA Quadro K2100M; this is NVE0 family / Kepler) where I cannot change the hardware; it has a small 160GB SSD hard drive. By default the system won't boot due to issues with the intel video chip, see [12]. I have experience with linux since used it as soon as I started studying computer science.

First step: Backup Data
-- backup MBR
-- backup needed kernel parameters for my ThinkPad labtop
-- note installed graphic drivers and X/window manager init scripts
-- possibly also back up diagnostic output like from dmesg & co
-- backup list of installed packages

-- make a list of unimportant files that should be deleted before backup
-- make list of excluded directories from backup (e.g., browser caches, possibly also packman cache)

-- most important data is already stored in GIT redundantly
-- backup important folders as compresses folders (tar)
-- backup home and root partitions as tar/lzo files
-- clone most important partitions via dd
-- clone entire hard drive via DD

-- ... what else to think about?


Finally copy all files immediately as they are ready on external hard drive and (redundantly) encrypted in the cloud. Perhaps further backup files via ssh to some server too, for another layer of redundancy.

Second Step: Reinstall Arch Linux
--  use LLVM this time
-- follow arch linux installation guides

Open questions:
-- Do I have to use a live CD for backups, especially if I clone with “dd” a hard drive? Usually I do a login with just one user, switch to root, without running any programs like X or a window manager. I am more interested in my personal data and /etc settings than anything else.

I have read the following webpages prior to posting:

Finally, did I forget anything important for a backup and reinstall of arch linux?

[1] https://bbs.archlinux.org/viewtopic.php?id=167195&p=7
[2] http://forums.scotsnewsletter.com/index … opic=60626
[3] https://wiki.archlinux.org/index.php/disk_cloning
[4] https://wiki.archlinux.org/index.php/Fu … with_rsync
[5] https://wiki.archlinux.org/index.php/Fu … p_with_tar
[6] http://clonezilla.org/
[7] https://wiki.archlinux.org/index.php/Pacman_tips
[8] https://bbs.archlinux.org/viewtopic.php?id=156418
[9] https://flexion.org/posts/2013-05-sprin … linux.html
[10] https://flexion.org/posts/2013-05-sprin … linux.html
[11] http://www.bendoan.me/blog/archonthinkpad/
[12] https://wiki.archlinux.org/index.php/Thinkpad_S540

Offline

#2 2014-09-26 12:26:21

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: What to think about before an arch reinstall with a backup beforehand?

If you use "dd" to copy an entire drive then I recommend doing it from a live Linux environment.

Don't forget to verify your backups! wink

You sound very prepared. smile In the future, I recommend updating Arch Linux every day. If it's not possible for you to update Arch Linux often, then you should consider using a different operating system. hmm

Offline

#3 2014-09-26 22:04:30

t0m5k1
Member
From: overthere
Registered: 2012-02-10
Posts: 324

Re: What to think about before an arch reinstall with a backup beforehand?

adding to drcouzelis:

must you really use DD?
it will also copy the free space!
using it from within a live cd will ensure the virtual file systems are not copied as well.
If you are in a live cd then you may as well use another drive clone tool that will not clone the free space (clonezilla)


ROG Strix (GD30CI) - Intel Core i5-7400 CPU - 32Gb 2400Mhz - GTX1070 8GB - AwesomeWM (occasionally XFCE, i3)

If everything in life was easy, we would learn nothing!
Linux User: 401820  Steam-HearThis.at-Last FM-Reddit

Offline

#4 2014-09-27 23:08:38

guerch
Member
Registered: 2014-09-11
Posts: 31

Re: What to think about before an arch reinstall with a backup beforehand?

Well dd will copy the free space but you can set it up to use compression (that way you gain most that space back) like so:

dd if=/dev/hdX conv=sync,noerror,notrunc bs=64K | gzip -c > /mnt/backups/myarchimage.img.gz

you could restore it back like this:
gunzip -c /mnt/backups/myarchimage.img.gz | dd of=/dev/hdX

Offline

#5 2014-09-28 15:46:57

Kopkins
Member
Registered: 2012-07-01
Posts: 189

Re: What to think about before an arch reinstall with a backup beforehand?

Or you could use rsync which IMO is a much better backup tool than dd. https://wiki.archlinux.org/index.php/Fu … with_rsync

Offline

Board footer

Powered by FluxBB