Overwrite existing db


I'm working on some scripts to back up  our production TC environment, copy the backup file and artifacts to the dr server, and then restore.

MaintainDB Restore will not restore since the target database is not empty.  The database contains the all the data as of the previous restore.

Is there a way I can force MaintainDB to just over write everything in the existing db?



1 comment
Comment actions Permalink

Hi Marc,


if you have a external database server (as you probably do), you should consider what action to take with the database. Overriding the data in the database would roll back some of the latest changes (to those at the point of the backup), which might be desired to some extent or not desired. One of the points of having an external database is being able to have actual data even if the server fails. If you keep projects' settings in version control, a good part of the new server wouldn't even need much of the restoration process.


If you don't need to restore the database, then you should only restore the data directory (and artifacts if needed), that will make the backup server connect to the current database and work will continue exactly where it stopped.


If you really want to restore the database, to ensure that the database is at the exact same state that the server was when the backup was taken, then the suggestion would be to restore it to an empty database, whether removing the previous data from the other database or creating a new one from scratch.


Please sign in to leave a comment.