Resource Management (Cloud Databases)
Cloud Databases are defined in your convox.yml using a managed resource type. The CLI provides commands to interact with these managed databases.
resources
List resources for an application.
$ convox cloud resources -a <app> -i <machine>
Options:
--watch: Watch for updates
Example:
$ convox cloud resources -a myapp -i production
NAME TYPE URL
database postgres postgres://user:pass@host:5432/db
resources console
Open a console for a resource.
$ convox cloud resources console <resource> -a <app> -i <machine>
Example:
$ convox cloud resources console database -a myapp -i production
psql (17.5)
Type "help" for help.
db=#
resources export
Export data from a resource.
$ convox cloud resources export <resource> -a <app> -i <machine>
Options:
--file: Output file path
Example:
$ convox cloud resources export database -a myapp -i production --file backup.sql
Exporting resource data... OK
resources import
Import data to a resource.
$ convox cloud resources import <resource> -a <app> -i <machine>
Options:
--file: Input file path
Example:
$ convox cloud resources import database -a myapp -i staging --file backup.sql
Importing resource data... OK
resources info
Get information about a resource.
$ convox cloud resources info <resource> -a <app> -i <machine>
resources url
Get the connection URL for a resource.
$ convox cloud resources url <resource> -a <app> -i <machine>
Example:
$ convox cloud resources url database -a myapp -i production
postgres://user:pass@host:5432/db