!Friendica Support

First of all, sorry for my English, I use a translator.

I am using Friendica version 2024.12, database version is 1576/1576 and the post update version is 1550/1550.


I have changed my storage in Friendica from “Database” to “Filesystem”.

I have selected /var/friendica_storage as the path -> drwxr-xr-x 258 www-data www-data 4096 2 Mar 15:49 /var/friendica_storage

This setting was also applied:

sudo -u www-data bin/console storage list:
Sel | Name
-----------------------
* | Filesystem
| Database


Then I execute the following:

sudo -u www-data bin/console storage move
[2025-03-02 14:49:46] Moved 5000 files
[2025-03-02 14:49:50] Moved 5000 files
[2025-03-02 14:49:55] Moved 5000 files
[2025-03-02 14:49:59] Moved 5000 files
[2025-03-02 14:50:04] Moved 5000 files
[2025-03-02 14:50:08] Moved 5000 files
[2025-03-02 14:50:13] Moved 5000 files
[2025-03-02 14:50:18] Moved 5000 files
[2025-03-02 14:50:22] Moved 5000 files
[2025-03-02 14:50:27] Moved 5000 files
[2025-03-02 14:50:33] Moved 5000 files
[2025-03-02 14:50:38] Moved 5000 files
[2025-03-02 14:50:43] Moved 5000 files
[2025-03-02 14:50:49] Moved 5000 files
[2025-03-02 14:50:54] Moved 5000 files
[2025-03-02 14:50:59] Moved 5000 files
[2025-03-02 14:51:04] Moved 5000 files
[2025-03-02 14:51:10] Moved 5000 files
[2025-03-02 14:51:16] Moved 5000 files
[2025-03-02 14:51:22] Moved 5000 files
[2025-03-02 14:51:27] Moved 5000 files
[2025-03-02 14:51:32] Moved 5000 files
[2025-03-02 14:51:37] Moved 5000 files
[2025-03-02 14:51:44] Moved 5000 files
[2025-03-02 14:51:49] Moved 5000 files
[2025-03-02 14:51:54] Moved 5000 files
[2025-03-02 14:52:00] Moved 5000 files
[2025-03-02 14:52:02] Moved 2180 files
[2025-03-02 14:52:03] Moved 137180 files total
[Error] Friendica\Console\Storage::doExecute(): Return value must be of type int, null returned


It ends with this error message. But the files are present in the /var/friendica_storage folder.


The query in MariaDB shows that the images are still stored in the database:

MariaDB [xxxxxxxxxxxx]> SELECT COUNT(*) FROM photo WHERE data IS NOT NULL;
+----------+
| COUNT(*) |
+----------+
| 137228 |
+----------+
1 row in set (0,419 sec)

MariaDB [xxxxxxxxxxxx]> SELECT COUNT(*) FROM photo WHERE data IS NOT NULL;
+----------+
| COUNT(*) |
+----------+
| 137246 |
+----------+
1 row in set (0,39 sec)


But probably also in /var/friendica_storage, because this is getting bigger.

So the images are now saved simultaneously in the database AND in the /var/friendica_storage folder, including new images!


I have now tried this process twice and both times the error occurred. I restored my database backup.

What have I done wrong, what can I improve or change?


#Friendica, #Help

in reply to Michael 🇺🇦

@Michael Vogel Danke für die schnelle Antwort!

Dann schreibe ich mal in deutsch weiter, da kann ich mich besser ausdrücken. ;-)

Ist es denn normal, dass die Einträge weiterhin mehr werden, wenn ich

SELECT COUNT(*) FROM photo WHERE data IS NOT NULL;

ausführe?

Und diesen Fehler:

[Error] Friendica\Console\Storage::doExecute(): Return value must be of type int, null returned

kann ich den dann einfach ignorieren?

in reply to Michael 🇺🇦

@Michael Vogel Ah ok, dann hatte ich tatsächlich in der falschen Tabelle geschaut, kein Wunder. 😅🙈

Ich habe das jetzt noch mal durchlaufen lassen, mit dem Ergebnis:

Die Datenbank insgesamt war zuvor 3547,86 MB, jetzt 698,61MB.
Die Storage-Tabelle war vorher 2895,75MB, jetzt 14,02MB.
In der Storage-Tabelle waren zuvor 137492 Einträge, jetzt 36.

Dann hat das wohl geklappt, würde ich sagen.

Vielen Dank für die schnelle Antwort und Hilfe! 👍

in reply to Michael 🇺🇦

@Michael 🇺🇦 @Jools

Hi, I have a question
Why sudo -u www-data bin/console storage move it was used? When I installed and configured #friendica on my server , i changed the storage to filesystem , what i did i created the storage folder (out of the friendica folder) , after sudo chown -R www-data:www-data /var/www/storage in Storage Administration Filesystem I entered the path and it is saved /var/www/friendicastorage

I missed something? what i did is correct?

Cheers