simatec / piler-docker

Mailpiler for Docker
MIT License
32 stars 12 forks source link

Update Piler 1.4.1 #1

Closed mac-linux-free closed 1 year ago

mac-linux-free commented 1 year ago

Hello,

could you please update to 1.4.1?

Thankyou :)

simatec commented 1 year ago

done ... can you test please?

mac-linux-free commented 1 year ago

I did docker-compose pull but no new image was pulled.

mac-linux-free commented 1 year ago

Then I updated the version number of the piler container and pulled and started but the config broke. Is there an upgrade path?

Thank you.

simatec commented 1 year ago

you can simple Upgrade with compose.

docker-compose up --force-recreate --build -d docker image prune -f

mac-linux-free commented 1 year ago

But after that the website is not comming up again. Luckily I had a snapshot of the VM. How could I upgrade just Piler in the container? I also made an custom Logo and stuff.

simatec commented 1 year ago

Please restore the snapshot and then perform the upgrade

mac-linux-free commented 1 year ago

I did it now. But still the old 1.3.12 build is starting. Should I do git pull or diff?

simatec commented 1 year ago

change the Version in docker-compose.yml

mac-linux-free commented 1 year ago

piler container is restarting ervery 4 seconds

piler | sed: can't read /etc/piler/manticore.conf: No such file or directory piler | sed: can't read /etc/piler/manticore.conf: No such file or directory piler | sed: can't read /etc/piler/manticore.conf: No such file or directory piler | sed: can't read /etc/piler/manticore.conf: No such file or directory

mac-linux-free commented 1 year ago

can I do something or go back to my snapshot?

simatec commented 1 year ago

i will test it right away

simatec commented 1 year ago

1.4.1 have a Bug an i open a Issue on Piler

mac-linux-free commented 1 year ago

same error with 1.4.2

simatec commented 1 year ago

And 1.3.12 or 1.3.11?

mac-linux-free commented 1 year ago

1.3.12 runs because it is live

mac-linux-free commented 1 year ago

should i try a new setup?

simatec commented 1 year ago

I'll wait for the Mailpiler issue https://bitbucket.org/jsuto/piler/issues/1259/docker-v141-not-running

simatec commented 1 year ago

The new Version from 1.4.2 is runnig. Please Test it

mac-linux-free commented 1 year ago

Sadly not it is still restarting...is there a new version from 1.4.2 ?

simatec commented 1 year ago

Yes there is a new version. Delete the old container first and pull to the new 1.4.2.

Unfortunately, the latest version of the piler is not up-to-date and should not be used.

mac-linux-free commented 1 year ago

But that is bad is my config and the data deleted also?

simatec commented 1 year ago
Bildschirmfoto 2022-12-16 um 23 03 27
mac-linux-free commented 1 year ago

hmm...dann probiere ich das mal

simatec commented 1 year ago

Hat dein Update nun funktioniert?

mac-linux-free commented 1 year ago

sed: can't read /etc/piler/manticore.conf: No such file or directory sed: can't read /etc/piler/manticore.conf: No such file or directory sed: can't read /etc/piler/manticore.conf: No such file or directory sed: can't read /etc/piler/manticore.conf: No such file or directory sed: can't read /etc/piler/manticore.conf: No such file or directory sed: can't read /etc/piler/manticore.conf: No such file or directory sed: can't read /etc/piler/manticore.conf: No such file or directory

immernoch gleicher fehler...auf einem neuen docker host ohne daten klappt es..nur das update nicht

mac-linux-free commented 1 year ago

klar könnte ich die neue maschine hochziehen und dann die alten daten exportieren und im neuen wieder importieren.

mac-linux-free commented 1 year ago

habe es gerade an einem 2ten piler probiert...genau der gleiche fehler....also heißt für mich das update mit daten ist nicht machbar

simatec commented 1 year ago

Ich werde dazu ein Issue bei Piler aufmachen. Das Problem scheint ja beim Piler Container zu liegen. Von welcher Version versuchst du auf 1.4.2 hochzuziehen?

simatec commented 1 year ago

https://bitbucket.org/jsuto/piler/issues/1261/docker-update-from-13x-not-possible

mac-linux-free commented 1 year ago

Ich werde dazu ein Issue bei Piler aufmachen. Das Problem scheint ja beim Piler Container zu liegen. Von welcher Version versuchst du auf 1.4.2 hochzuziehen?

Danke Dir...von 1.3.12 das seit 1 Jahr läuft.

simatec commented 1 year ago

Zum besseren testen habe ich mal ein Updatemöglichkeit eingebaut.

https://github.com/simatec/piler-docker#update-guide

simatec commented 1 year ago

So wie ich jetzt die Info vom Entwickler habe, ist wohl ein reines Container Upgrade von 1.3.x auf 1.4.x nicht möglich. Hier wurde Index von sphinx auf manticore umgestellt, was zu Problemen führt.

Man müsste also die 1.4.2 neu aufsetzen und die Daten importieren. Hier wäre sicher sinnvoller gewesen einen Major Versionssprung zu machen und auch ein Hinweis darauf

