Use Powershell to automate backup / restore of numerous databases?
technique
Member Posts: 21
As per title we have a lot of Customer backups that we need to restore locally so that we always have a support environment setup for them. At the moment this is a manual task which is time consuming.
What we need are a couple of PS scripts that accept a parameter (ie. database name); one script to backup and another to restore dbs.
I've tried to search this info. out online and haven't been able to find anything but I'm sure other resellers are in the same predicament and someone must have solved it?
Any help would be fantastic, thanks in anticipation!!
What we need are a couple of PS scripts that accept a parameter (ie. database name); one script to backup and another to restore dbs.
I've tried to search this info. out online and haven't been able to find anything but I'm sure other resellers are in the same predicament and someone must have solved it?
Any help would be fantastic, thanks in anticipation!!
0
Answers
-
Have you looked at Waldo's / CRS powershell script library? -https://github.com/waldo1001/Cloud.Ready.Software.PowerShell
I think that's a great starting point and should be enough to begin with your backup/restore automation.Vytenis Jakas
B3 Technologies - Making Technology Serve the People0 -
Can you use the official SQL Server Powershell commandlets:
Backup-SqlDatabase
Restore-SqlDatabase
?
See
https://docs.microsoft.com/en-us/powershell/sqlserver/sqlserver/vlatest/backup-sqldatabase
and
https://docs.microsoft.com/en-us/powershell/sqlserver/sqlserver/vlatest/restore-sqldatabase0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions

