Docker with persistent settings problems

I’m looking to make a docker of the server side of urbackup and have persistent settings, i can make a docker that keeps the databases and settings internal to the image.
However this is not ideal as any update or edit to the image destroys the settings, but if i try to have a volume with the databases on storage outside the image i get these errors.

/usr/bin/docker logs --tail=350 -f UrBackup 2>&1
2015-04-05 15:52:42: ERROR: Error preparing Query [SELECT tvalue FROM misc WHERE tkey=‘db_version’]: no such table: misc
2015-04-05 15:52:42: ERROR: Error preparing Query [SELECT tvalue FROM misc WHERE tkey=‘db_version’]: no such table: misc
2015-04-05 15:52:42: ERROR: Error preparing Query [CREATE INDEX IF NOT EXISTS files_idx ON files (shahash, filesize, clientid)]: no such table: main.files
2015-04-05 15:52:42: ERROR: Error preparing Query [CREATE INDEX IF NOT EXISTS files_did_count ON files (did_count)]: no such table: main.files
2015-04-05 15:52:42: ERROR: Error preparing Query [CREATE INDEX IF NOT EXISTS files_backupid ON files (backupid)]: no such table: main.files
2015-04-05 15:52:42: ERROR: Error preparing Query [SELECT value FROM settings_db.settings WHERE key=? AND clientid=0]: no such table: settings_db.settings
2015-04-05 15:52:42: ERROR: Error preparing Query [UPDATE misc SET tvalue=? WHERE tkey=‘files_cache’]: no such table: misc
2015-04-05 15:52:42: ERROR: Error preparing Query [SELECT linkname, linktarget FROM directory_link_journal]: no such table: directory_link_journal
2015-04-05 15:52:54: ERROR: Error preparing Query [SELECT tvalue FROM misc WHERE tkey=‘db_version’]: no such table: misc
2015-04-05 15:52:54: ERROR: Error preparing Query [SELECT tvalue FROM misc WHERE tkey=‘db_version’]: no such table: misc
2015-04-05 15:52:54: ERROR: Error preparing Query [CREATE INDEX IF NOT EXISTS files_idx ON files (shahash, filesize, clientid)]: no such table: main.files
2015-04-05 15:52:54: ERROR: Error preparing Query [CREATE INDEX IF NOT EXISTS files_did_count ON files (did_count)]: no such table: main.files
2015-04-05 15:52:54: ERROR: Error preparing Query [CREATE INDEX IF NOT EXISTS files_backupid ON files (backupid)]: no such table: main.files
2015-04-05 15:52:54: ERROR: Error preparing Query [SELECT value FROM settings_db.settings WHERE key=? AND clientid=0]: no such table: settings_db.settings
2015-04-05 15:52:54: ERROR: Error preparing Query [UPDATE misc SET tvalue=? WHERE tkey=‘files_cache’]: no such table: misc
2015-04-05 15:52:54: ERROR: Error preparing Query [SELECT linkname, linktarget FROM directory_link_journal]: no such table: directory_link_journal

is there a remedy for this or a command line setting to combat this ?

Thanks for any assistance

I believe urbackup uses a file ‘database’ type approach like sqlite which would make this problematic. To support docker as I understand it, urbackup would really need to support a bona-fide mysql instance or similar which I don’t believe is the case at this time.

This is the same situation you have if you use postgres in docker. You need to save the database files persistently.

You probably need to copy either backup_server.db.template or backup_server_init.sql into that folder in order for UrBackup to be able to initialize the database. I’ll see if this can be made unnecessary in a future version.