In this article we’ll show how features of the iPadOS 13 software update make it easier to back up your precious Affinity documents to a USB drive and online storage.
If your Affinity iPad apps are configured to save to iCloud Drive, that offers protection against loss of or damage to your iPad. It isn’t a backup though; damage to a document that originates on your iPad will affect the copy in iCloud Drive, and vice versa.
A true backup is a second copy stored separate from the files you edit. Better still, as well as a backup that’s stored nearby for quick retrieval, it’s good practice to store another copy off-site. You’ll need sufficient cloud storage, based on the size of your Affinity documents, to do this.
How our solution works
Apple’s free Shortcuts app, included with iPadOS, enables repetitive tasks to be automated. You assemble actions in the sequence that produces your desired outcome.
Security restrictions mean it isn’t possible for Shortcuts to automate the whole back-up process. You’ll have to manually identify the files you want to be backed up and, when it comes to USB storage, indicate where to save the backup.
However, Shortcuts will save time and effort by creating Zip files of your latest documents and making local and online copies. Crucially, your iPad will remind you at the same time each day to back up.
The instructions in this article might look like a lot of effort, but you can’t afford to lose hours of productivity. If you’re determined to use only an iPad, the effort invested now can save you a lot of pain later on.
Affinity iPad apps can save directly to one of two locations: your iPad’s built-in storage or iCloud Drive. Check which is set in your apps’ General preferences.
It’s bad practice to store backups on the same storage as your original documents. If your Affinity apps are saving to iCloud Drive, set up a second cloud storage service that offers integration with the Files app. We will use Dropbox.
A quick tour of Shortcuts
Before building our back-up routine, here’s a quick tour of the Shortcuts app.
- On the left, browse available actions using the categories at the top, or type an action’s name in the search bar.
- Tap an action to append it to the sequence on the right or drag it into a specific position.
- Tap the ellipsis in a circle (next to your shortcut’s name) to open the Details dialog, where you can rename your shortcut.
- Tap the play icon at the bottom right to test your shortcut.
Build the back-up routine
Our back-up routine will consist of two shortcuts. The first will ask whether you want to back up documents from Affinity Designer or Affinity Photo, or from both apps. It will tell the second shortcut what to name the Zip files that contain your backups. Separating the steps of our back-up routine in this way keeps it lean and efficient.
If you choose to back up docs from both apps, you’ll end up with two Zip files with identical date and time stamps at the start of their names, like 24:09:2019, 17:02 Affinity Designer.zip and 24:09:2019, 17:02 Affinity Photo.zip.
Let’s get started.
- Open the Shortcuts app and go to the My Shortcuts tab.
- Tap + at the top right to create a new shortcut.
- Tap the … (ellipsis) next to the shortcut’s name.
- Rename the shortcut Back Up Work.
- Tap Done on the Details dialog.
- Tap Done at the top right.
Before we flesh out the first shortcut, it’s helpful to create the second one now, so we can link the first to it.
- Again in the My Shortcuts tab, tap + at the top right.
- Tap the ellipsis and name this shortcut Back-up Routine.
- Ensure Show in Widget and Show in Share Sheet are turned off.
- Tap Done on the dialog.
- Tap Done at the top right.
Let’s return to editing the Back Up Work shortcut. Tap the ellipsis at the top right of its tile.
Build the first shortcut
Display an alert
- Search for the Show Alert action.
- Tap the action to add it to your shortcut.
- Replace the action’s default text with: Connect a USB drive, (optionally) connect to the Internet, and then tap OK.
- Tap Show More and set Title to Back up Affinity documents.
Display a menu
- Search for and tap the Date action to append it your shortcut. Leave it set to retrieve the current date. This will be used in naming our backups.
- Search for and append the Choose from Menu action.
- Set Prompt to Which app’s documents do you want to back up?
- Add three options to the menu: Affinity Designer, Affinity Photo, and Both apps.
In the right pane, the Choose from Menu action consists of multiple blocks. Three are named after the menu options you specified. After them is End Menu. You’ll drag actions beneath the former three blocks to set the actions that are performed in response to each choice.
In turn, search for the Text and Run Shortcut actions and drag them into the Affinity Designer branch of the menu as shown here:
Now let’s deal with the fine details.
- Tap in the body of the first Text action.
- In the top row of the on-screen keyboard, tap Current Date.
- Within the action, tap the Current Date token.
- Tap Date Format, choose Short and then tap Done.
- Tap to the right of the token. Type a space and then Affinity Designer.
- In the Run Shortcut action, tap Shortcut.
- Select the Back-up Routine shortcut you created earlier.
- Tap Show More and turn off Show While Running.
Fill out the remaining branches
- Repeat the previous group of steps for the menu’s Affinity Photo branch, but (in step 5) type Affinity Photo instead.
- Repeat the previous group of steps for the menu’s Both apps branch twice, so it contains Text, Run Shortcut, Text, and Run Shortcut actions in that order.
- This branch’s first Text action should end with Affinity Designer.
- This branch’s second Text action should end with Affinity Photo.
The second and third branches of the Choose From Menu action should now look like this:
Tap Done to return to the My Shortcuts tab.
Build the second shortcut
Tap the ellipsis on the Back-up Routine shortcut’s tile. This is where the actions that actually back up files will be placed.
This shortcut will present a dialog in which to browse to and select files to be backed up.
Select files to back up
- Add the Get File action to your shortcut.
- Leave Service set to iCloud Drive. This allows you to browse to your Affinity documents whether they are stored there or in your iPad’s built-in storage.
- Turn on Show Document Picker and Select Multiple.
Create an archive of the files
Next we’ll create a Zip file containing the files you selected. Steps 7 and 8 here show how you can improve the readability of a shortcut, helping you to understand its meaning if you modify it a long time after it was created.
- Append the Make Archive action.
- Within the action, tap File.
- Tap Rename near the centre of the screen.
- Change the text to Selected Files.
- Tap OK and then Done near the middle-right of the screen.
- Tap Show More.
- In the Archive Name row, tap optional.
- Tap Shortcut Input in the top row of the on-screen keyboard.
Save the archive
We’ll save the archive to a USB drive and then to online storage. It’s good to present a reminder of what you need to do at this point when the shortcut is running.
- Append the Show Alert action.
- Set the alert’s text to Choose a back-up destination on your USB drive.
- Tap Show More and turn off Show Cancel Button.
Save the archive
- Append the Save File action.
- Tap File and then Select Magic Variable.
- Tap the Archive token beneath the earlier Make Archive action.
- Leave Ask Where to Save turned on and Service as iCloud Drive.
Selecting iCloud Drive in fact enables you to choose other storage locations connected to the Files app, or a USB drive that is connected when the action runs.
Display a notification
If backing up fails, the shortcut will exit. Otherwise it’s reassuring to receive a notification that confirms success, especially if you’re backing up large files that take a while to process.
- Append the Show Notification action.
- Replace the action’s default text with Backup to chosen destination finished.
Save to Dropbox too!
The final two actions in our workflow create an off-site backup. They are worth adding in case your iPad and USB drive become damaged or stolen.
- Append another copy of the Save File action.
- In the action, tap Saved File (which is the copy on your USB drive).
- Near the screen’s left edge, tap Clear.
- In the action, tap File and then Select Magic Variable.
- Tap Archive beneath the earlier Make Archive action.
- Set Service to Dropbox.
- Tap Allow Access. You’ll be taken to the Dropbox app.
- Tap Allow and you’ll be returned to Shortcuts.
- Turn off Ask Where to Save.
- Next to Destination Path, tap optional and type something like /Affinity backups. If the folder does not exist on your Dropbox, it will be created when the action runs.
Display another notification
The backup will be copied to the local copy of your Dropbox, but it will only be uploaded to the service when your iPad is connected to the Internet. Display a notification to remind you of that.
- Append the Show Notification action.
- Set the notification’s text to Backup copied to Dropbox app. Remember to go online to ensure it is uploaded.
That’s the shortcut constructed. Tap Done to return to the My Shortcuts tab.
Test your shortcut
The back-up routine needs to be tested in case any mistakes have been made. Ensure your iPad is connected to the Internet.
To properly test the routine, we need to check it works from a notification that’s triggered by the time of day.
Set up a timed automation
- Go to the app’s Automation tab.
- If you have any existing automations, first tap + (top right). Next, tap Create Personal Automation.
- Tap Time of Day and dial in a time. For testing purposes, make this a few minutes from now.
- Scroll down to reveal the Repeat options. (You’ll need to swipe near an edge of the dialog.)
- Tap so that your workdays (and whatever day it is currently) are checked.
- Tap Next.
- Tap Search for apps and actions. Search for and tap Run Shortcut.
- In the action, tap Shortcut and choose Back Up Work.
- Tap Next.
- Tap Done.
You can now leave the Shortcuts app. At the time chosen in step 3, a notification should appear at the top of the screen. Swipe downwards on it and tap Run to begin testing your shortcut.
Test the shortcut
- When prompted, connect a USB drive and tap OK.
- Tap Affinity Designer, for example.
- Tap the Browse tab and go to the Affinity Designer folder on your iPad or in iCloud Drive.
- Swipe down on the file list to reveal view options.
- Tap Date so the most recently modified files are listed first.
- Tap Select and then the documents to back up.
- Tap Open. It may take a while for the Zip archive to be created.
- Browse to the folder on your USB drive where you want backups to be saved.
- Tap Save. Ensure that a notification banner confirms completion.
- Wait for the second notification that reminds you to go online so the Zip archive also uploads to Dropbox.
- Depending on your Internet connection’s speed, check later in the Dropbox app that the file was successfully uploaded to Dropbox’s server.
Retrieve a file from a backup
In the Files app, find the Zip file containing the document version you want to restore. The app will unpack the file’s contents to the same location.
Where possible, unpack the Zip file that’s stored on a USB drive. Use the copy in Dropbox as a last resort; if it’s needed, copy it to a new folder in On My iPad and unpack it there to avoid wasting bandwidth on uploading the unpacked contents back to the cloud.
- Tap the Zip file and Files will unpack it to the same location.
- Select only the files you want to recover and move them to the corresponding Affinity app’s folder in On My iPad or iCloud Drive.
- Delete any unwanted files from the unpacked Zip file.
- In your Affinity app, tap + at the document list, then Open From Cloud.
- Browse to the restored document and tap it.
That’s it. Go back to the Shortcuts app’s Automation tab and change the time at which the reminder to back up is displayed. Make it enough in advance of your workdays’ end that the shortcut can finish its job before you leave.
There’s one more thing to remember: before each backup, ensure you save changes to any documents that remain open in your Affinity apps, so Shortcuts backs up the latest versions!