ydb-embedded-ui icon indicating copy to clipboard operation
ydb-embedded-ui copied to clipboard

Add Create Async Replication action to db context menu

Open antonkovalenko opened this issue 1 year ago • 3 comments

Database context menu accessible under ... control must have an Item Create Async Replication that fills Query Editor with template query

CREATE ASYNC REPLICATION my_replication
FOR <remote_table_name> AS <local_table_name> [, <remote_table_name> AS <local_table_name> ...]
WITH (
  ENDPOINT=<endpoint>, -- endpoint, e.g. grpcs://mydb.ydb.tech:2135/
  DATABASE=<path_to_database>, --/cluster/dynamo
  USER=<user>,
  PASSWORD=<pwd>,
  ...
);

antonkovalenko avatar Mar 29 '24 14:03 antonkovalenko

Command to stop replication is also needed

artemmufazalov avatar Mar 29 '24 14:03 artemmufazalov

@CyberROFL please share a template of a query to stop replication and convert tables to RW state

antonkovalenko avatar Mar 29 '24 14:03 antonkovalenko

ALTER ASYNC REPLICATION `my_replication` SET (STATE = 'DONE', FAILOVER_MODE = 'FORCE');
DROP ASYNC REPLICATION `my_replication`;

CyberROFL avatar Apr 25 '24 14:04 CyberROFL

Templates do exist, but I had error on prestable image

antonkovalenko avatar Jul 09 '24 18:07 antonkovalenko