Archive for the ‘s3’ Category

Using Arq with IAM

Thursday, August 23rd, 2012

This post is for system administrators who support Arq on multiple computers. If that’s you, please read on!

IAM and Arq

If you need to install Arq on many computers using the same S3 account but you don’t want Arq to see the other computers’ backup data, use Amazon’s IAM (Identity and Access Management) to restrict what Arq sees.

The easiest way to do this is as follows:

  1. Use your main keys to install and configure Arq on a computer.
  2. Quit Arq and quit Arq Agent.
  3. Create an IAM user and capture its access key ID and secret access key.
  4. Look in (home)/Library/Arq/config/app_config.plist for the localS3BucketName and localComputerUUID values.
  5. Set up an IAM user with a policy that allows full access only to /<localComputerUUID> in the localS3BucketName, as well as “ListBucket” access (see example IAM policy below).
  6. Open the Keychain Access app and change the “Arq S3″ entry’s Account and Password fields to the access key ID and secret access key of that IAM user.
  7. Launch Arq.

Example IAM Policy

For computer with the following values:

  • localS3BucketName = akiaiyuk3n3tme6l4hfa.comhaystacksoftwarearq
  • localComputerUUID = 32D9D7A2-3B3E-4BE7-B85B-0605AF24F570

the IAM policy would look like this:

{
 "Statement": [
   {
     "Sid": "Stmt1344522941209",
     "Action": [
       "s3:ListBucket"
     ],
     "Effect": "Allow",
     "Resource": [
       "arn:aws:s3:::akiaiyuk3n3tme6l4hfacomhaystacksoftwarearq"
     ],
     "Condition": {
       "StringLike": {
         "s3:prefix": "32D9D7A2-3B3E-4BE7-B85B-0605AF24F570/*"
       }
     }
   },
   {
     "Sid": "Stmt1344522997713",
     "Action": [
       "s3:*"
     ],
     "Effect": "Allow",
     "Resource": [
       "arn:aws:s3:::akiaiyuk3n3tme6l4hfacomhaystacksoftwarearq/32D9D7A2-3B3E-4BE7-B85B-0605AF24F570/*"
     ]
   }
 ]
}

