<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi Daryl,</p>
<p>you aren't over cautious. I _always_ do a full system backup
before doing a major system upgrade. This allowed me to recover my
system a few times already, when the upgrade failed. Last time, it
was my home server, still running Debian Wheezy (!), cause the
last upgrade attempt completely broke the system.</p>
<p>For my main systems (my home server and my personal system), I
permanently have a backup system on a second disk, that I resync
from time to time. Sometimes, I just boot into one of these backup
systems to check for regressions, just to sort out that I don't
remember things correctly.</p>
<p>Additionally I have a spare SSD that I use for full system
backups for systems like e. g. the MythTV backend/frontend.</p>
<p>Over the years, I created a script that helps me doing these
system backups more faster and less error-prone than me, trying to
remember all the single steps.</p>
<p>The script does these steps:</p>
<p>1. rsync the different system paths to the new target location,
that may consist of either one or multiple partition(s)</p>
<p>2. create empty system directories at the target location (I
don't know if they are created automatically, just wanna be sure
everything works)</p>
<p>3. copy the init symlinks from root dir</p>
<p>4. compare the directory sizes of source and target to detect any
major failures</p>
<p>5. chroot into target directory for running update-grub</p>
<p>6. update of /tar/get/etc/fstab to insert mounts of target
partition(s) - (!) everything else is commented out (!) - support
for swap partition missing currently, this has to inserted
manually!<br>
</p>
<p>Additionally, there are some parameters to control the script.
Some parameters enables/disables some of the above steps. Other
parameters can be used to e. g. exclude specific directories or
let the script run unattended. Finally, there are parameters that
adjust how to deal with existing backup data at the target
location, e. g. fully sync the source system to the target
location, which possibly means to DELETE target files.<br>
</p>
<p>Because of this, the script can be dangerous, if configured
incorrectly!</p>
<p>When using it, do everything with extra care, to not harm your
system or lose any data! I propose to use it interactively and
triple check all the paths, the script prints out, prior to
starting any actions.<br>
</p>
<p>Depending on the system, there may be some error messages when
copying stuff from / (root), as the different distros have some
differencies there. I tried to add support for all systems that I
had worked with so far, but I can guarantee for nothing! ;-)</p>
<p>Good luck,</p>
<p>Nicolas<br>
</p>
<br>
<div class="moz-cite-prefix">Am 07.10.2017 um 09:33 schrieb
<a class="moz-txt-link-abbreviated" href="mailto:mythtv-users-request@mythtv.org">mythtv-users-request@mythtv.org</a>:<br>
</div>
<blockquote type="cite"
cite="mid:mailman.3.1507361609.1244.mythtv-users@mythtv.org">
<pre wrap="">Message: 15
Date: Fri, 6 Oct 2017 16:12:35 -0400
From: Peter Bennett <a class="moz-txt-link-rfc2396E" href="mailto:cats22@comcast.net" moz-do-not-send="true"><cats22@comcast.net></a>
To: <a class="moz-txt-link-abbreviated" href="mailto:mythtv-users@mythtv.org" moz-do-not-send="true">mythtv-users@mythtv.org</a>
Subject: Re: [mythtv-users] Rsync test system
Message-ID: <a class="moz-txt-link-rfc2396E" href="mailto:d5e1e31f-0b17-f9db-ba18-48748c086863@comcast.net" moz-do-not-send="true"><d5e1e31f-0b17-f9db-ba18-48748c086863@comcast.net></a>
Content-Type: text/plain; charset="utf-8"; Format="flowed"
On 10/06/2017 02:24 PM, Daryl McDonald wrote:
</pre>
<blockquote type="cite" style="color: #000000;">
<pre wrap="">Thanks Peter this looks good, as far as copying the system, but I want
to end up with a dual boot system so editing the /etc/fstab, to change
the first boot drive is probably not for me. After the copy I'm
tempted to then run update-grub, is this too easy? I could edit
/etc/default/grub to change boot order as required. I want this setup
in place for more than just 0.28 to 0.29 Also for all future system
and myth upgrades.
Its occurring to me that I will have to edit /etc/fstab to auto mount
the new partition. Am I missing anything else?
</pre>
</blockquote>
<pre wrap="">I do use this for setting up a multi-boot system. Each partition is a
complete copy so each partition has its own /etc/fstab which must be
edited to use the correct root partition (i.e. itself). After making the
copy and editing that fstab you should be able to boot into your
original system and then run sudo update-grub.
If you want to switch your default boot partition you should reinstall
grub into the new default partition.</pre>
</blockquote>
<br>
</body>
</html>