An open-source command-line utility for restoring from backups created by Arq
Download a binary version here.
Get the source code here.
The data format is documented here.
First set 3 environment variables:
ARQ_ACCESS_KEY: your S3 access key IDARQ_SECRET_KEY: your S3 secret keyARQ_ENCRYPTION_PASSWORD: the password you used to encrypt your backupsType arq_restore with no arguments to list all backed-up folders.
Example output:
S3 bucket: akiaiyuk3n3tme6l4hfa.com.haystacksoftware.arq Stefan's MacBook Pro (stefan) UUID 32D9D7A2-3B3E-4BE7-B85B-0605AF24F570
/Volumes/Spinning Disk/stefan/Virtual Machines
UUID: 04587920-BF71-49B4-B4D0-B2E63CA64F88
reflog command: arq_restore /akiaiyuk3n3tme6l4hfa.com.haystacksoftware.arq/32D9D7A2-3B3E-4BE7-B85B-0605AF24F570/buckets/04587920-BF71-49B4-B4D0-B2E63CA64F88 reflog
restore command: arq_restore /akiaiyuk3n3tme6l4hfa.com.haystacksoftware.arq/32D9D7A2-3B3E-4BE7-B85B-0605AF24F570/buckets/04587920-BF71-49B4-B4D0-B2E63CA64F88
/Users/stefan/src
UUID: 1D142EAB-3218-48BD-BF5B-4EAEF504783E
reflog command: arq_restore /akiaiyuk3n3tme6l4hfa.com.haystacksoftware.arq/32D9D7A2-3B3E-4BE7-B85B-0605AF24F570/buckets/1D142EAB-3218-48BD-BF5B-4EAEF504783E reflog
restore command: arq_restore /akiaiyuk3n3tme6l4hfa.com.haystacksoftware.arq/32D9D7A2-3B3E-4BE7-B85B-0605AF24F570/buckets/1D142EAB-3218-48BD-BF5B-4EAEF504783E
/Users/stefan/Dropbox
UUID: 496803FB-AFCB-4102-ACCA-0A96018D32A4
reflog command: arq_restore /akiaiyuk3n3tme6l4hfa.com.haystacksoftware.arq/32D9D7A2-3B3E-4BE7-B85B-0605AF24F570/buckets/496803FB-AFCB-4102-ACCA-0A96018D32A4 reflog
restore command: arq_restore /akiaiyuk3n3tme6l4hfa.com.haystacksoftware.arq/32D9D7A2-3B3E-4BE7-B85B-0605AF24F570/buckets/496803FB-AFCB-4102-ACCA-0A96018D32A4
/Users/stefan/Library
UUID: 4F86F72A-7D70-4C55-A59A-038B96852C47
reflog command: arq_restore /akiaiyuk3n3tme6l4hfa.com.haystacksoftware.arq/32D9D7A2-3B3E-4BE7-B85B-0605AF24F570/buckets/4F86F72A-7D70-4C55-A59A-038B96852C47 reflog
restore command: arq_restore /akiaiyuk3n3tme6l4hfa.com.haystacksoftware.arq/32D9D7A2-3B3E-4BE7-B85B-0605AF24F570/buckets/4F86F72A-7D70-4C55-A59A-038B96852C47
/Users/stefan/bin
UUID: 50451320-3BD4-47EC-B9DC-215633AE61FC
reflog command: arq_restore /akiaiyuk3n3tme6l4hfa.com.haystacksoftware.arq/32D9D7A2-3B3E-4BE7-B85B-0605AF24F570/buckets/50451320-3BD4-47EC-B9DC-215633AE61FC reflog
restore command: arq_restore /akiaiyuk3n3tme6l4hfa.com.haystacksoftware.arq/32D9D7A2-3B3E-4BE7-B85B-0605AF24F570/buckets/50451320-3BD4-47EC-B9DC-215633AE61FC
/Volumes/Spinning Disk/stefan/Music
UUID: 7C554E65-4324-4B81-9675-4D6EA686B0DD
reflog command: arq_restore /akiaiyuk3n3tme6l4hfa.com.haystacksoftware.arq/32D9D7A2-3B3E-4BE7-B85B-0605AF24F570/buckets/7C554E65-4324-4B81-9675-4D6EA686B0DD reflog
restore command: arq_restore /akiaiyuk3n3tme6l4hfa.com.haystacksoftware.arq/32D9D7A2-3B3E-4BE7-B85B-0605AF24F570/buckets/7C554E65-4324-4B81-9675-4D6EA686B0DD
/Volumes/Spinning Disk/stefan/Pictures/iPhoto Library
UUID: A556654E-BCBC-4CF6-A5A9-AA4E6FF7E1DD
reflog command: arq_restore /akiaiyuk3n3tme6l4hfa.com.haystacksoftware.arq/32D9D7A2-3B3E-4BE7-B85B-0605AF24F570/buckets/A556654E-BCBC-4CF6-A5A9-AA4E6FF7E1DD reflog
restore command: arq_restore /akiaiyuk3n3tme6l4hfa.com.haystacksoftware.arq/32D9D7A2-3B3E-4BE7-B85B-0605AF24F570/buckets/A556654E-BCBC-4CF6-A5A9-AA4E6FF7E1DD
/Users/stefan/.ssh
UUID: AF6073E2-36F4-44AE-AC86-7014CA736EC7
reflog command: arq_restore /akiaiyuk3n3tme6l4hfa.com.haystacksoftware.arq/32D9D7A2-3B3E-4BE7-B85B-0605AF24F570/buckets/AF6073E2-36F4-44AE-AC86-7014CA736EC7 reflog
restore command: arq_restore /akiaiyuk3n3tme6l4hfa.com.haystacksoftware.arq/32D9D7A2-3B3E-4BE7-B85B-0605AF24F570/buckets/AF6073E2-36F4-44AE-AC86-7014CA736EC7
/Users/stefan/Desktop
UUID: B5547B68-832A-4C5C-96F1-5DA8CBF3F645
reflog command: arq_restore /akiaiyuk3n3tme6l4hfa.com.haystacksoftware.arq/32D9D7A2-3B3E-4BE7-B85B-0605AF24F570/buckets/B5547B68-832A-4C5C-96F1-5DA8CBF3F645 reflog
restore command: arq_restore /akiaiyuk3n3tme6l4hfa.com.haystacksoftware.arq/32D9D7A2-3B3E-4BE7-B85B-0605AF24F570/buckets/B5547B68-832A-4C5C-96F1-5DA8CBF3F645
The s3 path value is of the form /<s3 bucket name>/<computer uuid>/buckets/<folder uuid>.
(The word "buckets" in the path should be "folders", but it's not for historical reasons).
To restore the latest version of one of the folders, type the restore command listed.
For example, to restore the "src" folder from "Stefan's MacBook Pro" above, type:
arq_restore /akiaiyuk3n3tme6l4hfa.com.haystacksoftware.arq/32D9D7A2-3B3E-4BE7-B85B-0605AF24F570/buckets/1D142EAB-3218-48BD-BF5B-4EAEF504783E
Each time Arq stores a new "commit" (backup), it writes a "reflog entry" containing the commit's key. You can print this reflog (it prints in reverse-chronological order) and then restore a specific commit instead of restoring the latest commit. The command is the same as the restore command for a folder, but with the "reflog" argument at the end. For example:
arq_restore /akiaiyuk3n3tme6l4hfa.com.haystacksoftware.arq/32D9D7A2-3B3E-4BE7-B85B-0605AF24F570/buckets/1D142EAB-3218-48BD-BF5B-4EAEF504783E reflog
produces output like this:
printing reflog for src
reflog /akiaiyuk3n3tme6l4hfa.com.haystacksoftware.arq/32D9D7A2-3B3E-4BE7-B85B-0605AF24F570/bucketdata/1D142EAB-3218-48BD-BF5B-4EAEF504783E/refs/logs/master/343577367
blobkey: <BlobKey d4adc50a482663a50bdcae3327e0f3c10f4bd015,stretchedkey=YES>
author: stefan
date: 2011-11-21 14:09:24 +0000
location: file://Stefan's%20MacBook%20Pro/Users/stefan/src
restore command: arq_restore /akiaiyuk3n3tme6l4hfa.com.haystacksoftware.arq/32D9D7A2-3B3E-4BE7-B85B-0605AF24F570/buckets/1D142EAB-3218-48BD-BF5B-4EAEF504783E d4adc50a482663a50bdcae3327e0f3c10f4bd015
reflog /akiaiyuk3n3tme6l4hfa.com.haystacksoftware.arq/32D9D7A2-3B3E-4BE7-B85B-0605AF24F570/bucketdata/1D142EAB-3218-48BD-BF5B-4EAEF504783E/refs/logs/master/343577118
blobkey: <BlobKey 63e47aa0d84e47c9eb5721c4d675f75cca1af897,stretchedkey=YES>
author: stefan
date: 2011-11-21 14:05:15 +0000
location: file://Stefan's%20MacBook%20Pro/Users/stefan/src
restore command: arq_restore /akiaiyuk3n3tme6l4hfa.com.haystacksoftware.arq/32D9D7A2-3B3E-4BE7-B85B-0605AF24F570/buckets/1D142EAB-3218-48BD-BF5B-4EAEF504783E 63e47aa0d84e47c9eb5721c4d675f75cca1af897
reflog /akiaiyuk3n3tme6l4hfa.com.haystacksoftware.arq/32D9D7A2-3B3E-4BE7-B85B-0605AF24F570/bucketdata/1D142EAB-3218-48BD-BF5B-4EAEF504783E/refs/logs/master/343573520
blobkey: <BlobKey 4f1efe4d3a65edf3ab59741583e47027cc2da3b9,stretchedkey=YES>
author: stefan
date: 2011-11-21 13:05:19 +0000
location: file://Stefan's%20MacBook%20Pro/Users/stefan/src
restore command: arq_restore /akiaiyuk3n3tme6l4hfa.com.haystacksoftware.arq/32D9D7A2-3B3E-4BE7-B85B-0605AF24F570/buckets/1D142EAB-3218-48BD-BF5B-4EAEF504783E 4f1efe4d3a65edf3ab59741583e47027cc2da3b9
You can execute the command listed as "restore command" under each reflog entry to restore that specific "commit".
Copyright (c) 2009-2011, Stefan Reitshamer http://www.haystacksoftware.com
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the names of PhotoMinds LLC or Haystack Software, nor the names of
their contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.