I need to copy an entire SQL Server instance, with all databases from one server to another server in my test lab.

I am aware that this can be done the "cold way", by stopping/pausing the databases and copying the database files to new location and attaching them.

Is it however possible to do it the "hot way," using the full and diff backup files?

  • Are you by chance using Vmware, Vmotion will almost do what you are asking. Or else, you have Logshipping, mirroring and Availability groups for your help
    – Shanky
    Mar 22, 2019 at 12:10
  • Not using Wmvare. in addition to this I feel a question about backups is jsutified. Many of regular tools I have seen for doing day to day backups use "hot-mode" . But is it not desirable to have day to day backups that easily can be restored on a new server in case disk-failure and such on the working server.
    – jarle
    Mar 22, 2019 at 12:30

2 Answers 2


You can just use dbatools --> Start-DbaMigration to do the entire server migration/copy - (choose backup/restore method) including jobs, logins, user objects created in system dbs, etc

    [[-Source] <DbaInstanceParameter>] [[-Destination] <DbaInstanceParameter[]>]
    [-DetachAttach] [-Reattach] [-BackupRestore] [[-SharedPath] <String>]
    [-WithReplace] [-NoRecovery] [-SetSourceReadOnly] [-ReuseSourceFolderStructure]
    [[-SourceSqlCredential] <PSCredential>]
    [[-DestinationSqlCredential] <PSCredential>]
    [[-Exclude] <String[]>] [-DisableJobsOnDestination] [-DisableJobsOnSource]
    [-ExcludeSaRename] [-UseLastBackup] [-Continue] [-Force] [-EnableException]
    [-WhatIf] [-Confirm] [<CommonParameters>]

Might want to check out dbatools pretty sure they've got some scripts to handle this.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.