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


Skip to content
  • 0 Votes
    11 Posts
    686 Views
    fbartelsF

    @timconsidine said in Moving Cloudron to new server : stop apps?:

    that I didn't set the PTR record in the new VPS provider until I started the migration

    I ran into exactly this problem the last time as well 😄

  • Cannot migrate app

    Solved Support
    9
    0 Votes
    9 Posts
    459 Views
    girishG

    @atridad yeah, I just bumped the internal default for data directory migration to be 1GB . I tested with ~500GB now and it's all good.

  • 0 Votes
    17 Posts
    995 Views
    DanTheManD

    @girish
    Thanks for the info and all the work (support) you have done for me Girish 👍👍

  • 0 Votes
    2 Posts
    253 Views
    girishG

    @shai you have to build a custom app, please see this guide https://docs.cloudron.io/guides/multiple-databases-lamp/

  • 0 Votes
    3 Posts
    512 Views
    J

    @brutalbirdie Thank you, I'll give that a shot!

  • 0 Votes
    8 Posts
    446 Views
    d19dotcaD

    Thanks guys! Yeah it's a weird issue for sure and likely very rare, so it's probably not a big deal. If it helps for reproducing it, here's a few notes:

    27 apps installed at the time of backup/restore Backup & Restore used tgz format with OVH Object Storage in BHS region Backup from a LunaNode m.8 model in Toronto region Restored onto OVH b2-7 model (though since upgraded to b2-15) in BHS3 region LunaNode instance (source) was running Ubuntu 18.04 at backup time, and OVH instance (target) was running Ubuntu 20.04 at the time of restore. When I restored, I very nearly ran out of disk space on the included disk, leaving only ~ 1.5 GB of space remaining. When restoring initially, it failed to restore because of the issue I reported earlier, though doubtful this is a root cause. Immediately moved the boxdata to external disk afterwards though, so plenty of space free soon after the restore was done once I moved boxdata off (20 GB in emails alone so it takes up a lot of space).

    Hopefully those notes above help in some small way. No worries though if you can't reproduce it, I imagine it's a very rare scenario and could have even been completely unique to me somehow. Hopefully others can chime in though if they experienced anything similar where cron wouldn't run at all (whether a restore involved or not, as I'm still not 100% certain it had to do with the restore though I presume it did).

  • Custom Apps

    Support
    18
    0 Votes
    18 Posts
    816 Views
    P

    One other note, the .sql file originally failed to upload due to the dump having the following line:

    Create SCHEMA public;

    I commented that out and the import ran fine. I'm guessing there is a command to dump the Postgres DB without a create statement but someone smarter than me probably knows it. I haven't used Postgres a day in my life until yesterday so I'm still getting to know it. I have only used MySQL, Maria and MS SQL and all of those have an option to dump without the create statement, but I figured it was just easier to comment that line out of the SQL file instead of looking up the command and doing a new dump.

  • 2 Votes
    3 Posts
    287 Views
    M

    @girish ah alright, was moving some LAMP 7.2 and 7.3 to 7.4., clone does not work in that scenario 😉

  • 0 Votes
    8 Posts
    502 Views
    girishG

    Depending on the provider, they already zero things out. For example, DO does this. Of course, you have to trust your provider.

  • 0 Votes
    3 Posts
    247 Views
    T

    @subven Thank you! I had not seen those docs 😯

    It turned out that the Docker image of Mattermost used PostgreSQL, whereas on Cloudron if I'm not mistaken MySQL is used.

    I tried converting migrating the PostgreSQL database to MySQL but it was a bit of a headache, so I have gone down the conventional route of using Mattermost's bulk export/import.

  • 0 Votes
    4 Posts
    389 Views
    ShaiS

    @girish I successfully migrated my Cloudron from one server to another. I followed your directions and updated Cloudron to v 6.0.0 before making my final backup of the old server.

    Thank you.

  • 1 Votes
    7 Posts
    619 Views
    girishG

    @msbt You can disable automatic backups of nextcloud. Then do a full box backup and then you can restore all the apps on the other server using the box backup. Nextcloud will get installed but won't have any data (as expected) because there is no backup for it. So, far so good.

    For nextcloud migration, one first needs a "snapshot" of the app on the old server i.e the database dump etc. For this, there is a CLI command called cloudron export --snapshot. This will simply create the database dumps etc. You can then wholesale copy /home/yellowtent/appsdata/{appid} from your old server into the new server using rsync/scp or whatever. Once copied, on the new server, you do cloudron import --in-place. This will then restore nextcloud from the dump files etc (thus, the in place).

    The catch is that I implemented cloudron export only after I read your post 🙂 So, it will only be in the next release. But you can always apply https://git.cloudron.io/cloudron/box/-/commit/78752fde7a402821b40eeb75091089470933b23f on the old server. cloudron import has been there for a long time, it's a hidden thing that we use to import large backups into Cloudron. So, I guess you can wait for 6.0.1, which should be out shortly since we have to release it soonish as it had some regressions.

  • 0 Votes
    3 Posts
    308 Views
    JOduMonTJ

    Ok I gotcha myself because anyway I create my own pain 😉

    so from what I understand
    to being able to restore Cloudron verify the DNS first than app/data

    I forgot to authorize my new IP in my Cloudflare API

    code 9109 is probably related to the fact it was unable to edit the DNS.
  • 1 Votes
    9 Posts
    512 Views
    girishG

    @Nicolas One way to avoid this mistake is use getenv('CLOUDRON_MYSQL_USERNAME'), getenv('CLOUDRON_MYSQL_DATABASE') instead of the raw values. This way when you migrate next time, it will pick up the correct database connection values.

    The full env list for MySQL is at https://cloudron.io/documentation/custom-apps/addons/#mysql

  • 0 Votes
    5 Posts
    392 Views
    V

    Thanks!
    The migration went super smooth and fast with the "All In One" plugin.

  • Ghost: Crashing

    Moved Solved Ghost
    8
    0 Votes
    8 Posts
    853 Views
    girishG

    @tshirt-chihuahu It should rarely happen (but it happens). I will put the workaround in the package itself. It seems that workaround works quite reliably for a couple of years now.

  • 0 Votes
    5 Posts
    819 Views
    girishG

    @echokos Right as @NCKNE suggested, you can enable the dynamic dns option under Domains view before migration and take a backup after you enabled it. With that the DNS records will be automatically updated post migration. After migration, you can turn off that option since the IP won't change anyways.

  • 0 Votes
    3 Posts
    238 Views
    girishG

    The backups also contain the sql dump and all the data files nicely structured, if required.

  • Migrating the license

    Support
    7
    0 Votes
    7 Posts
    531 Views
    JOduMonTJ

    @girish said in Migrating the license:

    If the domain name changes, we will have to do this by hand on our side.

    nope, the main domain didn't change 😉

    @girish said in Migrating the license:

    we might have some license file that you can export/import

    if you are happy with this kind of license and user are happy, why not keeping it that way 😉

    Thank for your explanation and replied.

  • 22 Votes
    20 Posts
    3k Views
    fbartelsF

    @subven said in Cloudron migration to new server: amazing!!!:

    before it is tested and officially supported

    ah indeed, I missed that 22.04 is not yet supported. I rephrase my sentence into "you can directly upgrade to the latest supported OS".