Goal
Determine approximate database usage of a Upsun project using the Upsun CLI tool.
Assumptions
- One or more Upsun projects
- Upsun CLI tool installed locally
- SSH key configured with the project account(s)
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.
Comments
Please sign in to leave a comment.