QRecallDownloadIdentity KeysForumsSupport
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Groups] Back to home page 
Can I make a bootable duplicate with QRecall?  XML
Forum Index » Cookbook and FAQ
Author Message
Nancy Baird



Joined: 15-Jul-18 16:02
Messages: 6
Offline

Is is possible to make a bootable duplicate with QRecall (like with CarbonCopyCloner or Super Duper)?
Joe Kissell's current "Take Control of Backing Up Your Mac: The Online Appendixes" has a Yes in QRecall's Bootable Duplicate column, for version 2.0.9. But I can't see how to do this. I don't know if I'm just not understanding QRecall's terminology or capabilities, or whether there's an error in the table.
James Bucanek



Joined: 14-Feb-07 10:05
Messages: 1434
Online

Nancy Baird wrote:Is is possible to make a bootable duplicate with QRecall (like with CarbonCopyCloner or Super Duper)?

Absolutely.

If you capture a bootable system volume and then restore it to different volume, that restored copy will be bootable too.

See QRecall Help > Basics > Restore Items > Restoring a Volume to a Different Volume.

Having said that, there is some fine print. The system you use to restore the volume should be the same major version of macOS (or later) and of course the volume you restore to must be capable of booting macOS (e.g. local hard drive, HFS+ or APFS format on GUID partition, ignore ownership and permissions turned off, ... in other words, the same prerequisites required to install a fresh version of macOS).

- QRecall Development -
[Email]
Nancy Baird



Joined: 15-Jul-18 16:02
Messages: 6
Offline

Does this restore operation have to be done manually? I don't see Restore listed as an action in QRecall Help > Automation > Actions.

I suppose that the bootable duplicate could be created (manually) when needed if I had a bootable recovery drive as described in QRecall Help Quick Start > Backup Strategies > Bootable Recovery Drive?
James Bucanek



Joined: 14-Feb-07 10:05
Messages: 1434
Online

Nancy,

That's an interesting suggestion.

When designing QRecall, the assumption was that you would regularly capture your startup volume. When disaster struck, you would restore your system from one of the many versions captured in the archive, and get back to work.

And yes, that's exactly the technique described in the Backup Strategies > Bootable Recovery Drive section of the help.

So it has never occurred to me that someone would want to automate a recall/restore.

While it's not a built-in feature, you could automate a regular recall/restore using the qrecall command-line tool, although that's a bit geeky. In fact, in the latest version of QRecall (2.1, to be released any day now), you could attach a script to your daily capture action that would then immediately restore that same volume somewhere else.

If this is something important to you, let me know and I'll put it on the wish list.

- QRecall Development -
[Email]
Nancy Baird



Joined: 15-Jul-18 16:02
Messages: 6
Offline

I have been creating backups as both versions and bootable duplicates for over 10 years, convinced by Joe Kissell's arguments in (what is now) "Backing up your Mac" on the different value of each type of backup. I can't recall ever needing to recover an individual file or folder from the version history, but on at least 3 occasions I've depended on my bootable duplicate to keep me up and running after my Mac hardware failed, until it could be repaired or replaced, and the duplicate allows a very easy migration integrated in the Apple software when transferring over to a new Mac.

So automatic creation of bootable duplicates is indeed important to me.

That said, I should be able to handle a bit of geekiness. I haven't used command line on the Mac much, but I've got some familiarity with Linux, so I'll see what I can figure out for the qrecall command-line tool.

Thanks for your prompt and informative replies.
James Bucanek



Joined: 14-Feb-07 10:05
Messages: 1434
Online

Nancy,

To get you started, an epilog script (supported in QRecall 2.1) that would automatically recover the volume you just captured to a different volume would look something like this:


This message was edited 2 times. Last update was at 18-Jul-18 13:41


- QRecall Development -
[Email]
yaman blogger



Joined: 25-Jul-18 07:27
Messages: 1
Offline

great
Nancy Baird



Joined: 15-Jul-18 16:02
Messages: 6
Offline

Have updated to 2.1 and tried the script.
I get "Epilog failed to launch" in the Log. Is it possible to get any more detailed information?

I have successfully run the script directly with bash -x after manually setting QR_ARCHIVE_PATH, but I did have to change the single-quotes in setting MIRROR_VOL to double quotes and had to fiddle with just how to set QR_ARCHIVE_PATH, because my volume names contain single quotes. Is it perhaps possible that QR_ARCHIVE_PATH isn't getting passed as intended to the script because of this?

Mirror volume name is /Volumes/Alpha's 2 Dup. Archive is at /Volumes/Alpha's 2 Versions/Alpha's 2 Versions.quanta
James Bucanek



