Articles in this section

How to determine database usage of an environment

Goal

Determine approximate database usage of a Upsun project using the Upsun CLI tool.

Assumptions

Problems

As a general rule, the database service should have at least 15% of disk space available on a Upsun project environment, so it is useful to be able to approximate the current disk usage of a project’s database(s).

Steps

1. Log in to Platform CLI

$ upsun login

2. Find the project ID

Note the project ID of the project you’re checking:

$ upsun project:list

3. Find the environment ID

Note the environment ID for the environment you’re checking.

$ upsun environment:list -p <project-ID>

4. Run the database size command

$ upsun db:size -p <project-ID> -e <environment-ID>

The command will return something like:

+----------------+-----------------+--------+
| Allocated disk | Estimated usage | % used |
+----------------+-----------------+--------+
| 14.6 GiB       | 9.4 GiB         | ~ 64%  |
+----------------+-----------------+--------+


Warning
This is an estimate of the databases disk usage. It does not represent its real size on disk.

Conclusion

Obtaining an approximate measure of your database usage can be done from the command line using the Upsun CLI tool.

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.