Skip to content

Add initial implementation of SPSDBMove script#2

Merged
luigilink merged 1 commit into
mainfrom
release/1.0.0
Jun 1, 2026
Merged

Add initial implementation of SPSDBMove script#2
luigilink merged 1 commit into
mainfrom
release/1.0.0

Conversation

@luigilink

Copy link
Copy Markdown
Owner

Highlights

  • Single script, three phases: -Action All | Backup | Copy | Restore, with full -WhatIf / -Confirm support.
  • Backup uses WITH COPY_ONLY, COMPRESSION, CHECKSUM, INIT into a per-DB <root>\<DbName>\FULL\ layout.
  • Copy runs in parallel via ForEach-Object -Parallel (configurable ThrottleLimit, optional -SkipExisting).
  • Restore auto-remaps logical/physical files via RESTORE FILELISTONLY, supports per-DB DestinationName rename and WITH REPLACE.
  • Config-driven CLI: instances, roots, DB list, and tuning live in JSON; CLI surface is just -ConfigPath, -Action, -SqlCredential, -SkipExisting. Unknown keys are rejected.
  • System DBs always excluded (master, model, msdb, tempdb); new ExcludeDatabases key lets you skip user DBs per run.
  • QueryTimeout = 0 so multi-TB operations are never cut short.

Ships with

  • Pester 5 smoke tests + PSScriptAnalyzer (Linux/macOS/Windows CI).
  • Tag-triggered (v*) release workflow that publishes a ZIP and uses RELEASE-NOTES.md as the GitHub Release body.
  • Wiki pages (Home, Getting-Started, Configuration, Usage) auto-published via wiki.yml.
  • Issue templates, PR template, CONTRIBUTING.md, CODE_OF_CONDUCT.md.

Requires

  • PowerShell 7.0+
  • SqlServer module (Install-Module SqlServer)

…esting

- Create sample JSON configuration file for SPSDBMove.
- Implement Pester tests for SPSDBMove script to validate functionality and structure.
- Add detailed configuration documentation in wiki, including CLI parameters and JSON schema.
- Provide getting started guide for new users to set up and run SPSDBMove.
- Document usage scenarios for database refresh and migration workflows.
@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown

Pester Test Results

17 tests   17 ✅  5s ⏱️
 4 suites   0 💤
 1 files     0 ❌

Results for commit 43fc032.

@luigilink luigilink merged commit 1153046 into main Jun 1, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant