Intelligent Synchronization

<< Click to Display Table of Contents >>

Navigation:  Using SyncBackPro > Expert Mode >

Intelligent Synchronization

 

With Intelligent Synchronization you are given a large number of options of what to do in each situation. Although the list and options appear daunting, taking the default values is nearly always the best option.

 

warning

Intelligent Synchronization cannot be used when compressing all files into one single file.

 

In the description of the options below an example follows about how each option may be triggered when you do an Intelligent Synchronization. With a backup, you typically refer to the file locations as Source and Destination, i.e. you copy files from the source to the destination. However, with synchronization, there is no source and destination because files are copied in both directions. Because of this, the file locations are referred to as Left and Right. Remember that you are free to label your file locations however you wish; simply click the location labels to edit them to the text of your choice (per-profile).

 

 


Example Scenario

 

You have a local copy of the files on your laptop computer. In your profile setup this is the Left directory. There is also a copy of those files on the company network. In your profile setup this is the Right directory.

 

laptop

Left

 

arrow_sync_vertical

 

 

desktop

 

desktop

network

Right

 

 

 

People in the company are making changes to the files on the network, and when you are out of the office you are changing your files on your laptop. Once you return to the office you are connecting your laptop to the company's network and synchronizing your files using SyncBack.

 

 


Note that when you first run an Intelligent Synchronization profile it has no history of data to look at and so, for example, cannot know if a file was only changed in the left but not the right.

 

What to do if...:

 

sync1  ...the same file has been changed in both the left and right: You have changed a file on your laptop and someone has also changed the same file on the network. In this situation, it's best to be prompted on what to do. You may need to manually merge the file contents. Tick the Move the file instead of copying it checkbox to move the file. Note that this decision is also used in the following situations: 1) The left file has changed but it has been newly created in the right and they are different, 2) The left file has not been changed but it has been newly created in the right and they are different, 3) The file has been newly created in the left but the right file has been changed and they are different, 4) The file has been newly created in the left and the right file has not been changed but they are different.
 

sync2  ...the file has only been changed in the left (unchanged in right): You have changed a file on your laptop and nobody changed that file on the network. In this situation the default is to copy your changed file to the network (Left overwrites right always). Tick the Move the file instead of copying it checkbox to move the file.

 

sync3  ...the file has only been changed in the right (unchanged in left): A file was changed on the network and you didn't change your local copy of the file. In this situation the default is to replace your local copy with the changed one (Right overwrites left always). Tick the Move the file instead of copying it checkbox to move the file.

 

sync4  ...a file is deleted from the left (but was changed or created in the right): You have deleted a file on your laptop but someone has changed that file on the network or created a file with the same name on the network. In this situation the default is to be prompted as you may either want to delete the network file, or copy the network file to your laptop.

 

sync5  ...a file is deleted from the left (but is unchanged in the right): You have deleted a file on your laptop and the file on the network was not changed. In this situation the default is to also delete the file from the network (Delete file from right).

 

sync6  ...a file is deleted from the right (but was changed or created in the left): Someone has deleted a file from the network but you've changed your local copy of that file (or created a new file with the same name). In this situation the default is to be prompted as you may either want to delete your local copy of the file, or copy the local file to the network.

 

sync7  ...a file is deleted from the right (but is unchanged in the left): Someone deleted a file on the network and the file on your laptop was not changed. In this situation the default is to also delete the file from your laptop (Delete file from left).

 

sync8  ...a new file has been created in both the left & right and are different: The same file has been created on the network and your laptop. This happens when you first run an Intelligent Synchronization profile. The default is to be prompted, and usually you would choose to copy the newer file over the older file (Newer file overwrites older file). Tick the Move the file instead of copying it checkbox to move the file.

 

sync9  ...a new file has been created in the left only, or is only in the left: You have created a new file on your laptop and it doesn't exist on the network. This happens when you first run an Intelligent Synchronization profile. The default is to copy the file to the network (Copy file to right).

 

sync10  ...a new file has been created in the right only, or is only in the right: Someone has created a new file on the network and it doesn't exist on your laptop. This happens when you first run an Intelligent Synchronization profile. The default is to copy the file to your laptop (Copy file to left).

 

