Submitted by yngens on Wed, 10/31/2018 - 14:18
I am trying to get to a virtual server's database in custom bash script that knows only virtual server's ID. Using the virtualmin list-domains --id 153950149523357 --simple-multiline
or virtualmin list-domains --id 153950149523357 --multiline
gives everything, but the database name(s). Is there any way to get to virtual server's database(s) by its ID? If not, could you please consider adding database(s) to --multiline
s or --simple-multiline
s output?
Status:
Active
Comments
Submitted by andreychek on Wed, 10/31/2018 - 14:31 Comment #1
Would adding an
id
parameter to the list-databases command work for you? I believe that'd be simpler and safer than adding more fields to list-domains multi-line output.Submitted by yngens on Thu, 11/01/2018 - 05:41 Comment #3
Any way of getting database(s) knowing only server ID would work for us.
Submitted by JamieCameron on Fri, 11/02/2018 - 00:09 Comment #4
You can convert an ID to a domain name with :
dom=`virtualmin list-domains --id 12345 --name-only`
and then pass
$dom
to thevirtualmin list-databases
API command.