

You can build your custom scripts to do it or get it all in a product like SQLBackupAndFTP. Then you usually compress the file, encrypt it, upload to a network drive, FTP or a cloud, etc. This creates a *.bak file on Server’s local file system.

Basically, you run BACKUP DATABASE command, use SQL Server Management Studio or 3rd party tools. Local SQL Server backup is well documented and we won’t get into the details of it here. Scripting doesn’t always take dependencies into account, so you may face problems during the database recreation.Unlike standard backups, scripts do not contain transaction log information so you can’t apply point-in-time recovery.It takes more time to restore a database from a script that from a regular backup.Such script takes more space since it is a textual (not binary) representation of your database, though it is much more compressible than a binary backup.It takes much longer to generate a script than to create an standard BAK type of SQL Server backup.However Script (*.sql) method has the following limitations: Then you can restore a database without requiring anything to be installed or configured by the hoster. The benefit of using a script file is that most hosting environments let you upload script files and run them by using a hosting administration control panel. Script (*.sql) file is basically a set of SQL commands that re-create the database objects and insert the data into the tables. You can restore from (*.bak) file using standard RESTORE DATABASE command and many 3rd party tools. And the format is the most common and not proprietary to any 3rd party. If you have an option to create *.bak files – always prefer it to the alternatives because it allows you to store not only Full, but Differential and Transaction Log backups as well. (more details on what SQL backup automation means) Then your options are limited to creating a script file.īAK (*.bak) file vs Script (*.sql) file for SQL Server backupsīAK files are the backups created using Microsoft’s standard BACKUP DATABASE command (or through SSMS or SQLBackupAndFTP). And if you don’t access to that location, you can not copy the backup file for further processing like compression, encryption, storage, etc. The *.bak file is placed somewhere on the drive local to that SQL server. The main issue with remote SQL servers is that you can run SQL scripts, including BACKUP DATABASE command, but accessing the resulting *.bak file is problematic. What is the problem with Remote SQL Server backups? Local SQL Server is a server where you have full access to the file system like a local server you can physically access or a dedicated/virtual server that you have full control of. Remote SQL Server is a server where you have limited access to the server’s file system like in a shared hosting environment. We will explain why and show all the available options to make the backups anyway.
