nuxsmin / sysPass

Systems Password Manager
https://syspass.org
GNU General Public License v3.0
974 stars 208 forks source link

Backup - Restore procedure (BMR Plan) #233

Closed akurzawa closed 5 years ago

akurzawa commented 8 years ago

Hello

I can't import sql database to new server - I've exported sql database from syspass, and entire syspass database from phpmyadmin - now I'm trying to import it on another server (reinstalled debian server) and database exported by phpmyadmin wont import

Whats the procedure to backup syspass database, reinstall server and services and import database? aka BMR plan ? I've got two .sql backups - one from syspass (about 46KB) and from phpmyadmin (size about 466KB); I can import database exported by syspass admin page but it is incomplete ? (only 46KB) ; dababase exported by syspass (460KB) cannot be directly imported in phpmyadmin.


Error SQL Statement: Baza danych:syspass`

Strcture of table accFiles

CREATE TABLE IF NOT EXISTS accFiles ( accfile_id int(11) NOT NULL, accfile_accountId smallint(5) unsigned NOT NULL, accfile_name varchar(100) NOT NULL, accfile_type varchar(100) NOT NULL, accfile_size int(11) NOT NULL, accfile_content mediumblob NOT NULL, accfile_extension varchar(10) NOT NULL, accFile_thumb longblob ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

MySQL returned error: Documentation

1046 - No database selected `

nuxsmin commented 8 years ago

Hi,

The database export can be imported either mysqldump or any gui tool (phpmyadmin, mysql workbench, etc).

The export file does not contain the command to select the destination database because you probably would need to import by changing its name, so the procedure would be:

Hope it works

vmario89 commented 5 years ago

I think this belongs to https://github.com/nuxsmin/sysPass/issues/148