Prepare for replication and archiving