Restore server or fix it

Hardware: old computer
YunoHost version: can`t check…
Error: YunoHost is not or not correctly installed. Please execute 'yunohost tools postinstall'
I have access to my server : Through SSH and also by direct access via keyboard

Description of my issue

i did a mistake and tried to install ssmtp. in the installation process, Debian uninstall a lot of yunohost packages. I think I’ve been able to recover all the packages that i removed by looking at /var/log/apt/term.log.

the list of packages:

dnsmasq dovecot-antispam dovecot-sieve dovecot-managesieved dovecot-lmtpd dovecot-imapd dovecot-ldap etckeeper fail2ban fake-hwclock python3-matplotlib python-matplotlib-data fonts-lyx mariadb-server mariadb-server-10.1 galera-3 glances haveged hddtemp iproute libjs-lodash javascript-common jq ldap-utils python3-numpy liblapack3 libblas3 libblas-common mariadb-client-10.1 libdbd-mysql-perl libconfig-inifiles-perl libdbd-ldap-perl libdbi-perl libgfortran3:amd64 libhavege1:amd64 ssowat nginx-extras libnginx-mod-nchan libhiredis0.13:amd64 libjq1:amd64 libjs-jquery-ui libjs-angularjs libjs-jquery opendkim-tools liblua5.1-0:amd64 rspamd libnginx-mod-http-lua libluajit-5.1-2:amd64 libluajit-5.1-common libmail-spf-perl libmemcachedutil2:amd64 libmemcached11:amd64 libnet-ip-perl libnet-dns-perl libnetaddr-ip-perl libnginx-mod-http-auth-pam libnginx-mod-http-cache-purge libnginx-mod-http-dav-ext libnginx-mod-http-echo libnginx-mod-http-fancyindex libnginx-mod-http-geoip libnginx-mod-http-headers-more-filter libnginx-mod-http-image-filter libnginx-mod-http-subs-filter libnginx-mod-http-perl libnginx-mod-http-ndk libnginx-mod-http-uploadprogress libnginx-mod-http-upstream-fair libnginx-mod-http-xslt-filter libnginx-mod-mail libnginx-mod-stream libnss-ldapd:amd64 libnss-myhostname:amd64 slapd libodbc1:amd64 libonig4:amd64 libopendbx1-sqlite3 libopendbx1 libopendkim11 libpam-ldapd:amd64 librbl1 libterm-readkey-perl libunbound2:amd64 libunwind8 libvbr2 python3-pil:amd64 libwebpdemux2:amd64 moulinette python-yaml libyaml-0-2:amd64 lua-bitop:amd64 metronome lua-event:amd64 lua-expat:amd64 lua-filesystem:amd64 lua-json lua-ldap:amd64 lua-lpeg:amd64 lua-rex-pcre:amd64 lua-sec:amd64 lua-socket:amd64 lua-zlib:amd64 php-ldap python-argcomplete python-jinja2 python-ldap python-markupsafe python3-dateutil python3-netifaces python3-pyasn1 python3-pyparsing python3-pystache socat unzip unscd dovecot-core libexttextcat-2.0-0:amd64 libexttextcat-data libstemmer0d:amd64 python3-websocket python3-tz python3-systemd python3-pyinotify python3-psutil python3-docker python3-cycler python3-crypto python3-pysnmp4 python3-bottle python-tz python-psutil python-miniupnpc python-greenlet python-gnupg python-gevent python-gevent-websocket python-bottle postsrsd postfix-sqlite php-mysql php-mcrypt php-intl php-fpm php-curl nslcd nslcd-utils nginx-common netcat-openbsd mariadb-common mariadb-server-core-10.1 mariadb-client-core-10.1 lua5.1

i tried to reinstall the packages but even after that, i couldn’t access the admin page (403 forbidden error) at local ip, and in the domain page i couldn’t log in.

next i tried to run this command

curl | bash

but it fails. the log:

i even tried to restore by the yunohost.backup, but it also failed

Traceback (most recent call last):
  File "/usr/bin/yunohost", line 214, in <module>
  File "/usr/lib/python2.7/dist-packages/moulinette/", line 136, in cli, output_as=output_as, password=password, timeout=timeout)
  File "/usr/lib/python2.7/dist-packages/moulinette/interfaces/", line 425, in run
    ret = self.actionsmap.process(args, timeout=timeout)
  File "/usr/lib/python2.7/dist-packages/moulinette/", line 523, in process
    return func(**arguments)
  File "/usr/lib/moulinette/yunohost/", line 2147, in backup_restore
    restore_manager = RestoreManager(name)
  File "/usr/lib/moulinette/yunohost/", line 841, in __init__ = backup_info(name, with_details=True)
  File "/usr/lib/moulinette/yunohost/", line 2292, in backup_info
    key_info["size"] = info["size_details"][category][name]
TypeError: list indices must be integers, not str

please help me to recover the server.

Hopefully that kind of stuff shouldn’t happen anymore in 3.6.x as YunoHost will now be flagged as “essential” and it will be much complicated to remove it by mistake :stuck_out_tongue_winking_eye:

Anyway : if you reinstalled the packages (it sounds like you did), try to :

touch /etc/yunohost/installed

The thing about yunohost backup sounds like a real bug in yunohost though, would be interesting to see what’s the content of the corresponding backup_file.json (in /home/yunohost.backup/archives/). But in any case the fix with the touch should work I think.

after i run this command:
touch /etc/yunohost/installed

what i should do?
i tried to run again this command:

curl | bash

and got:

Your configuration files for :     
- postfix                               
- dovecot                                        
- mysql                                           
- nginx                                           
- metronome                                         
will be overwritten ! 

on /home/yunohost.backup/archives/, backup_file.json:
{"size_details": {"apps": {"wallabag2": 167330857, "couchpotato": 72463497, "owncloud": 107255165, "kanboard": 13896146, "freshrss": 10651046, "nextcloud": 625940565}, "system": {"conf_ssh": 588017, "conf_ynh_firewall": 487, "data_mail": 10966005, "conf_cron": 53, "conf_ynh_certs": 187258, "conf_ynh_mysql": 11, "conf_xmpp": 79464, "conf_ynh_currenthost": 0, "data_home": 263418040, "conf_nginx": 39342, "conf_ssowat": 6380, "conf_ldap": 3692}}, "description": "", "created_at": 1552049307, "apps": {"wallabag2": {"version": "2.3.2-1", "name": "Wallabag", "description": "A self hostable read-it-later app"}, "couchpotato": {"version": "-", "name": "CouchPotato", "description": "Automatic movie downloader"}, "owncloud": {"version": "9.0.2", "name": "OwnCloud", "description": "Sync & share your files, pictures, music, contacts, calendars, and much more!"}, "kanboard": {"version": "1.2.3~ynh1", "name": "Kanboard", "description": "Kanboard is a simple visual task board web application"}, "freshrss": {"version": "1.11.2", "name": "FreshRSS", "description": "FreshRSS is a selfhostable RSS reader"}, "nextcloud": {"version": "13.0.6~ynh1", "name": "Nextcloud", "description": "Access & share your files, calendars, contacts, mail & more from any device, on your terms"}}, "system": {"conf_ssh": ["/usr/share/yunohost/hooks/backup/08-conf_ssh"], "conf_ynh_firewall": ["/usr/share/yunohost/hooks/backup/20-conf_ynh_firewall"], "data_mail": ["/usr/share/yunohost/hooks/backup/23-data_mail"], "conf_cron": ["/usr/share/yunohost/hooks/backup/32-conf_cron"], "conf_ynh_certs": ["/usr/share/yunohost/hooks/backup/21-conf_ynh_certs"], "conf_ynh_mysql": ["/usr/share/yunohost/hooks/backup/11-conf_ynh_mysql"], "conf_xmpp": ["/usr/share/yunohost/hooks/backup/26-conf_xmpp"], "conf_ynh_currenthost": ["/usr/share/yunohost/hooks/backup/40-conf_ynh_currenthost"], "data_home": ["/usr/share/yunohost/hooks/backup/17-data_home"], "conf_nginx": ["/usr/share/yunohost/hooks/backup/29-conf_nginx"], "conf_ssowat": ["/usr/share/yunohost/hooks/backup/14-conf_ssowat"], "conf_ldap": ["/usr/share/yunohost/hooks/backup/05-conf_ldap"]}, "size": 1370001728}

Just go to your admin interface and yunohost should be back without the need to do the postinstall…

i asked because i still get 403 forbidden error in the admin page.

please help me

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