The officially official Devuan Forum!

You are not logged in.

#1 2022-07-23 22:54:37

Gregors
Member
From: Freiburg, Germany
Registered: 2018-08-09
Posts: 21  
Website

Migration plan (Debian > Devuan)

Hi there!

Since Devuan looks very promising to me, I want to give it some kind of "harder try". Which means: I want to keep my home and some minor /usr/local things. Everything else I want to be fresh like morning dew. So what I'm thinking of is ...

- dd-Backup of my system disk (just about 30 GB SSD) to an external backup-disk (a 4 TB USB disk which I use for my weekly backups.
- export a list of currently installed programs
- make a fresh base installation of Devuan
- do some apt magic to install the programs (use the list created in step 2)

So, what do you think? Am I missing something? What would be the fitting commands for the steps 2 and 4?

At least, if anything goes terribly wrong, I could dd the backup back ...

TIA

Gregor

Offline

#2 2022-07-23 23:02:48

Dutch_Master
Member
Registered: 2018-05-31
Posts: 232  

Re: Migration plan (Debian > Devuan)

Investigate the use of the apt options --get-selections and --set-selections in the apt man page

man apt
apt --get-selections > selection.txt
apt --set-selections < selection.txt

Btw, do NOT use dd to backup your disk to an existing backup drive. Unless you don't care about the data that's already on it :-\

Offline

#3 2022-07-23 23:51:57

Gregors
Member
From: Freiburg, Germany
Registered: 2018-08-09
Posts: 21  
Website

Re: Migration plan (Debian > Devuan)

Dutch_Master wrote:

Investigate the use of the apt options --get-selections and --set-selections in the apt man page
Btw, do NOT use dd to backup your disk to an existing backup drive. Unless you don't care about the data that's already on it :-\

What I meant is something like

dd if=/dev/sda of=/media/backup/sda-backup.dd

with the USB disk mounted at /media/backup. So my dd backup would just be a ~30 GB file on that disk (among other back-uped things).

Thanks for the get/set selection examples!

Gregor

Last edited by Gregors (2022-07-23 23:52:52)

Offline

#4 2022-07-24 05:26:29

Dutch_Master
Member
Registered: 2018-05-31
Posts: 232  

Re: Migration plan (Debian > Devuan)

Mind, you cannot create a copy of a running system, you need to run from a live-CD when you create the image.

I'm not sure it'll work as you want, so proceed at own risk!

Offline

#5 2022-07-24 17:55:30

Gregors
Member
From: Freiburg, Germany
Registered: 2018-08-09
Posts: 21  
Website

Re: Migration plan (Debian > Devuan)

Yes, I'm aware of the problems that can arise from backing up a disk in use. I usually use grml for this kind of tasks.

Gregor

Offline

#6 2022-07-24 18:10:04

golinux
Administrator
Registered: 2016-11-25
Posts: 2,656  

Re: Migration plan (Debian > Devuan)

Have you seen this script? Might give you some ideas.

Offline

#7 2022-07-25 02:48:15

GlennW
Member
Registered: 2019-07-18
Posts: 300  

Re: Migration plan (Debian > Devuan)

Gregors wrote:
Dutch_Master wrote:

Investigate the use of the apt options --get-selections and --set-selections in the apt man page
Btw, do NOT use dd to backup your disk to an existing backup drive. Unless you don't care about the data that's already on it :-\

What I meant is something like

dd if=/dev/sda of=/media/backup/sda-backup.dd

with the USB disk mounted at /media/backup. So my dd backup would just be a ~30 GB file on that disk (among other back-uped things).

Thanks for the get/set selection examples!

Gregor

Just backup what you need... separately. Because you may end up in a loop when dd gets up to /media and starts backing itself up.

dd is a good copy-disk, but rsync can do directories and to make it a bit easier (faster/smaller) use rsync instead of dd.

rsync -avh /usr/local /media/backup/sda-backup/usr/
rsync -avh /home /media/backup/sda-backup/

my two cents worth. :-) All the best!

Offline

#8 2022-07-26 21:04:40

einpoklum
Member
From: Haifa, Palestine
Registered: 2021-07-21
Posts: 50  
Website

Re: Migration plan (Debian > Devuan)

* I also typically back up my `/etc` in an archive, separately from my off-line backup media of the whole system (which I don't always make actually). I often find I need to restore settings of some service or app from files I had there.
* Ditto for `/root`. While I try to not put much in the root home directory, the few things I put there useful for root on the new system as well (e.g. `.vimrc`...)

Finally, while using a distribution and over the months/years I use it, I try to log - in words - significant changes to it in an "administrator's journal" (like a Captain's log in Star Trek if you will :-P ). I put it in /var/log/admin-journal . I always back that up, especially since, on the new system, I often follow steps I had logged there (e.g. "2019-01-05\nSet up a wheel group to be able to su without password, via /etc/passed and /etc/pam.d/su ; placed alice and bob in the wheel group")

Offline

Board footer