arq_restore

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.

Usage

arq_restore can list the computers ("backup sets") in your destination (Amazon, S3-compatible, GreenQloud, DreamObjects, Google Cloud Storage, and Google Drive), list the folders in a computer's backup set, and restore a folder.

Get Help

Type arq_restore with no arguments to see usage instructions.


Usage:
    arq_restore [-l log_level] listcomputers <target_type> <target_params>
    arq_restore [-l log_level] listfolders <computer_uuid> <encryption_password> <target_type> <target_params>
    arq_restore [-l log_level] restore <computer_uuid> <encryption_password> <folder_uuid> <bytes_per_second> <target_type> <target_params>
    
target_params by target type:
    aws:                 access_key secret_key bucket_name
    sftp:                hostname port path username password_or_keyfile [keyfile_passphrase]
    greenqloud:          access_key secret_key bucket_name
    dreamobjects:        public_key secret_key bucket_name
    googlecloudstorage:  public_key secret_key bucket_name
    s3compatible:        service_url access_key secret_key bucket_name
    googledrive:         refresh_token path

As you can see the arguments are different depending on the type of your storage destination.

List Computers

To list all the computers in your destination, use the listcomputers command. Here's an example using AWS:


$ arq_restore listcomputers aws AKIAIPXLWYHBMEO22ZNQ QMqT0cdSuHs6eCanSVGr/odThlgoBqYfiWuOsOGI akiaiyuk3n3tme6l4hfa.com.haystacksoftware.arq
target: Amazon
    computer FFF83999-A5A5-4E56-B680-05E68FA51814
        Elise's iMac (elise)
    computer 3BA5A6DF-C5EC-409F-9B97-9D437B289BC7
        Mac Mini (stefan)
    computer 2CD9AD49-AE8E-4456-9C60-E75D4B33D4D1
        Sam Reitshamer's computer (sam)
    computer 32D9D7A2-3B3E-4BE7-B85B-0605AF24F570
        Stefan's MacBook Pro (stefan)
    computer 75EB74E3-2B18-4B1C-A54C-A518640C83C8
        office iMac (stefan)

List Folders

To list the folders in a computer's backup set, use the listfolders command:


$ arq_restore listfolders 32D9D7A2-3B3E-4BE7-B85B-0605AF24F570 password aws AKIAIPXLWYHBMEO22ZNQ QMqT0cdSuHs6eCanSVGr/odThlgoBqYfiWuOsOGI akiaiyuk3n3tme6l4hfa.com.haystacksoftware.arq
target   Amazon
computer 32D9D7A2-3B3E-4BE7-B85B-0605AF24F570
    folder /Users/stefan/.gnupg
        uuid 7733A367-E6BA-4A71-A3BE-BCC3A67CF036
    folder /Users/stefan/.ssh
        uuid A66799E8-1046-4458-84B7-C1A0BD751715
    folder /Applications
        uuid 4A2942C3-463F-4B49-B6F8-AF847BA97496
    folder /Users/stefan/bin
        uuid E1C3C6ED-0E22-4EC1-AAD8-08CDE0A3ED19
    folder /Users/stefan/Desktop
        uuid B5547B68-832A-4C5C-96F1-5DA8CBF3F645
    folder /Users/stefan/Documents
        uuid A215E970-1320-4B95-8133-7A50F68FC59D
    folder /Users/stefan/Pictures/iPhoto Library
        uuid 017CBF62-BD6C-4580-9A00-8D008D06B84E
    folder /Users/stefan/Library
        uuid 4F86F72A-7D70-4C55-A59A-038B96852C47
    folder /Volumes/Spinning Disk/stefan/Music
        uuid 7C554E65-4324-4B81-9675-4D6EA686B0DD
    folder /Users/stefan/src
        uuid 1D142EAB-3218-48BD-BF5B-4EAEF504783E

Restore Files

To restore (download) the latest backup of a folder, use the restore command:


$ arq_restore restore 32D9D7A2-3B3E-4BE7-B85B-0605AF24F570 password 7C554E65-4324-4B81-9675-4D6EA686B0DD 10000 aws AKIAIPXLWYHBMEO22ZNQ QMqT0cdSuHs6eCanSVGr/odThlgoBqYfiWuOsOGI akiaiyuk3n3tme6l4hfa.com.haystacksoftware.arq

restoring folder /Volumes/Spinning Disk/stefan/Music to /Users/stefan/temp/Music

...

Google Drive

If you want to use arq_restore with your Google Drive account, it's a bit more complicated. This is because Google Drive uses OAuth authentication. Arq has a client ID and client secret, but we need to keep that to ourselves, so you'll have to create your own client ID and client secret, authorize it for your account, and then copy/paste it into the arq_restore source and compile it.

Get your own client ID and client secret at the Google Developers Console.

Google's gtm-oauth2 project has a handy example app. You can enter your client ID and secret and then use it to authorize access for that client ID to your Google Drive account.

License

Copyright (c) 2009-2014, 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.