About remote backup of SQL database (1)

These days I have been busy doing remote backup of the database. According to the instructions of the superior leaders, all important files of the computer department must be automatically backed up to the NAS storage. I am responsible for the collation of the DB. I have counted a total of 8 databases and started I have been studying the method of using batch processing, and I have also referred to a lot of job functions about using the database on the Internet, but I always prompt that I cannot find the specified path (the path stored by the NAS) during execution. Using the iscsi function on the NAS, let's talk about the method of backing up the Sql database to the NAS storage.

method one:

Let me talk about this "artifact", SQLBackupAndFTP, this tool is mainly to automatically backup the database , one-key restore the database, send the backup database log report to the mailbox, automatically compress the backed up database

Perform database backup tasks regularly to replace SSMS maintenance plans, upload database backup files to FTP servers, other network hard drives, etc.

Tool download address:

Official website: http://sqlbackupandftp.com/

About software introduction, use pictures on the Internet

There are mainly some DLLs in the installation directory

SQLBackupAndFTP will create a new Windows service to regularly back up the database and replace the SSMS maintenance plan,

Start some option settings

step1: First set up the database connection, enter the user name and password:

Check the database to be backed up ( Note: Only two databases can be selected at a time )

step2: Set up mail and send the backup report to the corresponding mailbox (can be omitted)

Step 3: Set up scheduled tasks, you can set up full backup, differential backup, transaction log backup, you can also use the software's own backup plan.

You can also set whether to use the system task schedule to run scheduled tasks or use the software's Windows service to run.

Step 4: Set backup options, including the storage path of large database temporary files, compressed backup file options, whether to verify backup files, backup database log storage path, encrypted backup files (charged)

I set the path of the backup database log and the temporary file of the large database to D: \ test

Step 5: After setting the above backup path, you need to return to the main interface to set the backup path. The backup database file can be uploaded to the FTP server, DROPBOX, SKYDRIVE (to be paid), etc.

The software can also set how long ago the backup file is deleted automatically. If it is a network path, you can click the "Test" button to test whether it is connected,

After the above settings are complete, you can click the "run now" button to manually perform the backup. In the future, you will perform the database backup operation according to the setting plan in the scheduled task settings.

The following report after success:

Set FTP (can be omitted, according to the actual situation)

After all the settings are completed, you can save the configuration. When you reinstall the software or change the machine, you do not need to set it again. Then you will perform the database backup operation according to the setting plan in the scheduled task settings. At this time, the database has been successfully backed up!

One click to restore database

Click the restore button, it is very simple, omit,

If the database is in use, he will ask you to terminate all processes of the database

Click "Yes" to restore successfully.

For databases under 20G, this method is still a good choice, but the company's ERP database is more than 70 G. It takes a long time to use this tool to back up, so we have to find another method cry. The following chapter 2 introduces the use of NAS storage to allocate iSCSI disks to achieve off-site backup function .

 

 

Published 22 original articles · praised 7 · 100,000+ views

Guess you like

Origin blog.csdn.net/qyx0714/article/details/70688192