Problems with new install of 3.4.x

Zammad does come with a pre built and thus shipped ruby and rails version.
This allows Zammad to be independent from the environment you may have installed.

Zammad is strict on the required ruby version.
Also, as it seems like your system runs perfectly fine after restoration for some minutes / hours, that seems a bit odd to me.

If you get CSRF errors, this is due to your webservers host configuration, this is covered on point 2.1 here: Zammad 3.2 is available

Above run commands (directly calling bin etc) are not correct.
This is partly covered here: https://docs.zammad.org/en/latest/admin/console.html

a db:init shouldn’t be required in your case, at least that’s what I currently expect as it does seem to be a login issue on your end.

If it still doesn’t work, please provide your production logfile (/var/log/zammad) and we’ll continue from there.