Keyword search: 

Replication Types and behavior

11/24/2010 3:01 PM
You can subscribe to this wiki article using an RSS feed reader.

There are four job types FRP can perform and they support data copy, distribution and synchronization.

1. Move

Simply moves data from the source folder to the destination.  After the replication cycle is complete, the source folder will be completely empty and the destination folder will contain all files and folders (recursively) that existed in the source folder.  Any new item in the source folder will trigger a replication event.  Nothing is removed from the destination folder.  Files with the same name will be updated (not overwritten) in the destination folder on a bit level.

2. Copy

A simple copy of the source folder contents to the destination folder.  New additions or changes to the source folder will trigger a replication event and will copy the data from the source folder to the destination folder.  Deleting data from the source folder will not trigger any activity.  Updating a source file will trigger a replication event and will update (not overwrite) the destination file on a bit level. Renaming files or folders will be treated as if they are newly created folders or files.  The destination end will keep the old files an folders and a new file and folders will be created. 

3. One Way Mirror

Mirrors the source files and folders to the destination folder.  The destination folder will be made identical to the source.  New or updated files and folders on the source will be mirrored to the destination.  Unlike the Move and Copy job types, the destination folder will have files (and folders) deleted or renamed if files (or folders) do not exist or are renamed in the source folder.  Files that are updated on the destination side will be replaced with the files from the source folder.

4. Two Way Mirror

Both replication servers will mirror each other.  Files or folders added to or changed on one server will be mirrored to the other invoking overwrites when applicable.  On first replication, both folders are mirrored and no files are deleted but rather copied to the other side.  On subsequent replications, files or folders deleted from one server will result in a corresponding deletion from the other server.

It is therefore critical to ensure the time settings on both servers are in sync with each other.  This is normally done with an NTP program service, making both servers in sync with the same NTP server.

Risks in a 2 way mirror:

What happens in a 2 way mirror when a server comes back up after a crash with files missing?

In case when source server goes offline and all files including source folder get deleted - replication can not start because the source folder is missing.  The data can be restored by setting up a job to copy the files back from the offsite.

If all files from source folder get deleted but the folder remains - a 2 way mirror job  will remove all files on destination server because it will determine that the files were removed locally on the source server.

On version 6.4 and later this can be prevented by setting the property in /FileReplicationPro/etc/s2s.properties to permit renaming of deleted files with a deleted extension which preserves them in case of a mistake or a source server crash.

Steps 

Before setting up 2 way mirror job,  do the following steps

On both servers,  use a plain text editor to edit /FileReplicationPro/etc/s2s.properties file and add the following line on any empty line.

s2s.rename_on_delete=true

Save the file, repeat on all servers.  With this setting at true all files to be deleted by FRP as the result of a deletion on the other server will be renamed with the suffix .$FRPdeleted  This provides you with a backup copy.


Return to Quick Start Guide


Tags:
Home: WIKI - Knowledge Base Index What's new: Recently changed articles