mac-linux-free commented 1 year ago

ich bleibe erstmal bei 1.3.12....ist ja quasi produktiv...habe aber gesehen, das janos noch ein paar sachen geschrieben hat hat.

simatec commented 1 year ago

Ja ich versuche morgen mal ein paar Dinge noch in die Update bash einzubauen.. Heute mag ich kein Piler Server mehr aufsetzen

simatec commented 1 year ago

So ich habe jetzt nochmal ein wenig getestet. Mache mal bitte folgendes. Am besten aber vorher ein Snapshot oder Backup machen.

cd /opt/piler-docker docker-compose down curl -OL https://raw.githubusercontent.com/simatec/piler-docker/main/update.sh

Jetzt müssen 2 Volumes gelöscht werden. Solltest du dort etwas händisch geändert haben, dann sichere dir die vorher weg. Z.B. die piler.conf oder auch andere.

docker volume rm piler-docker_piler_etc docker volume rm piler-docker_piler_var

Im Anschluss nun die update.sh ausführen

bash update.sh

Falls du jetzt noch deine händischen Anpassungen wieder zurückkopierst, musst du danach den Container nochmal starten.

docker-compose restart piler

mac-linux-free commented 1 year ago

Hey, danke für die ausführliche Anleitung...nur, wenn ich das var_Volume lösche, sind alle meine archivierten Mails weg.

mac-linux-free commented 1 year ago

Ich denke, die einzige Lösung ist Export und Import oder ich kann piler im container via src updaten.

simatec commented 1 year ago

Daum schrieb ich ja, alles vorher aus den Volumes sichern, was wichtig ist. Kannst du mir mal deinen Inhalt vom var zeigen? Problem ist, dass die 1.4.2 bei einem vorhandenen Volume die neuen benötigten Dateien nicht anlegt und auch alte Dateien, nicht aktualisiert

mac-linux-free commented 1 year ago

der Inhalt vom var ist der komplette Piler store...d.h. bei mir 80000 Dateien...danach muss ich doch sicher alles neu indizieren.

simatec commented 1 year ago

Ja indizieren musst du durch die Umstellung von Sphinx auf Manticore definitiv

simatec commented 1 year ago

Wie würdest du am sinnvollsten exportieren und importieren?

mac-linux-free commented 1 year ago

Wohl einfach im contaier pilerexport -A. Das Problem dabei ist, wenn jemand schon viele Daten/Mails hat wird durch den Export die Deduplizierung aufgehoben und das Export-Verzeichnis wächst auf der 3-4-8 fache. Bei mir jetzt kein Thema ich habe genug Storage, nur bei größeren Installationen könnte das ggf. zum Problem werden. Jedenfalls ändere ich nichts mehr dieses Jahr...Danke Dir für Deine Mühen.

simatec commented 1 year ago

So habe mir das noch einmal angeschaut. Piler ist da leider in Version 1.4.2 nicht wirklich sinnvoll gebaut für Docker. Wenn das Volume bereits existiert, zieht er sich da logischerweise die Daten. Hier wird der nginx auf die Nase fallen, da sich in Verzeichnis www einiges geändert hat.

Als sprich ein Update von 1.3.x auf 1.4x muss zwingend die beiden Volumes neu erstellen. Alles was wie z.B. der store ist, muss vorher gesichert werden.

Aktuell sehe ich da leider nur diesen weg oder halt ein pilerexport -A

mac-linux-free commented 1 year ago

Ok danke nochmal. pilerexport ind import ist nicht das Thema. Nur wenn ich z.b. schon viele User und Gruppen angelegt habe. Wie kann ich diese Daten behalten?

simatec commented 1 year ago

So ich habe jetzt eine Lösung gefunden. Diese hat bei mir so funktioniert und lief problemlos beim Update durch. Hier mal die Befehle, die du gerne testen kannst.

cd /opt/piler-docker docker-compose down

curl -OL https://raw.githubusercontent.com/simatec/piler-docker/main/update.sh

rm -rf /var/lib/docker/volumes/piler-docker_piler_var/_data/www mkdir -p /var/lib/docker/volumes/piler-docker_piler_var/_data/manticore chown 1000:1000 /var/lib/docker/volumes/piler-docker_piler_var/_data/manticore

docker volume rm piler-docker_piler_etc

bash update.sh

Falls du im etc Volume manuelle Anpassungen gemacht hast, musst du diese im Anschluss halt wieder einfügen.

mac-linux-free commented 1 year ago

Hallo und ein gutes neues Jahr.

Ich habe das Update noch nicht durchgeführt aber einen neuen piler installiert und leider klappt die Anmeldung nicht. Also das Anmeldefenster ist da, nur nach der Anmeldung kommt ein HTTP ERROR 500.

simatec commented 1 year ago

Hast du mit Nginx installiert oder ohne?

mac-linux-free commented 1 year ago

Das war mein erster Gedanke... aber auch ohne kommt dieselbe Meldung.

simatec commented 1 year ago

Domain richtig eingetragen?

mac-linux-free commented 1 year ago

ja..selbst mit der IP klappt es ja nicht