Décidément
Donc tout doit appartenir et être fait par l'utilisateur postgres chown -R postgres /var/lib/postgresql/9.6/main chmod -R o-rwx /var/lib/postgresql/9.6/main Une fois toute l'info rassemblée la doc sera complète :-) D. Le 28/05/20 à 15:57, maxime a écrit : > Bonjour > > > Le lancement manuel de la 9.6 ne semble pas fonctionner ... > > postgres@mardi:~$ /usr/lib/postgresql/9.6/bin/pg_ctl start > --pgdata /var/lib/postgresql/9.6/main/ -o "--port=4000" > serveur en cours de démarrage > postgres@mardi:~$ 2020-05-28 15:51:19.955 CEST [12218] FATAL: le > répertoire des données « /var/lib/postgresql/9.6/main » a un > mauvais propriétaire > 2020-05-28 15:51:19.955 CEST [12218] ASTUCE : Le serveur doit > être en cours d'exécution par l'utilisateur qui possède le > répertoire des données. > psql ls -l /var/lib/postgresql/9.6/main/ > total 112 > drwxrwxrwx 11 root root 4096 juin 20 2019 base > drwxrwxrwx 2 root root 4096 avril 2 08:50 global > drwxrwxrwx 2 root root 4096 avril 18 2019 pg_clog > drwxrwxrwx 2 root root 4096 avril 18 2019 pg_commit_ts > drwxrwxrwx 2 root root 4096 avril 18 2019 pg_dynshmem > -rw-r----- 1 root root 4643 mai 28 15:48 pg_hba.conf > drwxrwxrwx 4 root root 4096 avril 18 2019 pg_logical > drwxrwxrwx 4 root root 4096 avril 18 2019 pg_multixact > drwxrwxrwx 2 root root 4096 avril 2 08:49 pg_notify > drwxrwxrwx 2 root root 4096 avril 18 2019 pg_replslot > drwxrwxrwx 2 root root 4096 avril 18 2019 pg_serial > drwxrwxrwx 2 root root 4096 avril 18 2019 pg_snapshots > drwxrwxrwx 2 root root 4096 avril 2 17:13 pg_stat > drwxrwxrwx 2 root root 4096 avril 18 2019 pg_stat_tmp > drwxrwxrwx 2 root root 4096 avril 18 2019 pg_subtrans > drwxrwxrwx 2 root root 4096 avril 18 2019 pg_tblspc > drwxrwxrwx 2 root root 4096 avril 18 2019 pg_twophase > -rwxrwxrwx 1 root root 4 avril 18 2019 PG_VERSION > drwxrwxrwx 3 root root 4096 mai 16 2019 pg_xlog > -rwxrwxrwx 1 root root 88 avril 18 2019 postgresql.auto.conf > -rw-r--r-- 1 root root 22718 mai 28 15:48 postgresql.conf > -rwxrwxrwx 1 root root 133 avril 2 08:49 postmaster.opts > > Ce qui doit être dû au moment où je remplace le dossier 9.6/main/ de > la nouvelle installation avec les données du dossier historique (vu > que je le fait depuis sudo caja). > > J'ai essayé de chmod et chown ce dossier depuis sudo -i -u postgres > mais apparement je n'ai pas les droits... et sudo chmod ... depuis > postgres@...:~$ ne me demande pas le même mot de passe que > l'utilisateur de base (logique). > > Je continue de chercher ... ! > > > Maxime > > > > On 28/05/2020 14:28, Dany De Bontridder via noalyss-generale wrote: >> >> Bonjour >> >> >> >> Le 28/05/20 à 13:46, maxime a écrit : >>> Bonjour, >>> >>> Merci pour ce début de solution, mes essais (pour l'instant toujours >>> infructueux) dans le corps du message(...) >>> J'ai essayé et voici le résultat : >>> postgres@mardi:~$ /usr/lib/postgresql/9.6/bin/pg_ctl start --pgdata >>> /var/lib/postgresql/9.6/main/ -o "--port=4000" >>> serveur en cours de démarrage >>> postgres@mardi:~$ postgres : n'a pas pu accéder au fichier de >>> configuration « /var/lib/postgresql/9.6/main/postgresql.conf » : >>> Aucun fichier ou dossier de ce type >>> /NB/ Je n'ai effectivement pas de fichier postfresql.conf dans le >>> dossier historique /var/lib/postgresql/9.6/main/, j'ai tout au plus >>> un fichier postgresql.auto.conf/ >> >> Copier dans le répertoire les 2 fichiers donnés ci-dessous >> >> >>> (...) >>>> _Posgresql.conf minimum_ >>>> listen_addresses = 'localhost' # what IP address(es) to >>>> listen on; >>>> port = 4000 # (change requires restart) >>>> >>>> >>>> _pg_hba.conf min_ >>>> local all all peer >>>> host all all 127.0.0.1/32 trust >> (...) >>>> >>>> Avec la nouvelle version de postgresl faire >>>> >>>> /usr/lib/postgresql/10/bin/pg_dumpall > /tmp/full-backup.dmp >>> >>> ... du coup, j'arrive à lancer la suite >>> /usr/lib/postgresql/12/bin/pg_dumpall > full-backup.dmp >>> pg_dump: attention : WITH OIDS n'est plus supporté (table « action ») >>> >>> (....) >>> >>> postgres@mardi:~$ /usr/lib/postgresql/9.6/bin/pg_ctl stop --pgdata >>> /var/lib/postgresql/9.6/main/ -o "--port=4000" >>> pg_ctl : le fichier de PID « >>> /var/lib/postgresql/9.6/main/postmaster.pid » n'existe pas >>> Le serveur est-il en cours d'exécution ? >>> postgres@mardi:~$ >>> >>> Ce qui me fait un fichier full-backup de 775Ko, ce qui je pense >>> n'est pas ma base de donnée (qui n'est pas grosse, mais quand même :) >> >> Oui ces tables sont un problème, heureusement il y a une solution , à >> partir de la version 12 , on ne peut plus utiliser "with oids" qui >> était le défaut jusque là :-/ >> >> Il va falloir faire un script pour les modifier , quand la 9.6 >> tourne, se connecter et faire pour *chaque *base de données , en tant >> que postgres >> >> psql db1 >> >> \o /tmp/x.sql >> >> select 'alter table '||nsp.nspname ||'.'|| tbl.relname ||' without >> oids;' >> from pg_namespace nsp >> join pg_class tbl on nsp.oid = tbl.relnamespace >> where tbl.relhasoids='t' and nsp.nspname <> 'pg_catalog'; >> >> \o >> >> \i /tmp/x.sql >> >> Puis faire le pg_dumpall :-) >> >> >> D. >> >> >> >> >> >> >> >> psql >> >> >> >> >> >> >> >> (...) >> -- >> gpg key 0x6259f36e >> >> Alchimerys sprl http://www.alchimerys.be >> Noalyss , serveur de comptabilité libre ,http://www.noalyss.eu >> >> --- >> NOALYSS est un Serveur de Comptabilité et de Gestion libre >> >> NOALYSS is an ERP Server opensource focused on accountancy >> >> Gérer votre abonnement >> https://lists.nongnu.org/mailman/listinfo/noalyss-generale > > > --- > NOALYSS est un Serveur de Comptabilité et de Gestion libre > > NOALYSS is an ERP Server opensource focused on accountancy > > Gérer votre abonnement > https://lists.nongnu.org/mailman/listinfo/noalyss-generale -- gpg key 0x6259f36e Alchimerys sprl http://www.alchimerys.be Noalyss , serveur de comptabilité libre ,http://www.noalyss.eu
--- NOALYSS est un Serveur de Comptabilité et de Gestion libre NOALYSS is an ERP Server opensource focused on accountancy Gérer votre abonnement https://lists.nongnu.org/mailman/listinfo/noalyss-generale
