Solved Accessing db via CLI?
I had an issue with my cloudron machine that forced me to use a backup and restore to a new location.
The thing is now I need to access to the old WP instance where I just have access via SSH and not vía cloudron.
I tried to use a mysqldumb using the files at credentials.txt with no luck. Is there a way of doing this?
@chetbaker If I understand you correctly, you have access to your old cloudron instance and want to get the sql dump out of the WordPress instance inside it?
I think the easiest way is to "trigger" a backup of the app via the Cloudron dashboard. What you do is:
my.domain.comof your new Cloudron, and change the name/logo to something different (see below as to why).
Add an entry in your PC/laptop/Mac,
/etc/hostsfile like below. Replace
220.127.116.11with the old server IP. Replace
my.domain.comwith your domain name.
Then, in the browser,
my.domain.com. This will now give you access to your old cloudron. You might want to doubly make sure you are accessing the old server by checking the name/logo.
Trigger a backup. App -> Backups -> Create backup
You can now get the mysqldump file from wherever you store your backups. It will also be in
/home/yellowtent/appsdata/<appid>/mysqldumpon the server (replace appid with the id in Update section of the app
@chetbaker BTW, if it's better to get access to the old WordPress instead of dump files (maybe it's easier to import that way), then just fix the WP domain instead in the /etc/hosts file:
Then, if you go to
https://wordpress.domain.comin the browser, you will hit the old wordpress. (you have to put the real domain you configured previously with and not some example domain).
Thanks for the detailed explanation, @girish and I'm sorry if I explained it poorly, but this is the situation:
In simple, I just lost edits of a single post we were editing in the old wordpress.
I did what you said at the end, editing the /etc/hosts file to
18.104.22.168 wordpress.domain.com(obviously with the old server IP and my domain instead of domain.com) but I received this message on the browser:
You are seeing this page because this domain points to Cloudron server IP but no app is installed on that domain.
Is there something dummy I'm doing wrong?
@chetbaker the message seems to indicate that there is no app for
wordpress.domain.comon the old server. if you ssh into the old server and do
docker ps | grep wordpressdo you see wordpress there? you can then do
docker inspect <containerid> | grep APP_ORIGINto double check what domain it is serving.
@girish Yep, that worked! Thanks a lot.