Closed framps closed 6 months ago
Two new options: --clone
and --cloneUpdate
will be added: First one initializes the device partitions and then copies the partitions with rsync and the second one just syncs the device partitions with rsync. -d
defines the target device.
Instead to create a clone directly by raspiBackup raspiBackupRestore2Image allows now to restore a backup created by raspiBackup onto another SD card. Just execute raspiBackup followed by raspiBackupRestore2Image.
Just created raspiBackupAndClone helper script which creates a backup and restores the just created backup on any device.
To check whether it's feasible and maintainable to add the supported clone feature in raspiBackup I created a prototype branch m_clone. It looks promising. Right now a clone booted successfully :-D
I spent the last week to finish the clone support prototype in raspiBackup :wink:
Execute following instructions to install raspiBackup and grab the clone prototype:
curl -s https://raw.githubusercontent.com/framps/raspiBackup/master/scripts/raspiBackupDownloadFromGit.sh | bash -s -- m_clone installation/raspiBackupInstallUI.sh
sudo bash ./raspiBackupInstallUI.sh
M2 -> I1
M3 -> C4 -> Clone to another device -> exit
curl -s https://raw.githubusercontent.com/framps/raspiBackup/master/scripts/raspiBackupDownloadFromGit.sh | bash -s -- m_clone raspiBackup.sh
sudo ./raspiBackup.sh -t cloneinit -d <targetDevice> # e.g. /dev/sda or /dev/mmcblk0 or /dev/nvme0n1
sudo ./raspiBackup.sh -t clone -d <targetDevice> # e.g. /dev/sda or /dev/mmcblk0 or /dev/nvme0n1
Please report any issues, questions and feedback in this issue.
Given there is no feedback this issue is closed.
Mixed mode clone fails (/boot on sd card and /root on USB)
The prototype works perfect but it's a kind of hack because raspiBackup doesn't support from a design perspective cloning. Therefor this feature will not be added to raspiBackup.
Right now raspiBackup doesn't support to clone a running system on another device do have a ready to go backup handy.
Actually it's possible to create a backup and immediately restore this backup to a device. But this doubles the clone time and if somebody just wants to create a clone there is no backup required.
There exists already a helper script which creates a dd file from a backup. This is usually used by Windows folks because they then can use Windows tools to restore the backup. It shouldn't be a big deal to update this script to restore the backup directly to a device.
But it's much more convenient to have a direct clone feature available in raspiBackup.