CloudPanel CLI Commands
CloudPanel v1 is obsolete
CloudPanel v1 is obsolete; check out the CloudPanel v2 Docs.
The CloudPanel CLI is a command-line application that offers commands for backing up databases, restoring databases, showing database credentials, disabling two-factor authentification, resetting passwords, and resetting permissions.
With the following command you see all available commands:
Commands
The following commands are available only for the root user:
- db:show:credentials
- db:show:master-password
- user:disable:mfa
- user:reset:password
- vhost-templates:import
The following commands are available for other users:
- db:backup
- db:import
- system:permissions:reset
Database
Database Backup
With the Database Backup command you can backup all databases or specific ones.
For backing up databases, CloudPanel uses the standard utility mysqldump.
To backup all databases, run the following command:
If you want to exclude some databases, run the following command:
To backup only one specific database, run the following command:
The Database Backups will be compressed via gzip and stored in the following directory:
Database Import
Importing or restoring a database can be done with the following command:
The supported file formats are .sql and sql.gz.
Database Credentials
The Database Credentials command shows the master credentials for connecting to the database.
The output will look like:
Use the Connect Command to connect to MySQL from the command-line.
This command is only available for the root user.
Database Master Password
To display only the Database Maste Password run the following command:
This command is only available for the root user.
User
Disable 2-FA
To disable Two-Factor Authentication for a user, run the following command:
This command is only available for the root user.
Reset Password
To reset a password for a user, run the following command:
This command is only available for the root user.
System
Permission Reset
To reset the owner and permissions of files and directories run the following command:
The reset of the owner and permissions are applied recursively.