Search code examples
symmetricds

Strategies to migrate symmetricds installation?


i have a SymmetricDS 3.14.4 installation that create a bidirection sync between an Oracle DB on premises and a MySQL db hosted outside the company. On each server i have installed an symmetricDS istance. The master node should be the one in the cloud (that should remain untouched)

Now i need to move the oracle schema to a new server and with the data i need to move also the local symmetricds installation.

The problem is that i can't export the full schema (with all my application data tables and the SYM_* tables) to the new server. I have to create the tables manually and then export the data from the old tables and insert it into the new tables on the new machine. But the question is: How i can move the symmetricds installation? I don't need to have the system online during the migration.

This is what i've thought:

  1. I will shutdown everything that writes on the DB in each site.
  2. I will stop symmetricds services on eache sites.
  3. I will move the data from the old tables in the old schema to the new schema (i will simply generate some INSERT INTO scripts). I will leave behind the SYM_* tables on the old schema.
  4. I'll copy the engine conf from the old symmetric to the new. I will change only the db.url setting to point to the new schema and if i can i would like to change the external.id to match the fqdn of the new machine (can i do that?)
  5. I install on the new schema the SYM_* tables as new with the command create-sym-tables
  6. Here i don't know the next step. I think i need to copy the old SYM_* tables configuration on the new server and then i could start again the services?

PS on the new local server is a problem to have SymmetricDS 3.14.9 instead having the same version that lives in the cloud? (cloud will still have 3.14.4)


Solution

  • The symadmin command has an export config and import config option in the latest 3.14.9 version. You could upgrade your version before migrating servers and then export your configuration. Then, on the new server you would install 3.14.9 and use the import config command to get your configuration setup. This would cover almost all of the sym_ tables aside from tables like sym_data, sym_data_event and sym_outgoing_batch to name a few. Below is also the link on how to complete a server migration. This details all of the files and folders you need to copy over from your old installation to your new one:

    https://www.symmetricds.org/doc/3.14/html/user-guide.html#_server_migration