Contribute
Register

EFIClone - automatic backup of the EFI partition

Okay, sorry to hear that -- I wouldn't mind helping refine your script so that it DOES work with SuperDuper but I'll jump to CCC -- I only have to make that copy once anyway right? And all future backups are just the hard drive part and the EFI will always be there (unless there's a new version that comes out... ) and when that happens then a new copying will be needed... thank you so much!
 
Okay, sorry to hear that -- I wouldn't mind helping refine your script so that it DOES work with SuperDuper but I'll jump to CCC --

If you're familiar with shell scripting it would be great if you can refine the script. It's possible that latest version of SuperDuper has changed. When SuperDuper calls the script, it is expected to send up to 4 arguments that specify the source disk, the destination disk, etc.

It's possible that incorrect parameters are being sent. Fortunately, the script creates its own log located in /Users/Shared/ folder. Let's have a look inside that log.

Screenshot 2023-12-16 at 5.11.04 AM.png


I only have to make that copy once anyway right? And all future backups are just the hard drive part and the EFI will always be there (unless there's a new version that comes out... ) and when that happens then a new copying will be needed... thank you so much!

This is true. But in this case we can even make the first EFI backup manually by mounting both source and destination EFI partitions and copying the EFI folder from source to destination.
 
If you're familiar with shell scripting it would be great if you can refine the script. It's possible that latest version of SuperDuper has changed. When SuperDuper calls the script, it is expected to send up to 4 arguments that specify the source disk, the destination disk, etc.

It's possible that incorrect parameters are being sent. Fortunately, the script creates its own log located in /Users/Shared/ folder. Let's have a look inside that log.

View attachment 576068



This is true. But in this case we can even make the first EFI backup manually by mounting both source and destination EFI partitions and copying the EFI folder from source to destination.


Sorry, I'm a total NOOb! I tried opening the file with TexEdit, and I am not seeing the file as it appears above? I'll just try it with CCC later today and report! I was just hoping to find a solution so that we could help other SuperDuper users because this shell idea is excellent.
 
Sorry, i'm a total NOOb! I tried opening the file with TexEdit and I am not seeing the file as it appears above? I'll just try it with CCC later today and report! I was just hoping to find a solution so that we could help other SuperDuper users because this shell idea is excellent.
I took the liberty of downloading SuperDuper! 3.8 and testing the script. Sure enough there are notable differences in this version that break EFIClone.

Fortunately it was quite easy to modify EFIClone. A new version has been uploaded to my GitHub repository:

Please download the new version and try again. We must download the ZIP file as shown:

Screenshot 2023-12-17 at 12.05.59 PM.png


IMPORTANT:
  • This script will not work with older versions of SuperDuper!
  • Please use SuperDuper! 3.8 or newer
  • If your computer has not been restarted since the last time you ran SuperDuper!, please reboot the computer before running SuperDuper! with the new EFIClone
  • Also make sure that the location of EFIClone is specified properly:
Screenshot 2023-12-16 at 1.56.55 PM.png

Here we can see a successful run:
Screenshot 2023-12-16 at 1.53.20 PM.png

WARNING:
  • EFIClone.sh by default will run in Test Mode
  • Always run in this mode first
  • When cloning is done, examine the file /Users/Shared/EFIClone.sh to see all the things that the script will do
  • It will first delete all files and folders in the destination EFI partition before copying everything from source EFI partition to destination EFI partition
If you're satisfied that the correct files will be deleted, and the correct files will be copied, then and only then change TEST_SWITCH on Line 12 to N instead of Y. You will have to run the cloning task again in order to actually clone the EFI partition.

Please remember:
  • TEST_SWITCH is there for your protection
  • We take no responsibility for any data loss that might occur if the user does not first test-run the script and examine the EFIClone.log file in /Users/Shared
 
Last edited:
Thank CaseySJ for your hard work!

Failed to copy files using SuperDuper 2.8 I get error

and also, could you please more specific about how examine the file /Users/Shared/EFIClone.sh to see all the things that the script will do
 

Attachments

  • Screen01.png
    Screen01.png
    134.9 KB · Views: 12
  • Screen02.png
    Screen02.png
    499 KB · Views: 13
Last edited:
Thank CaseySJ for your hard work!

Failed to copy files using SuperDuper 2.8 I get error

and also, could you please more specific about how examine the file /Users/Shared/EFIClone.sh to see all the things that the script will do
Thanks for pointing this out, which happens when the source and destination volume names are the same. This problem has now been fixed.

Please download the latest EFIClone that was just checked in.

Screenshot 2023-12-17 at 4.43.09 AM.png
 
In my first attempt to run the shell script from your NEW REVISION for SuperDuper 3.8 I was given a Permission Denied error message so I ran the change mode script you previously suggested and then tried again.


To address “permission denied” errors, I think you have to “build in” to the script the permissions terminal command (change mode to +) for “whatever location” the shell script is located in for any users? the shell should actually GIVE ITSELF permission! LOL


in the SECOND attempt after that Terminal command was invoked the result is…(and thank you for all your attention! we can help other users!)


| 11:17:06 AM | Info | ...ACTION: Running shell script EFIClone.sh

| 11:17:06 AM | Info | ......COMMAND => Invoking After Copy shell script: /Users/mynamehere/Documents/EFIClone.sh

| 11:17:07 AM | Error | ***ERROR OCCURRED: /Users/mynamehere/Documents/EFIClone.sh: line 7: syntax error near unexpected token `newline'

| 11:17:07 AM | Error | ***ERROR OCCURRED: /Users/mynamehere/Documents/EFIClone.sh: line 7: `<!DOCTYPE html>'

| 11:17:08 AM | Error | ***ERROR OCCURRED: ****FAILED****: result=512 errno=60 (No such process)
 
In my first attempt to run the shell script from your NEW REVISION for SuperDuper 3.8 I was given a Permission Denied error message so I ran the change mode script you previously suggested and then tried again.

To address “permission denied” errors, I think you have to “build in” to the script the permissions terminal command (change mode to +) for “whatever location” the shell script is located in for any users? the shell should actually GIVE ITSELF permission! LOL
When you start the backup job there is an option to always require the user password. Enable that option.

...

| 11:17:06 AM | Info | ...ACTION: Running shell script EFIClone.sh

| 11:17:06 AM | Info | ......COMMAND => Invoking After Copy shell script: /Users/mynamehere/Documents/EFIClone.sh

| 11:17:07 AM | Error | ***ERROR OCCURRED: /Users/mynamehere/Documents/EFIClone.sh: line 7: syntax error near unexpected token `newline'

| 11:17:07 AM | Error | ***ERROR OCCURRED: /Users/mynamehere/Documents/EFIClone.sh: line 7: `<!DOCTYPE html>'

| 11:17:08 AM | Error | ***ERROR OCCURRED: ****FAILED****: result=512 errno=60 (No such process)
Is this the correct location of EFIClone.sh: /Users/mynamehere/Documents/EFIClone.sh?

Why does it say mynamehere?
 
Last edited:
I"m just editing my own name out of the log after the fact, for illustration. But yes, it IS the Documents folder.
 
I"m just editing my own name out of the log after the fact, for illustration. But yes, it IS the Documents folder.
The script works correctly for me and no permission issue exists. I would suggest double-checking the steps and/or posting screenshots of the SuperDuper configuration screens.

Permission issues may occur if you downloaded the individual file. However, we need to download the ZIP as shown:

Screenshot 2023-12-17 at 12.05.59 PM.png
 
Last edited:
Back
Top