sync11  ...the properties or the filename case of a file on left have been changed (unchanged on right): The file on the left and right are identical except for the case of its filename or its properties. The case of the left filename, or its properties, have been changed so that they are no longer the same as the right. For example, the left file was previously called abc.txt but has been renamed to ABC.TXT. See the Renaming Case Change section below for important information.

 

sync12  ...the properties or the filename case of a file on right have been changed (unchanged on left): The file on the left and right are identical except for the case of its filename or its properties. The case of the right filename, or its properties, have been changed so that they are no longer the same as the left. See the Renaming Case Change section below for important information.

 

sync13  ...the properties or the filename case of a file on both left and right are different: The file on the left and right are identical except for the case of its filename or its properties. The case of both the left and right filename, or its properties, have been changed and they are not the same. See the Renaming Case Change section below for important information.

 

unchanged  What to do if a files contents are identical: The file on the left and right are identical. The default is to do nothing.

 

Detect file renames on Left (note this may reduce performance): If this option is ticked then SyncBack will try to detect files that have been renamed/moved in the left. If a file has been renamed on the left then it will rename the right file to match it. Note that this option requires that file contents be compared, which means this option could be very slow when there are many files or very large files. It will only compare files when it needs to. This option may not be available, depending on the profiles settings.

 

Detect file renames on Right (note this may reduce performance): If this option is ticked then SyncBack will try to detect files that have been renamed/moved in the right. This option may not be available, depending on the profiles settings.

 

When prompting, and the run is unattended, ignore the changes: For some of the decisions you may have chosen to be prompted. However, if the profile is being run unattended then you cannot be prompted. In this case the file is ignored and a warning is recorded in the log file. With an Intelligent Synchronization profile you may want SyncBack to ignore the changes. See the Ignoring Changes section for important details on what this means.

 

Clear History: If clicked, then the Intelligent Synchronization history (database) will be cleared. If it is cleared then when the profile is next run SyncBack will not have any history to base its decisions on,  so it cannot know if a file was only changed in the left but not the right. Clearing the history is equivalent to not having yet run the profile. This button is disabled if there is no history to clear.

 

 

Ignoring Changes

 

Intelligent Synchronization works because SyncBack keeps a database of the state of files and folders, to which it can then refer to detect what has changed since the last time the profile was run. For example, if SyncBack knows a file existed on the left, and then when you next run the profile the file no longer exists, it knows the file was deleted from the left. Without that database it would have no idea that the file had existed before. After a profile has finished it updates this database so it can be used on the next run.

 

However, if a file is being skipped because you cannot be prompted on the decision to make, then you may not want SyncBack to update that database for those files that were skipped because you could not be prompted. Let's use an example of why you may want to do this:

 

1.You have the same file, file.txt, in the left folder (C:\Left\file.txt) and the right folder (C:\Right\file.txt).

2.You modify the left file and also modify the right file.

3.The profile is run unattended. Both files have been modified and you've chosen to be prompted if both files have been modified. However, the run is unattended so the files are skipped because you cannot be prompted.

4.After the profile has finished SyncBack updates the synchronization database with the new details of the files.

5.Later you modify the left file.

6.The profile is run attended, i.e. you can be prompted. SyncBack will now copy the left file over the right file. Why? Because since the last run (in step 3) the left file has been modified and the right one has not. You've selected that if one file is modified and the other isn't then the modified file replaces the unmodified file.

 

As you can see the problem here is that you have lost the changes made to the right file. This was because in step 4 SyncBack replaced the old file details with the new ones. If you choose to ignore changes when you cannot be prompted then it would work differently:

 

1.You have the same file, file.txt, in the left folder (C:\Left\file.txt) and the right folder (C:\Right\file.txt).

2.You modify the left file and also modify the right file.

3.The profile is run unattended. Both files have been modified and you've chosen to be prompted in both files have been modified. However, the run is unattended so the files are skipped because you cannot be prompted.

4.After the profile has finished SyncBack does not update the synchronization database for those files that were skipped because you could not be prompted.

