On 2023-10-17 03:28, Masaru Nomiya wrote:
Hello,
In the Message;
Subject : Re: OS disk cloning Message-ID : <5e65a0c8-cc1a-40a9-8aff-4523256a9aa1@telefonica.net> Date & Time: Mon, 16 Oct 2023 16:50:46 +0200
[CER] == "Carlos E. R." <robin.listas@telefonica.net> has written:
[...] CER> Or clonezilla. I don't have experience with any of them. I use CER> plain dd (or dd*rescue), or rsync.
CER> Notice: if btrfs is on the root system, I can not handle it. I CER> don't know how. [...]
I have been using an ext4 file system for a long time.
But、I found this;
https://dev.to/archerallstars/linux-opensuse-tumbleweed-review-in-2022-the-b...
I noticed the following written in;
zRAM AKA free RAM, and BTRFS transparent compression AKA free disk space, should be enabled by default
I don't like btrfs in root, simply because recovery⁽¹⁾ is so complicated that I can not memorize and reproduce. At the time I looked at it, there was no way to format a new btrfs with the same structure as the machine you are going to clone or restore. The only known way was to install openSUSE fresh. (1) recovery in this context is cloning the system, or bare iron recovery, reconstruction of a system from backup.
I did BTRFS transparent compression described there.
The question that boggled my mind was how to migrate the current Tumbleweed.
You can not. No published procedure AFAIK.
When I asked Google, the only answer I got was "clean install of Tumbleweed". So I decided to investigate by installing tumleweed on my laptop with btrfs. The result was that the fstab looked quite different from the one in the ext4 case, but I found the structure of the system was the same as in the ext4 case,
Then, I did as follows;
1. Backup of the current Tumbleweed to an external hard drive using rsync
2, Download a snapshot of Tumbleweed with the same kernel as the current Tumbleweed & clean install with btrfs.
3, Restore the backup Tumbleweed using rsync in overwrite mode (except /boot area)
Yes, you can do that. I would perhaps have deleted all the files of the fresh install prior to restoring the backup, except fstab.
Since then, I haven't had any problems, and I occasionally get the backup to an external HDD with this script;
#! /bin/sh rsync -av --delete /boot/ /bkup/boot rsync -av --delete /etc/ /bkup/etc rsync -av --delete /lib/ /bkup/lib rsync -av --delete /lib64/ /bkup/lib64 rsync -av --delete /opt/ /bkup/opt rsync -av --delete /root/ /bkup/root --exclude=.* rsync -av --delete /usr/ /bkup/usr --exclude='/local/tmp/' rsync -av --delete /var/ /bkup/var --exclude='/tmp/'
-- Cheers / Saludos, Carlos E. R. (from openSUSE 15.5 (Laicolasse))