Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New command - Get-DbaDbFileMapping #7578

Merged
merged 8 commits into from Jul 18, 2021
Merged

New command - Get-DbaDbFileMapping #7578

merged 8 commits into from Jul 18, 2021

Conversation

potatoqualitee
Copy link
Member

Type of Change

@potatoqualitee potatoqualitee changed the title New command - Get-DbaDbFileMap New command - Get-DbaDbFileMapping Jul 18, 2021
@potatoqualitee
Copy link
Member Author

Someone let me know when this is good to merge 👍🏼

PS C:\> $filemap = Get-DbaDbFileMapping -SqlInstance sql2016 -Database test
PS C:\> Get-ChildItem \\nas\db\backups\test | Restore-DbaDatabase -SqlInstance sql2019 -Database test -FileMapping $filemap.FileMapping

Restores test to sql2019 using the file structure built from the existing database on sql2016
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add this example to the restore command as well and then I'm good to merge

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might replace the example I think the restore command has for manually building the hashtable object.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll add it in addition to -- I think it's important to show ppl how to build the hashtable.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ty for the approval! Will merge once tests finish.

@potatoqualitee potatoqualitee merged commit 5c60600 into development Jul 18, 2021
@potatoqualitee potatoqualitee deleted the fixes3080 branch July 18, 2021 20:29
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.

Add a OutFileMapping switch and output to Get-DbaDatabaseFile
3 participants