Backup-SqlDatabase backupfile location reference

Copper Contributor

Hi all,


We have two sql servers and I have been running a powershell script on each for the daily full backup.


I was looking at perhaps backing them up using a single script from a 3rd server.


The current scripts backup the databases to another drive on each sql server (for easy access refreshing test systems) then copies them to another server offsite.


The question I have is regarding the backup-sqldatabase command.  Is the backupfile parameter referenced from the computer running the script or from the Server running sql?  If I specify E:\Backup\file.bak will that be E: on the server running the script or on the SQL Server being backed up?



1 Reply
Not totally sure, but based on what I read on Microsoft Documentation
its says
'the backups are stored in the default backup location of the server under the name databasename.bak for full and file backups, or databasename.trn for log backups.'
So it seems its using the server