Intelligent Synchronization

<< Click to Display Table of Contents >>

Navigation:  Using SyncBackPro > Expert Mode >

Intelligent Synchronization

Previous pageReturn to chapter overviewNext page

Using 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 or when burning to a CD/DVD.

 

In the description of the options below an example follows about how this option may be triggered when you do an Intelligent Synchronization.

 


Example Scenario

 

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

 

laptop

Source

 

arrow_sync_vertical

 

 

desktop

 

desktop

network

Destination

 

 

 

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 source but not the destination.

 

What to do if...:

 

sync1  ...the same file has been changed in both the source & destination: 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 source 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 source (unchanged in destination): 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 (Source overwrites destination always). Tick the Move the file instead of copying it checkbox to move the file.

 

sync3  ...the file has only been changed in the destination (unchanged in source): 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 (Destination overwrites source always). Tick the Move the file instead of copying it checkbox to move the file.

 

sync4  ...a file is deleted from the source (but was changed or created in the destination): 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 source (but is unchanged in the destination): 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 destination).

 

sync6  ...a file is deleted from the destination (but was changed or created in the source): 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 destination (but is unchanged in the source): Someone deleted a file on the network and the file your laptop was not changed. In this situation the default is to also delete the file from your laptop (Delete file from source).

 

sync8  ...a new file has been created in both the source & destination 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 source only, or is only in the source: 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 destination).

 

sync10  ...a new file has been created in the destination only, or is only in the destination: 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 source).

 

sync11  ...the properties or the filename case of a file on source have been changed (unchanged on destination): The file on the source and destination are identical except for the case of its filename or its properties. The case of the source filename, or its properties, have been changed so that they are no longer the same as the destination. For example, the source 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 destination have been changed (unchanged on source): The file on the source and destination are identical except for the case of its filename or its properties. The case of the destination filename, or its properties, have been changed so that they are no longer the same as the source. See the Renaming Case Change section below for important information.

 

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

 

Detect file renames on Source (note this may reduce performance): If this option is ticked then SyncBack will try to detect files that have been renamed/moved in the source. If a file has been renamed on the source then it will rename the destination 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.

 

Detect file renames on Destination (note this may reduce performance): If this option is ticked then SyncBack will try to detect files that have been renamed/moved in the destination.

 

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 source but not the destination. 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 source, and then when you next run the profile the file no longer exists, it knows the file was deleted from the source. 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.

 

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

 

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

 

If you have a backup profile, with the default settings, then the source file is copied to the destination. 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 source file to the destination.

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 source to the destination. 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 source then the date & time of the source file will be set on the destination 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 source and destination, but the attributes are different, e.g. the source file is read-only but the destination 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 source file is copied to the destination. 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 source file to the destination.

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 source to the destination. 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 source then the attributes of the source file will be set on the destination 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.

 

 

All Content: 2BrightSparks Pte Ltd © 2003-2017