Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add clone feature #730

Closed
framps opened this issue Jan 22, 2024 · 8 comments
Closed

Add clone feature #730

framps opened this issue Jan 22, 2024 · 8 comments

Comments

@framps
Copy link
Owner

framps commented Jan 22, 2024

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.

@framps
Copy link
Owner Author

framps commented Jan 22, 2024

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.

@framps framps added the backlog May be implemented at some point in time label Jan 27, 2024
@framps framps closed this as completed Jan 27, 2024
@framps framps removed the backlog May be implemented at some point in time label Feb 10, 2024
@framps
Copy link
Owner Author

framps commented Feb 10, 2024

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.

@framps
Copy link
Owner Author

framps commented Feb 29, 2024

Just created raspiBackupAndClone helper script which creates a backup and restores the just created backup on any device.

@framps
Copy link
Owner Author

framps commented Mar 5, 2024

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

@framps framps reopened this Mar 5, 2024
@framps framps self-assigned this Mar 5, 2024
@framps
Copy link
Owner Author

framps commented Mar 10, 2024

I spent the last week to finish the clone support prototype in raspiBackup 😉

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.

@framps
Copy link
Owner Author

framps commented Mar 17, 2024

Given there is no feedback this issue is closed.

@framps framps closed this as completed Mar 17, 2024
@framps
Copy link
Owner Author

framps commented Mar 20, 2024

Mixed mode clone fails (/boot on sd card and /root on USB)

@framps framps reopened this Mar 20, 2024
@github-actions github-actions bot added the no-issue-activity Inactive issues will be closed afetr 2 weeks label Mar 30, 2024
@framps framps removed the no-issue-activity Inactive issues will be closed afetr 2 weeks label Mar 30, 2024
@framps framps removed their assignment Apr 9, 2024
Repository owner deleted a comment from github-actions bot Apr 25, 2024
@framps
Copy link
Owner Author

framps commented May 22, 2024

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.

@framps framps closed this as completed May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant