Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,25 @@ Usually, the database of a Mendix application in Mendix Cloud grows over time. H

{{< figure src="/attachments/deployment/mendix-cloud-deploy/backups/database-size-reduction/Untitled.png" class="no-border" >}}

The data grows in a steady fashion. If entities are removed in a major release, you may see a temporary decrease in the size of the databasebut on average, the database size tends to increase over time.
The data grows in a steady fashion. If entities are removed in a major release, you may see a temporary decrease in the size of the database, but on average, the database size tends to increase over time.

One reason for this growth is that the physical space on the hard disk is not freed up, even when you delete records from the database. Instead, the now-empty records are kept in place so that the space can be reused if new records are inserted into (created) the database. This is helpful because it means database records on the hard disk remain physically close to each otherwhich in turn means that disk read operations should perform better.
One reason for this growth is that the physical space on the hard disk is not freed up, even when you delete records from the database. Instead, the now-empty records are kept in place so that the space can be reused if new records are inserted into (created) the database. This is helpful because it means database records on the hard disk remain physically close to each other, which in turn means that disk read operations should perform better.

However, there may be times when physically reclaiming the lost space is important. For example, if you get an alert that 90% of your disk space is in use, you may want to reduce your disk usage.

## Recovering Physical Disk Space

You can recover physical disk space by creating a database backup and then restoring it.
Creating and restoring a database backup reduces the physical disk space used by your database. This process performs a full physical rewrite of the database, compressing it to contain just the current records and optimizing the physical placement of files on the actual hard disk to maximize the performance of disk read operations.

{{% alert color="warning" %}}
Do not try to manipulate the backup in any way to reduce its size before restoring it. Doing so may lead to a backup file which can no longer be restored.
{{% /alert %}}

A database restore does a full physical rewrite of the database. It compresses the database to contain just the current records. It also fully optimizes the physical placement of files on the actual hard disk to maximize the performance of disk read operations.
In the Mendix Portal, you can create and restore a backup on your app's **Backups** page. For more information, refer to [Creating a Backup](/developerportal/operate/create-backup/).

In the Mendix Portal, you can create and restore a backup on your app's **Backups** page. For more information, see [Creating a Backup](/developerportal/operate/create-backup/).
{{% alert color="info" %}}
If performing a database backup and restore does not reduce physical disk usage, contact [Mendix Support](https://support.mendix.com/).
{{% /alert %}}

## Summary

Expand Down