[mythtv-users] Rsync test system

Nicolas Krzywinski myth2 at site7even.de
Sat Oct 7 15:27:04 UTC 2017

Well ok, I forgot the link to the script... :D


Am 07.10.2017 um 17:25 schrieb Nicolas Krzywinski:
> Hi Daryl,
> 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.
> 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.
> Additionally I have a spare SSD that I use for full system backups for 
> systems like e. g. the MythTV backend/frontend.
> 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.
> The script does these steps:
> 1. rsync the different system paths to the new target location, that 
> may consist of either one or multiple partition(s)
> 2. create empty system directories at the target location (I don't 
> know if they are created automatically, just wanna be sure everything 
> works)
> 3. copy the init symlinks from root dir
> 4. compare the directory sizes of source and target to detect any 
> major failures
> 5. chroot into target directory for running update-grub
> 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!
> 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.
> Because of this, the script can be dangerous, if configured incorrectly!
> 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.
> 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! ;-)
> Good luck,
> Nicolas
> Am 07.10.2017 um 09:33 schrieb mythtv-users-request at mythtv.org:
>> Message: 15
>> Date: Fri, 6 Oct 2017 16:12:35 -0400
>> From: Peter Bennett<cats22 at comcast.net>
>> To:mythtv-users at mythtv.org
>> Subject: Re: [mythtv-users] Rsync test system
>> Message-ID:<d5e1e31f-0b17-f9db-ba18-48748c086863 at comcast.net>
>> Content-Type: text/plain; charset="utf-8"; Format="flowed"
>> On 10/06/2017 02:24 PM, Daryl McDonald wrote:
>>> 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?
>> 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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20171007/37c2fb2d/attachment.html>

More information about the mythtv-users mailing list