Mastodon upgrade failed & restore from backup failed

What type of hardware are you using: Old laptop or computer
What YunoHost version are you running: 12.1.17.1
What app is this about: Mastodon

Describe your issue

Hi, and thanks to all for being here around this awesome system!!!

There was an upgrade for Mastodon, and I tried to run it.

Apparently, this upgrade failed, and the system subsequently removed the Mastodon installation.

There was a pre-upgrade backup saved, but whenever I try to run it:

yunohost backup restore mastodon-pre-upgrade1 --apps mastodon

I get this result

Info: WARNING - Unfortunately, an unexpected error occurred, and Bundler cannot continue.
Info: DEBUG -
Info: WARNING - First, try this link to see if there are any existing issue reports for this error:
Info: WARNING - https://github.com/rubygems/rubygems/search?q=Permission+denied+%40+dir_s_mkdir+-+%2Fopt%2Frbenv%2Fversions%2F3.3.5%2Flib%2Fruby%2Fgems%2F3.3.0%2Fcache%2Fbundler&type=Issues
Info: DEBUG -
Info: WARNING - If there aren't any reports for this error yet, please fill in the new issue form located at https://github.com/rubygems/rubygems/issues/new?labels=Bundler&template=bundler-related-issue.md. Make sure to copy and paste the full output of this command under the "What happened instead?" section.
Info: DEBUG - + ynh_exit_properly
Info: Removing mastodon…
Info: [++++................] > Removing system configurations related to mastodon...
Info: '/etc/nginx/conf.d/mastodon.modspil.dk.d/mastodon.conf' wasn't deleted because it doesn't exist.
Info: '/etc/cron.d/mastodon' wasn't deleted because it doesn't exist.
Info: Removing Ruby-3.3.5
Info: Removing rbenv
Info: [####################] > Removal of mastodon completed
Info: Deprovisioning database...
Info: Deprovisioning apt...
Info: Deprovisioning ports...
Info: Deprovisioning permissions...
Info: Deprovisioning install_dir...
Info: Deprovisioning system_user...
Info: Deprovisioning sources...
Success! mastodon uninstalled

I’d like some tips about how to get onwards from here. I’d love to get my Mastodon instance back.

Maybe the way to go would be to make a fresh, empty install and load it with the database from the backup, but I don’t know if that’s even feasible.

Any help would be appreciated.

Share relevant logs or error messages

https://paste.yunohost.org/raw/nixepazuki

So apparently, the error is:

Permission denied @ dir_s_mkdir - /opt/rbenv/versions/3.3.5/lib/ruby/gems/3.3.0/cache/bundler

and I’m currently trying to get around this by doing mkdir -p /opt/rbenv/versions/3.3.5/lib/ruby/gems/3.3.0/cache/bundler, but not setting my hopes too high. It should, at all rates not be necessary. Might be a wrong path somewhere in the restore script.

Hmmm, this gave me a new error message:

WARNING - There was an error while trying to write to `/opt/rbenv/versions/3.3.5/lib/ruby/gems/3.3.0/cache/bundler/git`. It is likely that you need to grant write

New mkdir -p, then. A bit hacky, but if it works …

Okay, this is a far as I got:

Info: WARNING - In Gemfile:
Info: WARNING -   devise-two-factor was resolved to 6.1.0, which depends on
Info: WARNING -     devise was resolved to 4.9.4, which depends on
Info: WARNING -       responders was resolved to 3.1.1, which depends on
Info: WARNING -         railties was resolved to 8.0.2, which depends on
Info: WARNING -           rake
Info: DEBUG - + ynh_exit_properly

A Ruby version conflict. Does anyone know how to go from here?

The full log of my last attempt is here: https://paste.yunohost.org/raw/emokemodib

I’m now trying to get my Mastodon instance back (the main thing is my followers and people I follow) by restoring an earlier backup. Unfortunately, the earliest one I have appears to be from March, which is bad practise - I need to improve that.

Wow, restoring an old backup actually succeeded!

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.