You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The size could be grabbed from the restored version of the database in either case (new backup or existing) after any provided SQL scripts are run against it to provide a more accurate size value when logging it to the metadata store.
This value is also used (pre-restore) to check size requirements, but could probably be replaced with the backup size (via Read-DbaBackupHeader?) as a fallback, which would be more accurate than 1:
Stop-PSFFunction-Message "Size of database $($db.Name) does not fit within the image local path"-Target $db-Continue
}
}
The text was updated successfully, but these errors were encountered:
lowlydba
changed the title
New-DcnImage - Properly record database size from backup files
New-DcnImage: Properly record database size from backup files
Feb 16, 2022
I'll see about getting a PR for this soon now that the upstream issue is resolved, should be easy now that we're capturing the restore header info already from #184
If the database image is being created from a backup that already exists, the function defaults to a size of 1MB:
dbaclone/functions/image/New-DcnImage.ps1
Lines 347 to 352 in 2d73971
The size could be grabbed from the restored version of the database in either case (new backup or existing) after any provided SQL scripts are run against it to provide a more accurate size value when logging it to the metadata store.
This value is also used (pre-restore) to check size requirements, but could probably be replaced with the backup size (via Read-DbaBackupHeader?) as a fallback, which would be more accurate than
1
:dbaclone/functions/image/New-DcnImage.ps1
Lines 387 to 402 in 2d73971
The text was updated successfully, but these errors were encountered: