In some database-related projects, regular database backup is often required. It is quite easy to back up data to the local machine on a regular basis and the task can be completed. However, if the entire machine crashes, it makes no sense to back up data to the local machine, therefore, we need to consider backing up data to the LAN and other computers. At first, I thought it was quite simple to share a remote file.
In some database-related projects, regular database backup is often required. It is quite easy to back up data to the local machine on a regular basis and the task can be completed. However, if the entire machine crashes, it makes no sense to back up data to the local machine, therefore, we need to consider backing up data to the LAN and other computers. At first, I thought it was quite simple to share a remote file.
In some database-related projects, regular database backup is often required. It is quite easy to back up data to the local machine on a regular basis, and the scheduled task can be completed. However, if the entire machine crashes, it makes no sense to back up data to the local machine, therefore, we need to consider backing up data to the LAN and other computers.
At first, I thought quite simple. I mapped a remote shared folder, a Hong Kong Server, to a local disk and used the backup function provided by SQL Server to back up the data. However, in practice, you will find that there is no such disk available for you to select. If you use SQL statements to back up data, an error will also be prompted. What should we do?
I have found many remote backup methods on the Internet, many of which cannot be used, and some still use FTP to upload... This is beyond our needs and is unnecessary. Next, I will share a copy of the code I found online, rented the Hong Kong Server, and simply sorted it out. It has been running stably for a week with the job function in the SQL Server Agent, backup is performed once every hour.
Master .. xp_mongoshell (200) (,), master .. xp_mongoshell --