The first part gives “s3:ListBucket” permission for the user’s bucket, but only with a prefix starting with 32D9D7A2-3B3E-4BE7-B85B-0605AF24F570/* (her UUID).

The second part gives permission for all actions for resources starting with akiaiyuk3n3tme6l4hfacomhaystacksoftwarearq/32D9D7A2-3B3E-4BE7-B85B-0605AF24F570/*.

Answer Files and IAM

For information on automating Arq configuration using answer files and IAM, please read the Arq manual’s Configuring Arq Using an Answer File section.

Arq plugin for Sidekick

Saturday, April 28th, 2012

Arq Forum member jmah did some reverse-engineering of Arq and posted a message about a plugin he wrote for Sidekick which tells Arq to back up whenever he returns home.

The source code is on github.

Really clever! I love it.

Arq 2.6.9 is out

Saturday, April 28th, 2012

Arq version 2.6.9 is now available!

This minor update fixes several minor issues, including the issue where some backup sets weren’t appearing under “Other Backup Sets”.

It’s a free update for all Arq users. Pick “Check for Updates” from the Arq menu to get the update.

As always, full release notes for all Arq versions are on the release notes page.

Arq 2.3 is out!

Wednesday, December 7th, 2011

Arq version 2.3 is now available!

This update includes support for the new “us-west-2″ (Oregon) S3 region.

It’s a free update for all Arq users.

As always, full release notes for all Arq versions are on the release notes page.

How I recovered after an OS X reinstall

Sunday, September 19th, 2010

The other day I reinstalled OS X. My computer had become extremely sluggish and I wanted to see if the performance would improve if I reformatted my hard disk and started over. Along the way I learned a few lessons about restoring using Arq. Here’s what I did:

Before Wiping Out My Data

Before I went through with it, I made sure I had all my data backed up. Arq had backed up the following:

  • ~/Library (excluding Logs and Caches)
  • ~/Documents
  • ~/Music
  • ~/Pictures/iPhoto Library (my photos)
  • ~/src (my source code)
  • /Applications
  • /Library/Application Support

Reinstalling

I inserted the Snow Leopard installation disk, shut down the computer, and then started it holding down the Option key. I clicked on the DVD and the computer booted from it. I formatted the disk and installed OS X. I created a user with the same name as I was using before.

Next I downloaded and installed Arq. I launched Arq and entered the same S3 keys and encryption password I was using before.

Finally it was time to restore using Arq.

Initial Restore

Instead of waiting for absolutely everything to be restored from S3, I restored files in several steps.

Restoring ~/Library

The first step was to restore ~/Library from my “other computer” (the previous incarnation of my computer). I opened the triangle next to “Other Computers”, found my old computer, opened the triangle next to “Library” and selected the latest backup:

recover2.png

Then I clicked “Restore…” and Arq restored the Library folder to ~/Restored by Arq/Library (because a Library folder already existed).

When that restore was done, I closed all open applications, deleted the contents of ~/Library, and dragged everything from ~/Restored by Arq/Library to ~/Library.

Back in Business

At that point I could use Mail, iCal and Address Book. I selected a few applications in Applications backup folder and restored them as well.

I also wanted to sync my calendars with my iPhone, so I plugged it in and it sync’d. Later I’ll delete the iTunes files in ~/Music and replace them with the backed-up files.

Restoring Everything Else

Now that the computer felt “back to normal”, I restored my “src” folder (where all my work files are). Then I got back to work, restoring the really large folders (Documents, Music and Pictures) at my leisure over the next few days.

Conclusions

The multi-step restore approach was a big time-saver and got me up and running fairly quickly. The Library folder was relatively small (really small in fact, with the exception of Mail).

I learned that reformatting the hard drive helped a little with sluggishness, but the long-term fix is likely the purchase of an Optibay and an SSD.

I also learned that restoring this way is fairly complicated. So I’m thinking about how to make a product that would restore more seamlessly while also allowing people to get back to work before absolutely everything is restored. There’ll be more to come on that.

Deleting other computers’ backups

Saturday, September 18th, 2010

If you’ve transferred your work to a new computer and don’t need the old computer’s backups in your S3 account anymore, you’ll need to delete them. Arq does not currently provide a mechanism for deleting those backups, but you can delete them through the AWS Management Console. Here’s how to do that:

First, open the AWS Management Console (https://console.aws.amazon.com/s3/home).

Next, select the bucket that Arq uses for its backups (named “.com.haystacksoftware.arq”).

Now you’ll have to determine the computer UUID that you want to delete. To do this, look at the computerinfo file within each one:

  1. double-click on a computer UUID
  2. control-click on the file computerinfo and pick “Download”
  3. open the downloaded file with TextEdit
  4. if the “computer name” matches the one you want to delete, you’ve found the right computer UUID.

Here’s an example “computerinfo” file:

<plist version="1.0">
    <dict>
        <key>userName</key>
        <string>stefan</string>
        <key>computerName</key>
        <string>Stefan Reitshamer’s MacBook Pro</string>
    </dict>
</plist>

In that example, the computer name is “Stefan Reitshamer’s MacBook Pro”.

Now that you’ve found the right computer UUID to delete, go back and select the bucket itself to see all the computer UUIDs again. Then control-click on the computer UUID you want to delete, and pick “Delete” from the pop-up menu. AWS Management Console will delete all the objects for that computer UUID.

WARNING: This delete cannot be undone! Please be careful when deleting.

How to back up and restore your important Mac OS X files

Saturday, September 18th, 2010

Apple has excellent instructions for backing up and restoring

  • Safari bookmarks
  • Address Book contacts
  • iCal calendars
  • Keychains
  • Mail preferences and messages

Here’s the link: http://support.apple.com/kb/ht2980

To back up your Safari bookmarks etc, make sure Arq is backing up these items:

  • ~/Library/Preferences/com.apple.Safari.plist
  • ~/Library/Preferences/com.apple.Safari.LSSharedFileListplist
  • ~/Library/Preferences/com.apple.Safari.RSS.plist
  • ~/Library/Safari/

To back up your Address Book, make sure Arq is backing up these items:

  • ~/Library/Application Support/AddressBook/
  • ~/Library/Preferences/com.apple.AddressBook.plist

To back up your iCal calendars, make sure Arq is backing up these items:

  • ~/Library/Calendars/
  • ~/Library/Preferences/com.apple.iCal.plist
  • ~/Library/Preferences/com.apple.iCal.helper.plist

To back up your Keychains, make sure Arq is backing up this folder:

  • ~/Library/Keychains/

To back up your Mail, make sure Arq is backing up these items:

  • ~/Library/Mail
  • ~/Library/Preferences/com.apple.mail.plist

To restore, follow the instructions in the Apple support article linked above.

How to back up your Mac using Arq

Wednesday, July 21st, 2010

When I started developing Arq it was partly because I couldn’t find an existing online backup offering that gave me enough control. I wanted to control exactly which files would be backed up, and I didn’t want to be constrained by rules that many of the “unlimited backup” offerings had like excluding network drives, excluding applications, etc.

So Arq lets you back up anything you want. But then the question is, what should you back up? The following is my suggestion for a basic backup of your files on your Mac.

Basic Backup Using Arq

When you first install and launch Arq, it asks your for your Amazon S3 “keys” and a few other things. Then it asks if you’d like to choose your own files for backup, or back up your home folder minus a few unnecessary items:

Screen shot 2010-07-21 at 8.02.18 AM.png

If you picked “I’ll manually add folders to back up” and you’ve changed your mind, here’s how to set up Arq to back up your home folder minus the unnecessary items:

1. Add your home folder

Click the + button at the bottom left of the Arq main window.

Screen shot 2010-07-21 at 8.10.25 AM.png

Pick your home folder (/Users/<yourname>) and click OK.

Screen shot 2010-07-21 at 9.27.33 AM.png

2. Add some excludes

Click the “Edit Excludes…” button.

Screen shot 2010-07-21 at 8.08.05 AM.png

Add 3 excludes.

Screen shot 2010-07-21 at 8.15.33 AM.png

Make sure the first 2 are set to “relative path” instead of “name”.

Click OK.

Backing Up Applications Using Arq

If you want to back up your applications, add the Applications folder.

Screen shot 2010-07-21 at 8.28.12 AM.png

Many applications put some of their support files in /Library/Application Support, so add that too.

Screen shot 2010-07-21 at 8.29.02 AM.png

Advanced Backup Using Arq

If you prefer, you pick and choose specific folders to back up instead of backing up your entire home directory.

WARNING: If you choose to do this and you later create a new folder in your home directory and start putting important files in there, you’ll have to remember to add this new folder to Arq or else it won’t be backed up!

I back up the following folders as separate items in Arq:

  • Application Support (/Library/Application Support)
  • Applications (/Applications)
  • Documents
  • Library, excluding files/folders named ‘Caches’ and ‘Logs’
  • Music
  • osaka iPhoto Library (my big iPhoto Library, named after my computer), excluding files/folders named ‘iPod Photo Cache’
  • src (my work files), excluding files/folders named ‘build’ and ‘bin’

Time Machine and Arq

Time Machine and Arq are complementary. Backing up using Time Machine to another disk is cheap and fast. If you’re backing up to a Time Capsule via Wifi it’s very convenient because it just happens; there’s nothing to plug in. If you’re backing up to a USB drive, you’ll have to remember to plug in the USB drive periodically. Restoring is fast because you’re reading from a USB disk physically connected to your Mac, or from a Time Capsule over Wifi.

But Time Machine doesn’t cover all cases. If someone breaks in and steals your computer, they may steal your Time Capsule or USB drive as well, and then your files are gone forever. If fire, flood, or lightning strikes, you may lose both your computer and your backups; files gone forever. And if you travel often, you’ll have to bring along your USB drive or Time Capsule, or backups won’t happen until you get home and stay home long enough for a backup to complete.

Arq covers those cases that Time Machine doesn’t. The backups are off site at Amazon’s servers, safe from your theif and your natural disasters. They’re even safe from disaster at an Amazon site because Amazon replicates your data at several sites. And Arq works whenever there’s an Internet connection, so backups still happen when you’re on the road.

Arq 1.5 is out!

Friday, July 16th, 2010

I’m really excited to ship Arq 1.5!

It includes scheduling options like once-per-day backups and manual-only (one of the most requested features) as well as Pause/Resume and Back Up Now functions. It also includes a whole bunch of refinements and bug fixes.

To get it, pick “Check for Updates” from the menu in Arq, or download it from the product page.

Here are the details:

Feature Additions

  • Configurable backup schedule: hourly, once/day at a certain time of day, or manually.
  • Back Up Now feature.
  • Pause backups for an amount of time you choose. Resume early if you wish. (‘Pause’ is better than ‘stop’ because you won’t have to remember to start it again).
  • Progress indicator next to the “Other Computers” heading in the source list (on the left side of the window) so you can tell when Arq is still scanning for other computers’ backups in the S3 data.
  • More informative status messages such as “Calculating upload size” and “Finishing backup” instead of just “Backing up …”
  • Better communication of error and warning conditions.
  • Estimated backup time is now calculated based on start of backup, not start of calculating upload size.
  • More accurate progress bar in 2 scenarios — when saving the “packs” of small files, and when re-doing an initial backup that was aborted.
  • More useful logging output when log level is set to Info.
  • Much faster loading when browsing backups.

Bug Fixes

  • More efficient caching of the set of objects in S3.
  • Fixed an issue where calculating the upload size for a backup was incomplete when a permission error was encountered.
  • Fixed issues with high memory usage in both Arq and Arq Agent.
  • Fixed an issue that was preventing the “Start at Login” preference from persisting.
  • Fixed 2 issues where packs weren’t being read correctly, leading to “object not found” errors.
  • Fixed regression bug in restoring file permissions correctly for root-owned files.
  • Fixed an issue where the folder’s progress bar was occasionally disappearing.
  • Fixed an issue with trying to read extended attributes on files that don’t support extended attributes.

Enjoy! If you have any feedback or questions I’d love to hear from you! Just email support@haystacksoftware.com. Thanks!

- Stefan

Arq 1.4.4 is out!

Friday, June 18th, 2010

This release fixes a bug that causes high CPU usage after Arq Agent has been running for many hours and there are backup errors (e.g. folder to be backed up isn’t available).

Pick “Check for Updates” from the Arq menu to automatically update to 1.4.4. Or download Arq here.