usmannasir / cyberpanel

Cyber Panel - The hosting control panel for OpenLiteSpeed
GNU General Public License v3.0
1.48k stars 576 forks source link

URGENT, DELETED MARIADB BY MISTAKE #1187

Closed eakteam closed 5 months ago

eakteam commented 5 months ago

@usmannasir Please take a look!

Hi, i'm in the production server and don't have currently any backup/snapshot of the server.

Tried to remove rsync by sending this command: apt purge --auto-remove rsync and it messes up everything. Cannot login to cyberpanel, websites not working etc.

This is what happened while uninstalling.

Please tell me how to install theese stuff again!

root@eakteam ~ # apt purge --auto-remove rsync
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
  galera-4* libcgi-fast-perl* libcgi-pm-perl* libconfig-inifiles-perl* libdaxctl1* libfcgi-bin* libfcgi-perl* libfcgi0ldbl* libhtml-template-perl*
  libndctl6* libpmem1* mariadb-client-10.6* mariadb-client-core-10.6* mariadb-server* mariadb-server-10.6* mariadb-server-core-10.6* rsync*
0 upgraded, 0 newly installed, 17 to remove and 0 not upgraded.
After this operation, 153 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 89933 files and directories currently installed.)
Removing mariadb-server (1:10.6.12-0ubuntu0.22.04.1) ...
Removing mariadb-server-10.6 (1:10.6.12-0ubuntu0.22.04.1) ...
Removing galera-4 (26.4.9-1build1) ...
Removing libcgi-fast-perl (1:2.15-1) ...
Removing libhtml-template-perl (2.97-1.1) ...
Removing libcgi-pm-perl (4.54-1) ...
Removing mariadb-client-10.6 (1:10.6.12-0ubuntu0.22.04.1) ...
Removing libconfig-inifiles-perl (3.000003-1) ...
Removing mariadb-server-core-10.6 (1:10.6.12-0ubuntu0.22.04.1) ...
Removing libpmem1:amd64 (1.11.1-3build1) ...
Removing libndctl6:amd64 (72.1-1) ...
Removing libdaxctl1:amd64 (72.1-1) ...
Removing libfcgi-bin (2.4.2-2build2) ...
Removing libfcgi-perl:amd64 (0.82+ds-1build1) ...
Removing libfcgi0ldbl:amd64 (2.4.2-2build2) ...
Removing mariadb-client-core-10.6 (1:10.6.12-0ubuntu0.22.04.1) ...
Removing rsync (3.2.7-0ubuntu0.22.04.2) ...
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for libc-bin (2.35-0ubuntu3.6) ...
(Reading database ... 89469 files and directories currently installed.)
Purging configuration files for mariadb-server-10.6 (1:10.6.12-0ubuntu0.22.04.1) ...
Purging configuration files for mariadb-client-10.6 (1:10.6.12-0ubuntu0.22.04.1) ...
Purging configuration files for rsync (3.2.7-0ubuntu0.22.04.2) ...

Tried to install MariaDb again but not working.... I didn't deleted databases, they are still there:

MariaDB [(none)]> SHOW DATABASES;
+----------------------------+
| Database                   |
+----------------------------+
| buko_bukowski              |
| cara_caramel               |
| corn_corner                |
| cyberpanel                 |
| diab_diabet                |
| diab_dyqani                |
| eakt_apartments            |
| eakt_boho                  |
| eakt_eakteam               |
| eakt_networkmanager        |
| eakt_shehu                 |
| eval_evalhotel             |
| expe_advisor               |
| expe_events                |
| expe_experiencegjirokastra |
| expe_transportation        |
| gyro_gyrocastrum           |
| hote_hotelpanorama         |
| information_schema         |
| jugu_jugunews              |
| kayl_kaylasbeautysalon     |
| maildb                     |
| mailscanner                |
| mkezh_mkezh                |
| mysql                      |
| performance_schema         |
| subm_menu                  |
| subm_submarine105          |
| sys                        |
| vedra_main                 |
| vedra_realestate           |
| vedra_rentcar              |
+----------------------------+
32 rows in set (0.004 sec)

Ticket Number: https://platform.cyberpersons.com/support/C5A6F8EZU/

eakteam commented 5 months ago

i just run this command sudo apt install mariadb-server mariadb-client -y restarted the server and everything seems to work again...

Output:

