Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. WordPress (Developer)
  3. Accessing db via CLI?

Accessing db via CLI?

Scheduled Pinned Locked Moved Solved WordPress (Developer)
6 Posts 2 Posters 1.0k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • chetbakerC Offline
    chetbakerC Offline
    chetbaker
    wrote on last edited by
    #1

    Hi there,

    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?

    girishG 2 Replies Last reply
    0
    • chetbakerC chetbaker

      Hi there,

      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?

      girishG Offline
      girishG Offline
      girish
      Staff
      wrote on last edited by girish
      #2

      @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:

      • Go to my.domain.com of 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/hosts file like below. Replace 1.2.3.4 with the old server IP. Replace my.domain.com with your domain name.

          1.2.3.4 my.domain.com
      
      • 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>/mysqldump on the server (replace appid with the id in Update section of the app

      1 Reply Last reply
      1
      • chetbakerC chetbaker

        Hi there,

        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?

        girishG Offline
        girishG Offline
        girish
        Staff
        wrote on last edited by girish
        #3

        @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:

        1.2.3.4 wordpress.domain.com
        

        Then, if you go to https://wordpress.domain.com in the browser, you will hit the old wordpress. (you have to put the real domain you configured previously with and not some example domain).

        1 Reply Last reply
        1
        • chetbakerC Offline
          chetbakerC Offline
          chetbaker
          wrote on last edited by
          #4

          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 1.2.3.4 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?

          girishG 1 Reply Last reply
          0
          • chetbakerC chetbaker

            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 1.2.3.4 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?

            girishG Offline
            girishG Offline
            girish
            Staff
            wrote on last edited by
            #5

            @chetbaker the message seems to indicate that there is no app for wordpress.domain.com on the old server. if you ssh into the old server and do docker ps | grep wordpress do you see wordpress there? you can then do docker inspect <containerid> | grep APP_ORIGIN to double check what domain it is serving.

            chetbakerC 1 Reply Last reply
            0
            • girishG girish

              @chetbaker the message seems to indicate that there is no app for wordpress.domain.com on the old server. if you ssh into the old server and do docker ps | grep wordpress do you see wordpress there? you can then do docker inspect <containerid> | grep APP_ORIGIN to double check what domain it is serving.

              chetbakerC Offline
              chetbakerC Offline
              chetbaker
              wrote on last edited by
              #6

              @girish Yep, that worked! Thanks a lot.

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Bookmarks
              • Search