Different Solution for SQL Backup Taking Too Long

Efficient backup speed also facilitates meeting stringent recovery time objectives (RTOs) in the event of data loss or system failures, enabling organizations to restore critical databases quickly and maintain operational continuity.

Crystal

By Crystal / Updated on December 29, 2023

Share this: instagram reddit

Case: SQL Server Backup Taking Too Long

" I've SQL server 2012 and our DB backup average taking 45 minutes to gets done but from last couple of days is taking 5 to 6 hours to get done.

Is there way I can check where It's causing issue from?"

SQL Server backup is a crucial aspect of database management, ensuring the protection and recoverability of valuable data. As a database size increases, the SQL Server backup time taken to back it up also rises. Larger databases result in longer backup times, potentially extending downtime and affecting regular business activities. This elongation may lead to performance issues, disrupting applications relying on the database.

So SQL Server backup taking too long can lead to extended periods of unavailability and potential productivity losses. How to solve the problem that SQL backup is very slow? How to solve this problem? The next section will describe methods helping you speed up SQL backup.

sql server backup taking too long

 

Solution: SQL Database Backup Time Taking Too Long

Efficient backups contribute to operational efficiency and support organizational goals. Speeding up SQL Server backups using the follow methods is crucial to minimize downtime and enhance business continuity.

  • Enable the backup compression feature. The backup compression functionality in SQL Server 2008, initially available exclusively in the Enterprise Edition, has demonstrated significant benefits, leading to notable disk space savings and enhanced backup performance.
  • Avoid Same Hard Disk for Database Files. Reading and writing to the same drive can significantly slow down processes compared to using two separate drives. This helps mitigate contention issues and reduces the risk of data loss in case of drive damage.
  • Dedicated Drives for Backups, Preferably Solid State Drive (SSD) Units. Use separate drives for storing backups, and consider employing solid-state drive units for faster and more reliable backup operations.
  • Utilize Advanced Parameters. Optimize backup performance by leveraging advanced parameters such as BLOCKSIZE, MAXTRANSFERSIZE, BUFFERCOUNT, etc. Adjusting these parameters can enhance the efficiency of data transfer during backup processes.
  • Organize Backups by Database Name and Type. This minimizes the time it takes to read file headers, especially when dealing with a large number of files. Use and tags in the folder path for efficient organization.
  • Optimize Backup Deletion History. Choose to halt the automatic deletion of backups and restore history older than through Tools > Server Options > File Management. This prevents the automatic execution of the msdb..sp_delete_backuphistory procedure, which can extend backup times when dealing with a substantial number of history records. By clearing this option and manually performing the deletion at a more convenient time, significant time savings can be achieved.

How to Speed up SQL Backups Through Compression

By following these steps, you can effectively implement compression for SQL Server backups, optimizing storage usage and potentially reducing backup times.

* Always consider the specific needs of your environment and regularly review and adjust your backup strategy as your database grows or changes.

Way 1. Enable Backup Compression Option on SSMS GUI

To create a MSSQL backup compression, please follow the steps:

1. Open SQL Server Management Studio (SSMS). Right-click on the database you want to compress.

2. Go to "Tasks" > "Back up...". In the "Options" tab, select "Compression" and choose the desired compression type.

compress sql backup

Way 2. Use "Backup Database" Script with Compression in SQL Server

To use script to compress SQL database backups, please refer to:

1. Launch SQL Server Management Studio (SSMS) and connect to your stance, click New Query on the Standard bar, or right-click your database name and select New Query. Input the following statement:

BACKUP DATABASE database name TO DISK = 'filepath' WITH COMPRESSION

2. Click Execute to start.

execute script to compress sql backup

💡 Tips:
As for the Filepath, you need to type the path and name of your file. For example: D:\backup\database.bak
If you want to back up more databases, you can repeat this statement with changed database names. And if you do not want to compress the backup, you can just delete WITH COMPRESSION.

Automate SQL Server Backup via AOMEI Cyber Backup

AOMEI Cyber Backup provides reliable SQL backup solutions ensuring the safeguarding of critical data.

Flexible Scheduling: Users can customize backup schedules to fit their unique needs.

Incremental and Differential Backups: The software supports both incremental and differential backup methods, optimizing storage space and minimizing backup durations by only capturing changes made since the last backup.

Automatic Backup: Users can automate backup tasks, streamlining the process and minimizing manual intervention.

Email Notifications: Email notifications provide real-time updates on the status of backup operations, allowing for prompt response to any issues.

Download this 30-day free trial to experience all its features:

Download Free TrialMicrosoft SQL Server 2005-2022
Centralized and Secure SQL Backup

Before you create backup tasks with AOMEI Cyber Backup, you should:

  • Run the downloaded .exe file to install AOMEI Cyber Backup, and launch its main interface. Click Source Device -> Microsoft SQL -> Add Microsoft SQL.

Microsoft SQL

  • Choose Download proxy program or Copy link to download the Agent program and install it on the device with SQL Server installed. Then, click Already installed proxy to select the device.
  • Next, click ... -> Authentication to validate the database instance. You can choose Windows Authentication or SQL Authentication.

add device

That's it, now you can perform SQL Server auto backup every day via AOMEI Cyber Backup with the following steps:

1. Click Backup Task -> Create New Task to create a Microsoft SQL Backup task.

select Mricrosoft SQL Backup

2. Click on Device Name to specify the instance and databases you want to back up. You can select one or multiple databases as you need.

select databases

3. Select a Target storage to save your SQL backups, it could be a local path or network path.

choose destination

4. Set up a backup Schedule to run the SQL database backup daily/weekly/monthly, and choose the backup method as Full/Incremental/Differential.

📢 (Optional):
➹ Backup Cleanup helps you to delete older backup version automatically and therefore save storage space. You can upgrade AOMEI Cyber Backup to enjoy this advanced feature.
➹ Email Notification enables you to receive email notifications when the task is abnormal or successful.

5. Click Start Backup to execute the task. Once it's finished, you will find it in the Backup Task tab.

schedule and auto SQL backup

Conclusion

If you find your SQL Server backups taking too long, implementing compression strategies is a key solution. This article provides 2 ways to speed up SQL backup. By strategically applying compression at both the database and backup levels, users can achieve a harmonious blend of reduced storage footprint and enhanced backup speed.

Regular monitoring, adjusting compression levels and testing restore procedures are essential steps to ensure a reliable backup strategy. By embracing these techniques, organizations can overcome the challenge of SQL Server backups very slow, fostering a resilient and responsive database environment tailored to their unique needs.

Crystal
Crystal · Editor
Crystal is an editor from AOMEI Technology. She mainly writes articles about virtual machine. She is a positive young lady likes to share articles with peolpe. Off work she loves travelling and cooking which is wonderful for life.