Hello,
During my attempt to update Debian 12 to 13 on my WAPT server, I messed up the database update and the cluster disappeared...
I do have the database dump, but I can't find the information in the documentation to recreate it (name, permissions, etc.).
Is this information available somewhere?
Thanks in advance.
[RESOLVED] Restores database
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
- dcardon
- WAPT Expert
- Messages: 2027
- Registration: June 18, 2014 - 09:58
- Location: Saint Sébastien sur Loire
- Contact :
Hi Peyo,
You can draw inspiration from the documentation https://www.wapt.fr/en/doc-2.7/wapt-ser ... html#linux
As mentioned, you need to verify that you are indeed using en_US.utf8 locale (this should be the case if you have correctly followed the initial installation documentation).
Something like the following should do the trick:
Sincerely,
Denis
You can draw inspiration from the documentation https://www.wapt.fr/en/doc-2.7/wapt-ser ... html#linux
As mentioned, you need to verify that you are indeed using en_US.utf8 locale (this should be the case if you have correctly followed the initial installation documentation).
Something like the following should do the trick:
Code: Select all
cd /tmp
sudo -u postgres psql -c "drop database wapt"
sudo -u postgres psql -c "create database wapt with owner=wapt encoding='utf-8'"
sudo -u postgres psql < /tmp/backup_wapt.sql
Sincerely,
Denis
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
THANKS,
But now I'm running into another problem.
It appears that the PostgreSQL service is no longer running
Postgres has been successfully updated to version 17
When I try to restart the service, it exits immediately, but I don't see any error (and can't find any logs providing more details)
I don't know what to do now...
But now I'm running into another problem.
It appears that the PostgreSQL service is no longer running
Code: Select all
urrugne@URR-DEB-WAPT:~$ sudo -u postgres psql -c "drop database wapt"
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
Is the server running locally and accepting connections on that socket?
urrugne@URR-DEB-WAPT:~$
Code: Select all
urrugne@URR-DEB-WAPT:~$ apt list --installed | grep postgresql
postgresql-17/stable,stable-security,now 17.11-0+deb13u1 amd64 [installed,automatic]
postgresql-client-17/stable,stable-security,now 17.11-0+deb13u1 amd64 [installed,automatic]
postgresql-client-common/stable,now 278 all [installed,automatic]
postgresql-common-dev/stable,now 278 all [installed,automatic]
postgresql-common/stable,now 278 all [installed,automatic]
postgresql/stable,now 17+278 all [installed]
urrugne@URR-DEB-WAPT:~$
Code: Select all
urrugne@URR-DEB-WAPT:~$ ps -ef | grep sql
urrugne 2349 1038 0 10:41 pts/0 00:00:00 grep sql
urrugne@URR-DEB-WAPT:~$ sudo systemctl restart postgresql
urrugne@URR-DEB-WAPT:~$ sudo systemctl status postgresql
● postgresql.service - PostgreSQL RDBMS
Loaded: loaded (/usr/lib/systemd/system/postgresql.service; enabled; preset: enabled)
Active: active (exited) since Thu 2026-10-08 10:41:36 CEST; 2s ago
Invocation: 5deec630581644f7956fffef07df2e66
Process: 2355 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
Main PID: 2355 (code=exited, status=0/SUCCESS)
Mem peak: 1.7M
CPU: 8ms
Oct 08 10:41:36 URR-DEB-WAPT.ville-urrugne.fr systemd[1]: Starting postgresql.service - PostgreSQL RDBMS...
Oct 08 10:41:36 URR-DEB-WAPT.ville-urrugne.fr systemd[1]: Finished postgresql.service - PostgreSQL RDBMS.
urrugne@URR-DEB-WAPT:~$
- dcardon
- WAPT Expert
- Messages: 2027
- Registration: June 18, 2014 - 09:58
- Location: Saint Sébastien sur Loire
- Contact :
Hi Peyo,
You do indeed need to reset the Postgres cluster beforehand. Performing a complete purge and reinstalling the Postgres server should re-instantiate it.
The only thing you need to be careful about is putting it in the right locale (having a bad locale isn't a deal-breaker, but it can cause some problems later on, especially if the instantiation was done with LANG=C).
Sincerely,
Denis
You do indeed need to reset the Postgres cluster beforehand. Performing a complete purge and reinstalling the Postgres server should re-instantiate it.
The only thing you need to be careful about is putting it in the right locale (having a bad locale isn't a deal-breaker, but it can cause some problems later on, especially if the instantiation was done with LANG=C).
Code: Select all
pg_createcluster 17 main --locale en_US.utf8
systemctl start postgresqlDenis
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
Thanks,
I had to recreate the wapt user too, but it's all good now, I was able to recreate the database.
However, something strange happened: after restarting the server, when I relaunched the WAPT console on my PC, the inventory was empty.
Now my workstations are gradually appearing in the inventory.
Okay, now that the OS is updated, I need to upgrade the Wapt server to version 2.7.
I had to recreate the wapt user too, but it's all good now, I was able to recreate the database.
However, something strange happened: after restarting the server, when I relaunched the WAPT console on my PC, the inventory was empty.
Now my workstations are gradually appearing in the inventory.
Okay, now that the OS is updated, I need to upgrade the Wapt server to version 2.7.
- dcardon
- WAPT Expert
- Messages: 2027
- Registration: June 18, 2014 - 09:58
- Location: Saint Sébastien sur Loire
- Contact :
Hi Peyo,
you should check the SQL dump. Is there data in the hosts table or not? Inventory data is stored there. That said, the machine data will still be retrieved, as you can see. However, the audit history isn't included, and you'll have to wait for it to be retrieved.
To ensure you have at least the latest audit value on the server, you can force an inventory from the console.
Best regards,
Denis
you should check the SQL dump. Is there data in the hosts table or not? Inventory data is stored there. That said, the machine data will still be retrieved, as you can see. However, the audit history isn't included, and you'll have to wait for it to be retrieved.
To ensure you have at least the latest audit value on the server, you can force an inventory from the console.
Best regards,
Denis
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
Thanks,
I did a bit of digging in the dump, but apart from the table creation, I didn't find anything.
But then again, I don't know the structure of a dump and can't recognize the format of an insert; these aren't simple INSERT commands, it seems.
Two-thirds of the PCs are already back online; I trust the server to find everything as it goes.
We can say the problem is solved.
I did a bit of digging in the dump, but apart from the table creation, I didn't find anything.
But then again, I don't know the structure of a dump and can't recognize the format of an insert; these aren't simple INSERT commands, it seems.
Two-thirds of the PCs are already back online; I trust the server to find everything as it goes.
We can say the problem is solved.