Joined: 14-Feb-07 10:05
Messages: 1434
Online

Nancy,

It's hard to tell what's going on, but I suspect your script file might not be executable. (That's not a joke.)

An executable script is marked as "executable" and has the magic "she-bang" line that tells POSIX which interpreter to use.

So the script should start with the line

Then set the script file's "executable" permission flag:
(obviously replace this path with your script's path)

Being able to run the script via bash means that the script is a functional bash script, but that doesn't make the script file itself an executable file. These two steps should make that happen.

When you're done, you can test this by executing the script directly, as if it were a standalone program:

Or, if you want to really test it, execute it with the desired environment variables set:

- QRecall Development -
[Email]
Nancy Baird



Joined: 15-Jul-18 16:02
Messages: 6
Offline

None of this seems to be the issue. My script already had executable permission and the "she-bang" line. But to limit the variables, I moved my script to ~/bin as per your example. The script on its own executes fine, but attaching it to an action as an epilog still fails.

I've discovered the "Details" slider at the top of the Log window and here's what I see:

Action 2018-08-02 16:23:49 ------- Capture and Restore to Dup, Alpha's 2
Action 2018-08-02 16:23:49 archive: /Volumes/Alpha's 2 Versions/Alpha's 2 Versions.quanta
Action 2018-08-02 16:23:49 Minutia Waiting for permission to open archive
Action 2018-08-02 16:24:16 Minutia Acquired permission to open archive
Action 2018-08-02 16:24:16 Capture Macintosh HD
Action 2018-08-02 16:24:16 Minutia Locating changes since Today 2:00 AM
Action 2018-08-02 16:29:48 Minutia Recaptured files
Action 2018-08-02 16:42:26 Captured 89 items, 3.46 GB (92% duplicate)
Action 2018-08-02 16:42:31 Failure Epilog failed to launch
Action 2018-08-02 16:42:31 Couldn't posix_spawn: error 8
Action 2018-08-02 16:42:31 executable: /Users/Admin/bin/mirror_volume.sh
Action 2018-08-02 16:42:31 ------- Capture finished (18:14)


Here's my script, and the demonstration that it ran OK when invoked directly.

Alpha-Mac-298:~ Admin$ ls -ld bin
drwxr-xr-x 3 Admin staff 96 Aug 1 17:23 bin
Alpha-Mac-298:~ Admin$ cd bin
Alpha-Mac-298:bin Admin$ ls -l
total 8
-rwxr-xr-x 1 Admin staff 652 Aug 1 17:22 mirror_volume.sh
Alpha-Mac-298:bin Admin$ cat mirror_volume.sh
#!/bin/bash

# QRecall script to immediately restore the captured volume, to a different volume.
# Note: this script assumes the archive contains a single volume for a single owner.
# If there is more than one owner or volume, adjust the '*:*' parameter accordingly.
# Also, make sure the mirror volume has ownership and permissions enabled and is
# the correct format (HFS+ or APFS).

# Path of volume to mirror
# WARNING: this volume will be completely overwritten
MIRROR_VOL="/Volumes/Alpha's 2 Dup"

qrecall restore "${QR_ARCHIVE_PATH}" --tovolume "${MIRROR_VOL}" '*:*'
Alpha-Mac-298:bin Admin$ env QR_ARCHIVE_PATH="/Volumes/Alpha's 2 Versions/Alpha's 2 Versions.quanta" ~/bin/mirror_volume.sh
Alpha-Mac-298:bin Admin$



Tool 2018-08-01 17:28:56 ------- qrecall restore
Tool 2018-08-01 17:28:56 Minutia arguments
Tool 2018-08-01 23:03:24 ------- qrecall restore exiting with status 0


James Bucanek



Joined: 14-Feb-07 10:05
Messages: 1434
Online

Nancy,

So I'm not sure what's going on. According to man 2 intro, POSIX error 8 is:

So there's something about your file, or file format, that the kernel doesn't like. Try this command:

The result should be "mirror_volume.sh: Bourne-Again shell script text executable, ASCII text"

If it's not, then that's the problem.

My first guess would be character encoding. Make sure the file is plain ASCII-7 or UTF-8 format without a BOM.

- QRecall Development -
[Email]
Nancy Baird



Joined: 15-Jul-18 16:02
Messages: 6
Offline

It's working now.

The problem turned out to be whitespace at the beginning of the first line, and wasn't visible in the way I previously quoted the script code.

The way it works:

The way it fails:

Thanks for your very responsive help in getting this worked out.
 
Forum Index » Cookbook and FAQ
Go to:   
Powered by JForum 2.1.8 © JForum Team