Hi, good day
I hope this can help you, and give you some hints.
How to reduce size of docker data volume in Docker Desktop for Windows v2 - DEV Community
Best Regards
Gerardo
Below are the steps and options you can follow to resolve this:
The size of your BAK file is directly influenced by the size of the database. You can reduce the size of the database before creating the backup by shrinking unused space in the database and clearing old/unnecessary data.
Large databases in Business Central often contain test data, historical entries, or old audit records that aren't required for container development purposes. You can create a lighter version of the database by:
Clearing Logs and Histories:
Export and Truncate Specific Data:
sqlCommon large tables include:
Change Log Entries
Job Queue Entries
Archived Documents
Backup the Reduced Database:
sql
WITH COMPRESSION
option will significantly reduce the BAK file size.If you cannot reduce the size of the database significantly by truncating data, you can still compress the BAK file using external tools.
Use Built-In Compression:
WITH COMPRESSION
option:
sql
Zip the BAK File:
If your Business Central database contains multiple companies, exporting only the company or companies you need can dramatically reduce the database size.
Export-NAVData
PowerShell command:
powershell
Import-NAVData
command to import the company data:
powershell
This approach is particularly useful if the database size is inflated due to data for unused companies.
If the sole purpose of your container is to develop or test, consider using Microsoft's pre-built Docker images for Business Central instead of uploading your own database.
Pull a lightweight Business Central Docker image:
powershell
24.x
for BC24).Use the pre-built image and import your extensions or configurations separately.
If you still cannot reduce the database size enough, you can split the BAK file into multiple smaller parts using SQL Server’s backup splitting feature. This allows you to manage large files more efficiently when working with Docker.
WITH FORMAT
and WITH FILE
options to create split backups:
sql
If you're still facing challenges with a large database, consider using a demo database for your container. Microsoft provides sample Business Central databases for testing purposes:
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,151 Super User 2024 Season 2
Martin Dráb 229,993 Most Valuable Professional
nmaenpaa 101,156