5.Later you modify the left file.

6.The profile is run attended, i.e. you can be prompted. SyncBack will now prompt you about the file because it still has the old details for a previous attended run, and because of this it sees that both the left file and right file have been modified.

 

The example above highlights that the update (or not) to the synchronization database (in step 4) is the reason for the differences.

 

 

Renaming Case Changes

 

What does a change in case actually mean? Case means upper case or lower case. A file called abc, for example, has the same name but different case from a file called ABC. In most situations it doesn't matter if the case is different. For example, although Windows keeps the case of a filename it doesn't care if a file is called abc or ABC. To Windows, and all programs running in Windows, they are the treated as the same name. On Windows you cannot have a folder with a file called abc and a file called ABC. Windows is not case sensitive.

 

However, in some situations the case does matter and is important. For example, if files are being stored on a UNIX or Linux system, e.g. via an FTP server, then a file called abc is different from a file called ABC. A directory could contain both a file called abc and a file called ABC. Cloud systems are usually case sensitive (Amazon S3™ and Microsoft Azure™ are) so would act the same way as an FTP server on a UNIX/Linux system.

 

When SyncBack gets a list of files it will check to see if there are files with the same name but different case. If so, an error is recorded in the log file because SyncBack can only use one of those files so the others must be skipped and ignored. For example, if there are files called abc, ABC, and Abc all in the same folder then two of them will be ignored and only one of them used. Which file is used? That cannot be determined or defined. SyncBack will use the first one it finds, but the order of the list of files it receives is often system dependent and could be random.

 

warning

On some file systems changing the case of a file or a folder may not work. For example, changing the name from case to CASE may do nothing. If so, this is a limitation of the file system itself.

 

 

What if a files contents are the same but not the last modification date & time?

 

Let's say you have a file in the left and right, but the date & time are different, e.g. the right file is older. What happens?

 

If you have a backup profile, with the default settings, then the left file is copied to the right. This is because it uses the option of what to do if the files are different, and by default a backup profile will copy the left file to the right.

If you have a backup profile, and have enabled the option Use slower but more reliable method of file change detection enabled (or the files are empty) then it will see if the files contents are the same. If not then it will copy the left to the right. If the contents are the same, then it will use the case changed setting to decide what to do. By default it will do nothing, but if you have set it to use the case from the left then the date & time of the left file will be set on the right file.

For Intelligent Synchronization profiles, it will know which file had its date & time changed, and so will use the appropriate "case changed" setting to decide which date & time to use.

 

 

What if a files contents are the same but not the files attributes?

 

Let's say you have a file in the left and right, but the attributes are different, e.g. the left file is read-only but the right file is not. What happens? First, by default, a profile does not compare the attributes of files to see if they're different. To compare attributes you need to go to the Compare Options -> Attributes settings page and choose which attributes you want to compare. For example, you may only care about the hidden and read-only attributes, and so would only enable comparison of those attributes. Keep in mind that some locations, e.g. FTP, don't have Windows file attributes. Also, some file systems, e.g. FAT32, don't have some attributes. In those situations SyncBack will ignore those unsupported attributes and not compare them.

 

In the following examples, we assume the profile has been configured to compare the attributes of files:

 

If you have a backup profile, with the default settings, then the left file is copied to the right. This is because it uses the option of what to do if the files are different, and by default a backup profile will copy the left file to the right.

If you have a backup profile, and have enabled the option Use slower but more reliable method of file change detection enabled (or the files are empty) then it will see if the files contents are the same. If not then it will copy the left to the right. If the contents are the same, then it will use the case changed setting to decide what to do. By default it will do nothing, but if you have set it to use the case from the left then the attributes of the left file will be set on the right file.

For Intelligent Synchronization profiles, it will know which file had its attributes changed, and so will use the appropriate "case changed" setting to decide which files attributes to use.

 

 

Versioning

 

If you are using versioning then you should set the profile to store versions in a sub-folder of the base folder and not in a sub-folder of the original file.

 

 

 

All Content: 2BrightSparks Pte Ltd © 2003-2024