0

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?

2
  • 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 '19 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 '19 at 12:30
3

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

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

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

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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