Wiki source code of iTunes

Last modified by Sebastian Marsching on 2022/05/29 12:14

Show last authors
1 {{toc/}}
2
3 # Excluding iOS backups from roaming profiles
4
5 iTunes saves iOS backups in the `AppData\Roaming\Apple Computers\MobileSync\Backup` folder of the user's profile. As iOS backups can be quite large (10+ GBs), synchronizing the user profile when using roaming profiles can get very slow. Unfortunately, iTunes does not provide any means to specify a different path. However, there are two approaches (which can be combined if desired) to solve this problem:
6
7 ## Solution 1: Exclude the folder from the roaming profile
8
9 There is a group policy which allows to exclude specific paths from the roaming profile. These paths will not be copied from the client computer to the network server and vice-versa. This policy can be found under _User Configuration_ → _Policies_ → _Administrative Templates_ → _System_ → _User Profiles_ and is called _Exclude directories in roaming profile_.
10
11 ## Solution 2: Create a symbolic link to redirect the backup folder
12
13 Solution 1 has the disadvantage that the backups are only kept on the local computer. This can be undesirable because local data might not be included in backups. However, it is possible to create a symbolic link to store the data in a different directory (e.g. on a network drive). Use the mklink command for this purpose. For example:
14
15 ```bat
16 mklink /D "C:\Users\<username>\AppData\Roaming\Apple Computers\MobileSync\Backup" "\\server\path\to\user\share\<username>\Documents\iOS Backup"
17 ```
18
19 The command has to be run with administrative privileges (unfortunately, normal users cannot create such links). The backup folder should be moved to its new location before running this command. Using a symbol link has the advantage that it can point to a network share (a junction point cannnot).
20
21 Unfortunately, this step has to repeated on every computer on which iTunes is used to synchronize iOS devices because the symbol link is not synchronized as part of the roaming profile. Maybe, someone has a clever idea about how to automate this (it is not easy because administrative privileges are required). However, when combined with solution 1, even if the symbol link is not created, the backup will not be stored as part of the roaming profile (however, this means that backups will differ between different computers).
22
23 On a side note, the privilege to create symbolic links can be given to other uses than administrators through a group policy setting (_Computer Configuration_ → _Policies_ → _Windows Settings_ → _Security Settings_ → _Local Policies_ → _User Rights Assignment_ → _Create symbolic links_). However, one should be careful with assigning this privilege to broadly, because it might have security implications. The documentation for the group policy setting says: “WARNING: This privilege should only be given to trusted users. Symbolic links can expose security vulnerabilities in applications that aren't designed to handle them.”
24
25 ## Further resources
26
27 I found the following resources helpful in figuring out these two solutions:
28
29 * [https://discussions.apple.com/thread/2702164](https://discussions.apple.com/thread/2702164)
30 * [http://pep-p.com/wp/move-itunes-backup-onto-network-drive/](http://pep-p.com/wp/move-itunes-backup-onto-network-drive/)
31 * [http://www.wintotal.de/tipparchiv/?id=1852](http://www.wintotal.de/tipparchiv/?id=1852) (German)
32 * [http://heiko-hoehn.com/itunes-backup-speicherort-bei-windows-7-andern/](http://heiko-hoehn.com/itunes-backup-speicherort-bei-windows-7-andern/) (German)