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

SOLVED Backup import error: migrating a cloudron app to a new cloudron server

  • Directory does not exist or cannot be accessed: ENOENT: no such file or directory, stat '2020-10-08-060000-926'

    I downloaded the json backup to my computer. (The backup id that I can copy from the old cloudron is: 2020-10-08-060000-926/app_5b46271b-ac3e-45cd-8e0a-fbb3f4a399f4_2020-10-08-060012-161_v2.13.0)

    That ID is also what the new cloudron pops in automatically as "back up path" ... but then I receive the above error. There's no encryption, to my knowledge. I wonder why in the cloudron docs it references a .tar.gz file in the /tmp/ directory when my downloaded backup is a json...

    Thanks for any pointers.

  • Where was your backup hosted ? internal to your cloudron box or external like AWS S3 ?

  • the .tar.gz file is when you choose tarbal as backup format :

    In my case I use rsync incremental backups and I'm using AWS S3 backups
    and my downloaded Json file represent these options just fine.

    {"backupId":"2020-10-04-010001-410/app_f226c463-b0d2-47f6-af42-c319b3c5f3f3_2020-10-04-014643-981_v1.4.6","encrypted":true,"provider":"s3","format":"rsync","bucket":"secret","prefix":"secret","accessKeyId":"secret","region":"eu-central-1","encryption":secret,"retentionPolicy":{"keepWithinSecs":2592000},"schedulePattern":"00 00 3 * * 0"}

    if your json file represent the filename (the backupId) has tar.gz it means your main default backup settings are in tar.gz, hence your json only represent how your overall cloudron is configured.

    the json file is like an instruction about where the backup is stored, in my use case, the different secret you see above, are the information to access remote AWS S3 buckets where my backups are being hosted.

    Once this json file is uploaded to as backup source, it simply follow the instruction and download the backup from its remote location and restore it where I specified it.

    It does not matter if it's on a new cloudron provided the credentials to access the backup are correct. Cloudron then will change all the necessary fields based on the new cloudron/domain and simply restore the file in this container in a agnostic fashion.

    obviously you can only restore app that match : from wordpress to wordpress etc...

  • @rmdes thanks for the response.

    Both cloudrons are hosted on AWS Lightsail. The backups were the automatic kind, I never set anything up on S3 or elsewhere. I don't have a tar.gz file, only the json

  • So this means your backup where always local (be careful with this, its not a best practice)
    it means your backups are in your original cloudron filesystem

    Your backup is at /var/backups/
    by default I think cloudron creates backups as .tar.gz files

    I never moved apps from one cloudron to another from backup filesystem.

    But if I was you, I would configure an S3 bucket, configure the cloudron backup to use S3 at the cloudron level. Force a new backup from the apps you want to move.
    Download the new JSON files from your new S3 backup.

    move to your new cloudron, install the same app you want to restore.
    once installed, go to backup of that app.
    Import backup, Click on Upload Backup Config (your new S3 based Json file)
    and boum, all the details are the correct field, you just have to type the secret access key from your S3 bucket and voila 🙂

    In short your JSON file is just a direction to say where your backup is actually hosted and I'm not sure you can move apps from a different cloudron, when the backups you want to restore from are inside a local filesystem.

    For your backups to be accessible to your new cloudron, you need to have them in Minio, S3 or any other backup "provider" your configured.


  • @rmdes OK that seems to have solved it! It wasn't clear to me that there was both the config file AND the tarball located on the server.

    And yeah, this new cloudron is connected to S3. the last one was more of a test... I just happened to like what I came up with and didn't feel like doing it all over again 😜


  • glad to have helped 🙂

Log in to reply