FolderSync works by synchronizing the contents of two folders. These two folders must be different and can be located on your Android device, on your file server or in cloud storage.
The typical use case is syncing a folder on your Android device with a folder in Google Drive, for example to backup files from your device or to enable offline access to files on your device, that would otherwise only be located in the cloud.
FolderSync allows you to freely select any folder it can access when configuring the folderPair sync.
Types of sync
FolderSync support 2 different sync types, one-way sync and two-way sync:
- To left folder (one-way sync)
- To right folder (one-way sync)
For legacy folderPairs "To left folder" is called "To local folder" qnd "To right folder" is called "To remote folder". For legacy folderPairs the left/local folder is always on the local device. Experimental folderPairs allows for syncing between two remote servers directly.
When selecting a one-way sync type (to left or to right folder) FolderSync will mirror the source folder to the destination folder.
- Modified files or new files created in the source folder will be synced to the destination folder. See File Comparison section below for how comparing to any existing file is handled.
- Modified files or new files created in the destination folder will NOT be synced to the source folder.
- If deletion is disabled any folders/files in the destination folder, which are not present in the source folder, will be ignored.
- If deletion is enabled (disabled by default) any folders/files in the destination folder not present in the source folder will be deleted.
When selecting a two-way sync type FolderSync will sync (merge) the left and right folders with each other.
- Modified files or new files created in the either folder will be synced to the other folder. See File Comparison section below for how comparing to any existing file is handled.
- If deletion is disabled any folders/files both left and right folder will be kept in sync and no deletion will be done (so if you delete a file in either left/right folder it will be re-synced).
- If deletion is enabled (disabled by default) and you delete a previously synced file from either folder, it will be deleted from the other folder as well.
When syncing FolderSync makes a record of each file and its filepath locations in the two configured folders. On subsequent syncs the modified time of the file will be used to determine if a file has been updated. The modified time is also used to compare the same file in the two corresponding folders to determine which one is newer. If both files have changed since the previous sync, there will be a conflict and FolderSync will take no action - you can override this conflict behavior in the folderPair settings. If only one files has been updated, it will overwrite the older file.
It is also possible to enable calculation of checksum for local device files. This ensures a more robust detection mechanism to determine if a file has changed, but can take considerably longer depending on the size and number of files. In many cases checksum calculation is not needed, but a few niche apps updates file contents without changing the modified time of the files. In those cases checksum calculation is needed for FolderSync to be able to detect a file had changed. For remote files see which services support checksum calculation here.
Using for backup
FolderSync can be used to backup files, but it will not retain files if you configure a folderPair to also sync deletion of files. As the name implies FolderSync works by synchronizing content of folder and if you delete files, then deletions will be synced as well and deleted files will no longer be available. Sync deletions are disabled by default, so unless enabled by the user, FolderSync will never delete files.
Similarly FolderSync will not retain older versions of files that are overwritten by newer files. FolderSync cannot restore deleted or old versions of files.