How to Back Up to Multiple Destinations with SyncBack
A common request is to back up the same files to more than one place: a NAS in the office, say, and one or two cloud services as well. SyncBack does not do this with a single profile. A profile has one source and one destination. Instead, you create one profile for each destination and put them all in a group. Running the group runs every destination.
This is the normal way to do it, and it has real advantages. Each destination gets its own profile settings and its own log, so you can see exactly what happened at each one. This article shows how to set it up so that the members share as much as possible, which means you only have to change the source or the filters in one place.
TL;DR
Create one profile per destination and put them in a group. In SyncBackSE and SyncBackPro, define the source folder and filters as variables in the group's settings (for example %SRC%) and use those variables in every member, so they are set in one place. Use Copy Profile to create each extra member, then change only its destination. Run the members one after another (the default) or all at once. Schedule the group, not the members: group variables only exist when a member runs as part of the group, and in SyncBack V12.1.26 and newer a member run on its own will fail with a message naming the undefined variable. From V12.1.26 you can tick Only allow the profile to be run as part of a group on each member so that it cannot be run on its own at all.
Table of Contents
Why back up to several places?
A single backup protects you against a single failure. If the backup is on a USB drive next to the computer, a fire, a theft or a ransomware attack that reaches the drive can take out both copies at once. The 3-2-1-1-0 backup strategy addresses this: keep three copies of your data, on two different types of storage, with one copy off-site and one copy offline or immutable, and make sure your backups have zero errors by verifying them.
Backing up to several destinations is how you get the copies. A typical arrangement is:
- A local copy, such as a NAS or an external drive, for fast restores of everyday mistakes.
- An off-site copy, usually a cloud storage service, which survives anything that happens to your building.
- Optionally, a second off-site copy with a different provider, so that a problem with one account or one company does not leave you without an off-site backup.
For the offline copy, one destination can be a set of USB drives that you rotate, with SyncBackPro/SE ejecting the drive when each run finishes. With SyncBackPro, it can instead be a Backblaze B2 bucket with Object Lock turned on, so the backed-up files cannot be changed or deleted. For zero errors, turn on verification in each profile and check the logs after the runs. The 3-2-1-1-0 article covers both in more detail.
See Hybrid Cloud Backup Best Practices and NAS Backup Best Practices for more on choosing destinations. Note that backing up to cloud services requires SyncBackPro.
The approach: a group with one profile per destination
There is no option in a SyncBack profile to add a second or third destination. The supported way to back up to several destinations is a group that contains one member profile for each destination. For example:
- Group: Documents backup
- Member: Documents to NAS
- Member: Documents to cloud A
- Member: Documents to cloud B
The three members back up the same source with the same filters. The only thing that differs is where each one writes to. The rest of this article is about keeping it that way without having to edit three profiles every time something changes. If you are new to groups, Group Queues explains how groups and queues work.
What the members can share
Members can share almost everything except the destination:
| Setting | How to share it |
|---|---|
| Source path | Define a group variable, such as %SRC%, in the group's settings and use it as each member's Source. Members that run as part of the group pick up the group's variables. |
| Include and exclude filters | Also a group variable. One variable can hold several filters separated by /, for example *.tmp/*.bak. |
| File and folder selections | SyncBack V12 Shared Selections. Attach the shared selection to each member individually from the file tree's menu. The bulk Use in Profiles dialog does not support them, and they cannot be used with Fast Backup. |
| Everything else | Use shared settings, or set up the first member fully and use Copy Profile to create the others. |
Variables are looked up in a fixed order: global variables first, then the group's variables, then the profile's own variables. A variable defined in a member with the same name as a group variable overrides the group's value for that member. That is useful for a deliberate exception, but it also means a forgotten variable in one member can quietly stop it following the group. For an introduction to variables, see What are Variables and Why are they used?
Step by step
The example below backs up a documents folder to a NAS and to one or two cloud services, with the source and the exclude filters held as group variables. It needs SyncBackSE or SyncBackPro; see Which edition do I need? for SyncBackFree.
1. Create the first profile
Create a normal backup profile for the first destination, for example Documents to NAS. Set its source, destination, filters and other settings exactly as you want them, and run it once to check that it works. This profile becomes the pattern for all the others, so it is worth getting it right now. In particular, set up its notifications (see notifications below).
2. Create the group and its variables
Create a group, for example Documents backup, and add the first profile to it. Then, in the group's settings, define the variables the members will share. Enter each name without the % signs: the variable called SRC is then used as %SRC%. You can also type the name and value in one go, such as SRC=D:\Documents\. For example:
- SRC set to the folder you are backing up, such as D:\Documents\
- EXCLUDES set to the files to leave out, such as *.tmp/*.bak
3. Point the first profile at the variables
Edit the first profile. Replace its Source with %SRC% and its exclude filter with %EXCLUDES%. Make sure the profile does not define its own variables called SRC or EXCLUDES, because those would override the group's values.
From now on, test the profile by running the group, not the profile on its own. The variables only exist when the profile runs as part of the group (see below).
4. Copy the profile for each other destination
Use Copy Profile to make a copy of the first profile for each extra destination, for example Documents to cloud A and Documents to cloud B. In each copy, change only the destination. The source and filters already use the group variables, and the other settings, including notifications, come across from the original.
Copy Profile does not add the copy to any group. After copying, open the group's settings and add each copy to the group. If you use file and folder selections, attach the same Shared Selection to each member from the file tree's menu.
5. Choose sequential or parallel
A group has two choices that matter here:
- Sequential (the default): the members run one after another. In this mode you can tick Stop the group if any profile fails, so that if a member does not finish successfully, the members after it are not run. Sequential is the right choice for most people, because only one member at a time reads the source disk and uses the network.
- Run profiles in parallel (at the same time): every member starts at the same time, with no limit on how many. This can finish sooner when each destination is slow on its own but your connection has bandwidth to spare, for example several cloud services that each limit how fast a single upload can go. The cost is that every member scans the source disk at once (see below). In parallel mode the group cannot contain sub-groups, and Stop the group if any profile fails is turned off. A group inside another group always runs its members in sequence, even if Run profiles in parallel is ticked.
Groups also have a third mode, Run profiles in a queue, which cannot be combined with Run profiles in parallel or Stop the group if any profile fails. See Group Queues for how it works.
6. Schedule the group
Schedule the group, and do not give the members schedules of their own. When the group runs, each member picks up the group's variables. When a member runs on its own, it does not. See Creating Schedules in SyncBack for how to set up a schedule.
From SyncBack V12.1.26 you can make sure of this. Modify each member, go to When > Group Only (shown in Expert mode) and tick Only allow the profile to be run as part of a group. The member then runs only when the group runs, and every other way of starting it is refused. If you tick it on the first member before you copy it, the copies get it too. If a member already has its own schedule, SyncBack offers to delete it. See Group Queues for the full set of options.
Things to watch out for
Group variables only exist when the member runs as part of the group
A member of a group is still an ordinary profile, and it can be started on its own in many ways: its own schedule, the tray menu, a hotkey, the command line, when a drive is inserted, Background backup, or from the main window. When it runs on its own, the group's variables are not defined.
Before SyncBack V12.1.26, an undefined variable such as %EXCLUDES% was silently left in place as literal text. A filter could then match nothing and quietly stop excluding files, with no error to warn you. In SyncBack V12.1.26 and newer the run fails instead, with a message naming the undefined variable, if one appears in the Source, Destination, Full destination, single zip file name, PAR2 store or the main filters.
So if a member fails with an undefined variable, the most likely cause is that it was started on its own. The fix is the advice in step 6: schedule the group, not the members, and do not give the members their own schedules or other ways to start. In V12.1.26 and newer, tick Only allow the profile to be run as part of a group on each member as well.
A member with that option ticked does not run at all when it is started on its own, so nothing is copied with the wrong settings. The run is recorded as Not Run (Group Only) and counts as a failure, so the member's failure notifications are sent and you find out that something tried to start it. Running a member from under the group in the main window is also refused, unless you also tick Allow the profile to be run as part of a visual group (via the main interface).
Only the immediate parent group's variables are inherited
If you put a group inside another group, the inner group's members get the inner group's variables only. They do not get the outer group's variables. Define the shared variables on the group that directly contains the members.
Background backup cannot use group variables
Do not use Background backup for a member whose Source or filters come from the group. Background backup runs the profile on its own, so the group's variables are not available to it. If the member is set to only run as part of a group, Background backup runs of it are refused.
Each member takes its own snapshot and scans the source again
The members are separate profiles, so each one scans the source again and, if it uses Volume Shadow Copy (VSS), takes its own snapshot. This has two consequences:
- In sequential mode, each destination holds files copied at a slightly different time. A file that changed while the group was running may be in one version on the NAS and a newer version in the cloud.
- In parallel mode, the source disk is scanned once per member, and snapshotted if VSS is on, all at the same time. On a large source or a slow disk this can be slow.
Notifications are per member
Email, Pushover and webhook notifications are set on each member. A group has no notification settings of its own. The group produces one combined log that links to each member's log, but it does not give a single overall result. Set up notifications on each member so that you hear about a failure at any destination. Setting them up in shared settings, or on the first member before you copy it, makes this easy. See SyncBack Notifications.
Which edition do I need?
Groups are available in all editions. Variables, and therefore the shared source and filters described above, need SyncBackSE or SyncBackPro. Backing up to cloud services needs SyncBackPro.
In SyncBackFree you can still create a group with one profile per destination, such as a NAS and an external drive. Each member needs its own Source and filters entered directly, so if you change the folder you back up or the files you exclude, remember to change every member.
Conclusion
Backing up to several destinations is one of the most effective ways to make your backups resilient, and in SyncBack it is done with a group: one profile per destination, with the source and filters held in group variables so they are set in one place. Run the members one after another unless you have a good reason not to, schedule the group rather than the members, and set up notifications on every member. Done this way, adding a new destination is a matter of copying a profile and changing its destination.