• If you have good primary keys, that should prevent duplication. Make sure the archive database has the same PKs.

    The process I'd use it to move a slice of the data from a table to a staging table, or an archive table with a date/time marker. Then join back to the original table to delete those rows. Wrap that in a transaction and do a slice of data at a time. Maybe 1000 rows, maybe 10,000, depends on hardware and load.

    Set this up for all tables you need to archive, use dates somehow to determine what data to move, schedule this as a job.