Skip to main content


I want to move all attachments and phots ot the database, but it doesn't work.

I do:

bin/console storage move

And then I just get a fault:

Database storage failed to insert data

What is wrong, how can I find out?

!Friendica Support #Friendica

@utzer i have no idea, but "photos to the database" sounds unusual to me.. links or photos' filenames..ok... but the photos themselves (?) are you sure?
@xy@libranet.de yes I am sure, it is the standard storage for all data in Friendica, some years ago I moved all from the database to the filesystem and I want to reverse it as the backup is much easier and probably faster I would guess. Also I want to try it. If the move works I can reverse it any time.
@utzer ok thanks. i am reading it... another quick idea: maybe some target is missing in your command? like "storage move target" (just guessing)
@xy@libranet.de good idea, but no.
bin/console help storage move

console storage - manage storage backend and stored data
Synopsis
    bin/console storage [-h|--help|-?] [-v]
        Show this help
    
    bin/console storage list
        List available storage backends
    
    bin/console storage set <name>
        Set current storage backend
            name        storage backend to use. see "list".
    
    bin/console storage move [table] [-n 5000]
        Move stored data to current storage backend.
            table       one of "photo" or "attach". default to both
            -n          limit of processed entry batch size
@utzer ok ..maybe define the "current storage backend" somewhere else. maybe in a config file.. or 'admin area'.. don't know
@xy@libranet.de it is defined.
bin/console storage list    
 Sel | Name                
-----------------------
     | Filesystem          
 *   | Database
@utzer oh maybe the help has the solution? bin/console storage set <name> .. oh, i see, it is defined
This entry was edited (3 years ago)
@utzer .. maybe have a look in the logfiles. (maybe for "Failed to insert data")

@xy@libranet.de yes, maybe, was hoping for some specific thing to grep for in the tail of the log. 😉

I think I should open an issue... Lazy me. 😒