Learn how to set up a smart strobe siren system that uses Axis Object Analytics with Milestone XProtect, minimizing false…
Close
Close
Close
Close
Let’s be honest—upgrading Milestone XProtect can be an exercise in tediousness. While essential, the repetitive nature of these tasks can drive even the most patient admin up the wall. That’s why I turned to automation to save time and sanity. This is the third installment in my series aimed at streamlining Milestone XProtect upgrades by automating those mind-numbing tasks.
The script included in this blog focuses on backing up and verifying databases, a crucial step before any upgrade or hotfix installation.
This process, although vital, can be incredibly repetitive. To make life easier, I created a SQL script that automates the backup and verification of all Milestone and Boring databases to the C:\Temp folder.
PS. I am not responsible for any mishaps that may happen with your update. Do your own research, testing, and critical thinking. I am merely a human with a passion for security solutions that wants to share my knowledge and experience with you in hopes it helps make your job a little less boring.
Before diving into the script, let’s touch on why database backups are so important. Backing up your databases ensures that you have a recovery point in case something goes wrong during an upgrade or hotfix installation. Verification of these backups ensures their integrity, giving you peace of mind that your data is safe and sound.
This script backs up each of your Milestone and Boring databases and verifies the backups to ensure they are reliable. Here’s a little more detail on what exactly the script does:
USE master;
GO
-- Backup and verify Surveillance
BACKUP DATABASE Surveillance
TO DISK = 'c:\Temp\Surveillance.bak'
WITH FORMAT,
MEDIANAME = 'SQLServerBackups',
NAME = 'Full Backup of Surveillance';
GO
RESTORE VERIFYONLY
FROM DISK = 'c:\Temp\Surveillance.bak';
GO
-- Backup and verify BoringBase
BACKUP DATABASE BoringBase
TO DISK = 'c:\Temp\BoringBase.bak'
WITH FORMAT,
MEDIANAME = 'SQLServerBackups',
NAME = 'Full Backup of BoringBase';
GO
RESTORE VERIFYONLY
FROM DISK = 'c:\Temp\BoringBase.bak';
GO
-- Backup and verify Surveillance_IDP
BACKUP DATABASE Surveillance_IDP
TO DISK = 'c:\Temp\Surveillance_IDP.bak'
WITH FORMAT,
MEDIANAME = 'SQLServerBackups',
NAME = 'Full Backup of Surveillance_IDP';
GO
RESTORE VERIFYONLY
FROM DISK = 'c:\Temp\Surveillance_IDP.bak';
GO
-- Backup and verify Surveillance_IM
BACKUP DATABASE Surveillance_IM
TO DISK = 'c:\Temp\Surveillance_IM.bak'
WITH FORMAT,
MEDIANAME = 'SQLServerBackups',
NAME = 'Full Backup of Surveillance_IM';
GO
RESTORE VERIFYONLY
FROM DISK = 'c:\Temp\Surveillance_IM.bak';
GO
-- Backup and verify SurveillanceLogServerV2
BACKUP DATABASE SurveillanceLogServerV2
TO DISK = 'c:\Temp\SurveillanceLogServerV2.bak'
WITH FORMAT,
MEDIANAME = 'SQLServerBackups',
NAME = 'Full Backup of SurveillanceLogServerV2';
GO
RESTORE VERIFYONLY
FROM DISK = 'c:\Temp\SurveillanceLogServerV2.bak';
GO
This script takes the repetitive task of backing up and verifying multiple databases and consolidates it into a single, efficient process. By automating these steps, you not only save time but also reduce the risk of human error, ensuring a smooth upgrade or hotfix installation.
Using this SQL script to automate the backup and verification of your Milestone databases can significantly streamline your workflow. No more manually backing up each database one at a time—just run the script and let it handle the heavy lifting. This not only makes your job easier but also ensures that your data is secure and ready for any upgrades or hotfixes.
It’s the newsletter security professionals use to work smarter. We promise you’ll learn stuff and enjoy a few blissful moments of productive procrastination.
Your go-to XProtect eXPerts. We learn the technical stuff that will save you time and make it less boring.
Your go-to XProtect eXPerts. We learn the technical stuff that will save you time and make it less boring.
Learn how to set up a smart strobe siren system that uses Axis Object Analytics with Milestone XProtect, minimizing false…
Managing a video surveillance system is not set it and forget it. In this blog we cover the importance of…
Learn how to use a PowerShell script to enforce TLS 1.2 and 1.3 on your IIS servers, improving security by…
Subscribe to get a monthly dose of security & surveillance industry news and insights, Milestone VMS time-saving tricks, tips for hacking your way out of boring work sent directly to your inbox!