root@eakteam ~ # sudo apt install mariadb-server mariadb-client -y
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  galera-4 libcgi-fast-perl libcgi-pm-perl libconfig-inifiles-perl libdaxctl1 libfcgi-bin libfcgi-perl libfcgi0ldbl libhtml-template-perl libndctl6 libpmem1
  mariadb-client-10.6 mariadb-client-core-10.6 mariadb-server-10.6 mariadb-server-core-10.6 rsync
Suggested packages:
  libipc-sharedcache-perl mariadb-test python3-braceexpand
The following NEW packages will be installed:
  galera-4 libcgi-fast-perl libcgi-pm-perl libconfig-inifiles-perl libdaxctl1 libfcgi-bin libfcgi-perl libfcgi0ldbl libhtml-template-perl libndctl6 libpmem1
  mariadb-client mariadb-client-10.6 mariadb-client-core-10.6 mariadb-server mariadb-server-10.6 mariadb-server-core-10.6 rsync
0 upgraded, 18 newly installed, 0 to remove and 0 not upgraded.
Need to get 448 kB/15.9 MB of archives.
After this operation, 153 MB of additional disk space will be used.
Get:1 http://mirror.hetzner.com/ubuntu/packages jammy-updates/main amd64 rsync amd64 3.2.7-0ubuntu0.22.04.2 [436 kB]
Get:2 http://mirror.hetzner.com/ubuntu/packages jammy-updates/universe amd64 mariadb-client all 1:10.6.12-0ubuntu0.22.04.1 [11.6 kB]
Fetched 448 kB in 0s (5,421 kB/s)
Preconfiguring packages ...
Can't exec "/tmp/mariadb-server-10.6.config.8ntRou": Permission denied at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 178.
open2: exec of /tmp/mariadb-server-10.6.config.8ntRou configure  failed: Permission denied at /usr/share/perl5/Debconf/ConfModule.pm line 59.
Selecting previously unselected package rsync.
(Reading database ... 89455 files and directories currently installed.)
Preparing to unpack .../00-rsync_3.2.7-0ubuntu0.22.04.2_amd64.deb ...
Unpacking rsync (3.2.7-0ubuntu0.22.04.2) ...
Selecting previously unselected package galera-4.
Preparing to unpack .../01-galera-4_26.4.9-1build1_amd64.deb ...
Unpacking galera-4 (26.4.9-1build1) ...
Selecting previously unselected package libconfig-inifiles-perl.
Preparing to unpack .../02-libconfig-inifiles-perl_3.000003-1_all.deb ...
Unpacking libconfig-inifiles-perl (3.000003-1) ...
Selecting previously unselected package mariadb-client-core-10.6.
Preparing to unpack .../03-mariadb-client-core-10.6_1%3a10.6.12-0ubuntu0.22.04.1_amd64.deb ...
Unpacking mariadb-client-core-10.6 (1:10.6.12-0ubuntu0.22.04.1) ...
Selecting previously unselected package mariadb-client-10.6.
Preparing to unpack .../04-mariadb-client-10.6_1%3a10.6.12-0ubuntu0.22.04.1_amd64.deb ...
Unpacking mariadb-client-10.6 (1:10.6.12-0ubuntu0.22.04.1) ...
Selecting previously unselected package libdaxctl1:amd64.
Preparing to unpack .../05-libdaxctl1_72.1-1_amd64.deb ...
Unpacking libdaxctl1:amd64 (72.1-1) ...
Selecting previously unselected package libndctl6:amd64.
Preparing to unpack .../06-libndctl6_72.1-1_amd64.deb ...
Unpacking libndctl6:amd64 (72.1-1) ...
Selecting previously unselected package libpmem1:amd64.
Preparing to unpack .../07-libpmem1_1.11.1-3build1_amd64.deb ...
Unpacking libpmem1:amd64 (1.11.1-3build1) ...
Selecting previously unselected package mariadb-server-core-10.6.
Preparing to unpack .../08-mariadb-server-core-10.6_1%3a10.6.12-0ubuntu0.22.04.1_amd64.deb ...
Unpacking mariadb-server-core-10.6 (1:10.6.12-0ubuntu0.22.04.1) ...
Selecting previously unselected package mariadb-server-10.6.
Preparing to unpack .../09-mariadb-server-10.6_1%3a10.6.12-0ubuntu0.22.04.1_amd64.deb ...
/var/lib/mysql: found previous version 10.6
Unpacking mariadb-server-10.6 (1:10.6.12-0ubuntu0.22.04.1) ...
Selecting previously unselected package libcgi-pm-perl.
Preparing to unpack .../10-libcgi-pm-perl_4.54-1_all.deb ...
Unpacking libcgi-pm-perl (4.54-1) ...
Selecting previously unselected package libfcgi0ldbl:amd64.
Preparing to unpack .../11-libfcgi0ldbl_2.4.2-2build2_amd64.deb ...
Unpacking libfcgi0ldbl:amd64 (2.4.2-2build2) ...
Selecting previously unselected package libfcgi-perl:amd64.
Preparing to unpack .../12-libfcgi-perl_0.82+ds-1build1_amd64.deb ...
Unpacking libfcgi-perl:amd64 (0.82+ds-1build1) ...
Selecting previously unselected package libcgi-fast-perl.
Preparing to unpack .../13-libcgi-fast-perl_1%3a2.15-1_all.deb ...
Unpacking libcgi-fast-perl (1:2.15-1) ...
Selecting previously unselected package libfcgi-bin.
Preparing to unpack .../14-libfcgi-bin_2.4.2-2build2_amd64.deb ...
Unpacking libfcgi-bin (2.4.2-2build2) ...
Selecting previously unselected package libhtml-template-perl.
Preparing to unpack .../15-libhtml-template-perl_2.97-1.1_all.deb ...
Unpacking libhtml-template-perl (2.97-1.1) ...
Selecting previously unselected package mariadb-client.
Preparing to unpack .../16-mariadb-client_1%3a10.6.12-0ubuntu0.22.04.1_all.deb ...
Unpacking mariadb-client (1:10.6.12-0ubuntu0.22.04.1) ...
Selecting previously unselected package mariadb-server.
Preparing to unpack .../17-mariadb-server_1%3a10.6.12-0ubuntu0.22.04.1_all.deb ...
Unpacking mariadb-server (1:10.6.12-0ubuntu0.22.04.1) ...
Setting up libconfig-inifiles-perl (3.000003-1) ...
Setting up galera-4 (26.4.9-1build1) ...
Setting up libfcgi0ldbl:amd64 (2.4.2-2build2) ...
Setting up libcgi-pm-perl (4.54-1) ...
Setting up libfcgi-bin (2.4.2-2build2) ...
Setting up libhtml-template-perl (2.97-1.1) ...
Setting up mariadb-client-core-10.6 (1:10.6.12-0ubuntu0.22.04.1) ...
Setting up libdaxctl1:amd64 (72.1-1) ...
Setting up libndctl6:amd64 (72.1-1) ...
Setting up libfcgi-perl:amd64 (0.82+ds-1build1) ...
Setting up libpmem1:amd64 (1.11.1-3build1) ...
Setting up mariadb-client-10.6 (1:10.6.12-0ubuntu0.22.04.1) ...
Setting up mariadb-server-core-10.6 (1:10.6.12-0ubuntu0.22.04.1) ...
Setting up rsync (3.2.7-0ubuntu0.22.04.2) ...
rsync.service is a disabled or a static unit, not starting it.
Setting up mariadb-client (1:10.6.12-0ubuntu0.22.04.1) ...
Setting up libcgi-fast-perl (1:2.15-1) ...
Setting up mariadb-server-10.6 (1:10.6.12-0ubuntu0.22.04.1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/mariadb.service → /lib/systemd/system/mariadb.service.
Setting up mariadb-server (1:10.6.12-0ubuntu0.22.04.1) ...
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for libc-bin (2.35-0ubuntu3.6) ...
Scanning processes...
Scanning candidates...
Scanning processor microcode...
Scanning linux images...

Running kernel seems to be up-to-date.

The processor microcode seems to be up-to-date.

Restarting services...
 systemctl restart spamassassin.service

No containers need to be restarted.

No user sessions are running outdated binaries.

No VM guests are running outdated hypervisor (qemu) binaries on this host

Is there something else i should do that maybe have been purged by mistake or everything is ok?

usmannasir commented 5 months ago

Looks like everything back to normal, avoid doing such things on Sundays :)

eakteam commented 5 months ago

Looks like everything back to normal, avoid doing such things on Sundays :)

Thank you for your help!