简体   繁体   中英

AWS DMS and Redshift

I am using DMS to migrate data from MySQL to Redshift. Inside DMS, I use the 'full-load-and-ongoing' option to load data to Redshift. Assuming the full-load is complete and the on-going is in progress,I would like to know how I can resume the DMS task in case we restore Redshift using an old snapshot.

Thanks in advance.

You would need to

  1. Stop the DMS task
  2. Restore your target redshift
  3. RESTART your DMS task. (This will do the initial copy again and then reinstate the continuous replication)

If you have made any modifications to the target tables then change your task to truncate rather than drop and create.

If you cannot have any downtime on your Redshift table then you could do the following.

  1. Rename your existing Redshift table to be _inuse, eg if your table is called orders then call it orders_inuse
  2. Create a new "late binding" view like this

    CREATE VIEW orders as SELECT * FROM orders_inuse WITH NO SCHEMA BINDING;

  3. Set up DMS to replicate to orders_new table

  4. Drop orders_inuse

  5. recreate your view

    CREATE or replace VIEW orders as SELECT * FROM orders_new WITH NO SCHEMA BINDING;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM