Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Then dump the content of users, sm_devices and sm_device_models SMDevices and SMDeviceModels tables:

Code Block
languagebash
mysqldump -u root -p --single-transaction sambackend users sm_devices sm_device_modelsSMDevices SMDeviceModels > dump.sql

You will then be prompter to enter the root password to access the database.

...

Code Block
docker cp database:dump.sql dump.sql

Change the table names

Some tables have been renamed when moving to the new version of the product. In particular SMDevices changed into sm_devices and SMDeviceModels changed into sm_device_models. The dump.sql file need to be updated to reflect that change. This can be done either manually using a proper file editor or with some Linux-style commands such as:

Code Block
languagebash
sed -i 's/SMDevices/sm_devices/g' dump.sql
sed -i 's/SMDeviceModels/sm_device_models/g' dump.sql

Loading the old database content into the new one

First push the file into the newer instance of the database container:

Code Block
languagebash
docker cp dump.sql database:dump.sql

Then load the content into the database:

Code Block
mysql -u root -p sambackend < dump.sql