dbatools is a free PowerShell module with over 300 SQL Server administration, best practice and migration commands included.

Please note that documentation and command names may be out of date while we work furiously towards 1.0


Copies one or more backup devices. Copies both SQL code and the backup file itself. Backups are migrated using Admin shares. If destination directory does not exist, SQL Server’s default backup directory will be used.

The -BackupDevices parameter is autopopulated for command-line completion and can be used to copy only specific endpoints.

If backup device with same name exists on destination, it will not be dropped and recreated unless -Force is specified. Force drops and recreates the backup device.


Copies all server backup devices from sqlserver2014a to sqlcluster, using Windows credentials. If backup devices with the same name exist on sqlcluster, they will be skipped.



From PowerShell, execute Get-Help Copy-DbaBackupDevice -Detailed for more information on this function.

Source Code

Want to see the source code? View Copy-DbaBackupDevice.ps1 on GitHub

Related commands