Migrate to Xibo for Docker 2.0.2

I want to migrate the database from Xibo 1.8.2 to Xibo for Docker 2.0.2
When I want to only migrate the database I get the error: The theme “MyTheme” does not exist.
So when I try to migrate with the theme I get the error: The CMS is temporarily off-line as an upgrade is in progress. Please check with your system administrator for updates or refresh your page in a few minutes.
Can someone help me with this issue?

PS: php vendor/bin/phinx phinx.php migrate didn’t work

i’m deploy Xibo with docker. when i migrate from v1.8.x to v2.0.x me ./shared folder from v1.8.x folder to folder v2.0.x (folder include docker-compose.yml xibo v2.0.x) and deploy using docker-compose up -d and monitor logs docker-compose logs -f to see deploying if don’t have error migrate to v2.0.x is success

this is work for me and don’t have any problem

maybe help!

I think there is no shared folder in the old 1.8 version, because I try to migrate from the old database which is not running on Docker and so I think there is no shared folder which I can use for the migration.

So before the compose command I created the Shared folder beforehand with the included folders I need. Someone having the same experience??

There’s a guide which explains how to upgrade and swap to Docker.

https://xibo.org.uk/docs/setup/upgrade-and-switch-to-xibo-for-docker-install

The only difference in your case will be that you’ll need to put a copy of your theme in to the shared/cms/web/theme/custom folder. If it’s called mytheme, then the files need to be in shared/cms/web/theme/custom/mytheme

Once you have those files there, the CMS will be able to find the theme and the import should work as expected.

Thanks for the reply

That is exactly what I tried but I still get the error: “The CMS is temporarily off-line as an upgrade is in progress. Please check with your system administrator for updates or refresh your page in a few minutes.”

That means that the database migrations are either running currently, or have failed for some reason.

If you get the logs from the cms-web container they will tell you what’s going on.

docker-compose logs cms-web

I’ll try it next time

This is what I get when I use the command docker-compose logs cms-web

Attaching to xibo_cms-web_1
cms-web_1 | Waiting for MySQL to start - max 300 seconds
cms-web_1 | MySQL started
cms-web_1 | Updating settings.php
cms-web_1 | Attempting to import database
cms-web_1 | Importing Database
cms-web_1 | ERROR 1050 (42S01) at line 31 in file: ‘/var/www/backup/import.sql’: Table ‘auditlog’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 9626 in file: ‘/var/www/backup/import.sql’: Table ‘bandwidth’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 10947 in file: ‘/var/www/backup/import.sql’: Table ‘bandwidthtype’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 10975 in file: ‘/var/www/backup/import.sql’: Table ‘blacklist’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 10991 in file: ‘/var/www/backup/import.sql’: Table ‘campaign’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 11133 in file: ‘/var/www/backup/import.sql’: Table ‘command’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 11147 in file: ‘/var/www/backup/import.sql’: Table ‘dataset’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 11187 in file: ‘/var/www/backup/import.sql’: Table ‘datasetcolumn’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 11226 in file: ‘/var/www/backup/import.sql’: Table ‘datasetcolumntype’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 11246 in file: ‘/var/www/backup/import.sql’: Table ‘datasetrss’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 11266 in file: ‘/var/www/backup/import.sql’: Table ‘dataset_1’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 11288 in file: ‘/var/www/backup/import.sql’: Table ‘dataset_2’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 11340 in file: ‘/var/www/backup/import.sql’: Table ‘datatype’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 11362 in file: ‘/var/www/backup/import.sql’: Table ‘daypart’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 11399 in file: ‘/var/www/backup/import.sql’: Table ‘display’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 11467 in file: ‘/var/www/backup/import.sql’: Table ‘displayevent’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 11770 in file: ‘/var/www/backup/import.sql’: Table ‘displaygroup’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 11810 in file: ‘/var/www/backup/import.sql’: Table ‘displayprofile’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 11839 in file: ‘/var/www/backup/import.sql’: Table ‘group’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 11873 in file: ‘/var/www/backup/import.sql’: Table ‘help’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 11973 in file: ‘/var/www/backup/import.sql’: Table ‘layout’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 12124 in file: ‘/var/www/backup/import.sql’: Table ‘lkcampaignlayout’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 12295 in file: ‘/var/www/backup/import.sql’: Table ‘lkcommanddisplayprofile’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 12308 in file: ‘/var/www/backup/import.sql’: Table ‘lkdgdg’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 12344 in file: ‘/var/www/backup/import.sql’: Table ‘lkdisplaydg’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 12381 in file: ‘/var/www/backup/import.sql’: Table ‘lklayoutdisplaygroup’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 12401 in file: ‘/var/www/backup/import.sql’: Table ‘lkmediadisplaygroup’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 12413 in file: ‘/var/www/backup/import.sql’: Table ‘lknotificationdg’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 12425 in file: ‘/var/www/backup/import.sql’: Table ‘lknotificationgroup’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 12687 in file: ‘/var/www/backup/import.sql’: Table ‘lknotificationuser’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 13074 in file: ‘/var/www/backup/import.sql’: Table ‘lkregionplaylist’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 13436 in file: ‘/var/www/backup/import.sql’: Table ‘lkscheduledisplaygroup’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 13682 in file: ‘/var/www/backup/import.sql’: Table ‘lktagcampaign’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 13694 in file: ‘/var/www/backup/import.sql’: Table ‘lktagdisplaygroup’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 13706 in file: ‘/var/www/backup/import.sql’: Table ‘lktaglayout’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 13772 in file: ‘/var/www/backup/import.sql’: Table ‘lktagmedia’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 13793 in file: ‘/var/www/backup/import.sql’: Table ‘lkusergroup’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 13828 in file: ‘/var/www/backup/import.sql’: Table ‘lkwidgetaudio’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 13841 in file: ‘/var/www/backup/import.sql’: Table ‘lkwidgetmedia’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 14094 in file: ‘/var/www/backup/import.sql’: Table ‘log’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 14113 in file: ‘/var/www/backup/import.sql’: Table ‘media’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 14388 in file: ‘/var/www/backup/import.sql’: Table ‘module’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 14440 in file: ‘/var/www/backup/import.sql’: Table ‘notification’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 14586 in file: ‘/var/www/backup/import.sql’: Table ‘oauth_access_tokens’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 14598 in file: ‘/var/www/backup/import.sql’: Table ‘oauth_access_token_scopes’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 14610 in file: ‘/var/www/backup/import.sql’: Table ‘oauth_auth_codes’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 14623 in file: ‘/var/www/backup/import.sql’: Table ‘oauth_auth_code_scopes’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 14635 in file: ‘/var/www/backup/import.sql’: Table ‘oauth_clients’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 14650 in file: ‘/var/www/backup/import.sql’: Table ‘oauth_client_redirect_uris’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 14662 in file: ‘/var/www/backup/import.sql’: Table ‘oauth_client_scopes’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 14674 in file: ‘/var/www/backup/import.sql’: Table ‘oauth_refresh_tokens’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 14686 in file: ‘/var/www/backup/import.sql’: Table ‘oauth_scopes’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 14705 in file: ‘/var/www/backup/import.sql’: Table ‘oauth_scope_routes’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 14718 in file: ‘/var/www/backup/import.sql’: Table ‘oauth_sessions’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 14732 in file: ‘/var/www/backup/import.sql’: Table ‘oauth_session_scopes’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 14744 in file: ‘/var/www/backup/import.sql’: Table ‘pages’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 14803 in file: ‘/var/www/backup/import.sql’: Table ‘permission’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 15273 in file: ‘/var/www/backup/import.sql’: Table ‘permissionentity’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 15300 in file: ‘/var/www/backup/import.sql’: Table ‘player_software’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 15315 in file: ‘/var/www/backup/import.sql’: Table ‘playlist’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 15681 in file: ‘/var/www/backup/import.sql’: Table ‘region’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 16050 in file: ‘/var/www/backup/import.sql’: Table ‘regionoption’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 16340 in file: ‘/var/www/backup/import.sql’: Table ‘requiredfile’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 17636 in file: ‘/var/www/backup/import.sql’: Table ‘resolution’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 17668 in file: ‘/var/www/backup/import.sql’: Table ‘schedule’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 17929 in file: ‘/var/www/backup/import.sql’: Table ‘session’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 17964 in file: ‘/var/www/backup/import.sql’: Table ‘setting’ already exists
cms-web_1 | ERROR 1050 (42S01) at line 18074 in file: ‘/var/www/backup/import.sql’: Table ‘stat’ already exists
cms-web_1 | Configuring Database Settings
cms-web_1 | Setting up Maintenance
cms-web_1 | settingId
cms-web_1 | 1
cms-web_1 | Existing Database, checking if we need to upgrade it
cms-web_1 | Phinx by CakePHP - https://phinx.org. 0.9.2
cms-web_1 |
cms-web_1 | using config file .varwwwcmsphinx.php
cms-web_1 | using config parser php
cms-web_1 | using migration paths
cms-web_1 | - /var/www/cms/db/migrations
cms-web_1 | warning no environment specified, defaulting to: production
cms-web_1 | ordering by creation time
cms-web_1 |
cms-web_1 | Status [Migration ID] Started Finished Migration Name
cms-web_1 | ----------------------------------------------------------------------------------
cms-web_1 | down 20180130073838 InstallMigration
cms-web_1 | down 20180131113100 OldUpgradeStep85Migration
cms-web_1 | down 20180131113853 OldUpgradeStep86Migration
cms-web_1 | down 20180131113941 OldUpgradeStep87Migration
cms-web_1 | down 20180131113948 OldUpgradeStep88Migration
cms-web_1 | down 20180131113952 OldUpgradeStep92Migration
cms-web_1 | down 20180131113957 OldUpgradeStep120Migration
cms-web_1 | down 20180131114002 OldUpgradeStep121Migration
cms-web_1 | down 20180131114007 OldUpgradeStep122Migration
cms-web_1 | down 20180131114013 OldUpgradeStep123Migration
cms-web_1 | down 20180131114017 OldUpgradeStep124Migration
cms-web_1 | down 20180131114021 OldUpgradeStep125Migration
cms-web_1 | down 20180131114025 OldUpgradeStep126Migration
cms-web_1 | down 20180131114030 OldUpgradeStep127Migration
cms-web_1 | down 20180131114050 OldUpgradeStep128Migration
cms-web_1 | down 20180131114058 OldUpgradeStep129Migration
cms-web_1 | down 20180131114103 OldUpgradeStep130Migration
cms-web_1 | down 20180131114107 OldUpgradeStep131Migration
cms-web_1 | down 20180131114110 OldUpgradeStep132Migration
cms-web_1 | down 20180131114114 OldUpgradeStep133Migration
cms-web_1 | down 20180131114118 OldUpgradeStep134Migration
cms-web_1 | down 20180131114123 OldUpgradeStep135Migration
cms-web_1 | down 20180131122645 OneRegionPerPlaylistMigration
cms-web_1 | down 20180131123038 PlaylistTagsMigration
cms-web_1 | down 20180131123248 WidgetFromToDtMigration
cms-web_1 | down 20180212143336 DaypartSystemEntriesAsRecords
cms-web_1 | down 20180213173846 MailFromNameSettingMigration
cms-web_1 | down 20180219141257 DisplayGroupClosureIndexToNonUnique
cms-web_1 | down 20180223180534 DataSetColumnFilterAndSortOptionsMigration
cms-web_1 | down 20180302182421 WidgetCreatedAndModifiedDtMigration
cms-web_1 | down 20180313085749 MediaTableEditedIdIndexMigration
cms-web_1 | down 20180320154652 PlaylistAddDynamicFilterMigration
cms-web_1 | down 20180327153325 RemoveUserLoggedInMigration
cms-web_1 | down 20180514114415 FixCaseOnHelpTextFieldMigration
cms-web_1 | down 20180515123835 LayoutPublishDraftMigration
cms-web_1 | down 20180529065816 DataSetTruncateFixMigration
cms-web_1 | down 20180529073531 DisplayAsVncLinkMigration
cms-web_1 | down 20180621134013 AddWidgetSyncTaskMigration
cms-web_1 | down 20180621134250 EventLayoutPermissionSettingMigration
cms-web_1 | down 20180906115552 AddForeignKeysToTagsMigration
cms-web_1 | down 20180906115606 AddForeignKeysToPermissionsMigration
cms-web_1 | down 20180906115712 AddForeignKeysToWidgetMediaMigration
cms-web_1 | down 20180906131643 ForgottenPasswordReminderMigration
cms-web_1 | down 20180906131716 DataSetRssMigration
cms-web_1 | down 20181011160130 SimpleSettingsMigration
cms-web_1 | down 20181113173310 RemoveFinanceModuleMigration
cms-web_1 | down 20181113180337 SplitTickerModuleMigration
cms-web_1 | down 20181126113231 Release1812Migration
cms-web_1 | down 20181210092443 RemoveImageUriModuleMigration
cms-web_1 | down 20181212114400 CreatePlayerVersionsTableMigration
cms-web_1 | down 20181217135044 EventSyncMigration
cms-web_1 | down 20190121092556 PlayerUpgradeAndOverrideConfigMigration
cms-web_1 | down 20190125170130 PlayerSoftwareVersionFieldMigration
cms-web_1 | down 20190129103831 AddLinuxDisplayProfileMigration
cms-web_1 | down 20190212115432 AddDefaultTransitionDurationSettingMigration
cms-web_1 | down 20190213162212 AddHorizontalMenuSettingMigration
cms-web_1 | down 20190220165703 AddScheduleRecurrenceMonthlyRepeatsOnMigration
cms-web_1 | down 20190227101705 MakeDisplayLicenseColumnUniqueMigration
cms-web_1 | down 20190228120603 AddDynamicCriteriaTagsMigration
cms-web_1 | down 20190301115046 AdjustGenericfileValidExtensionsMigration
cms-web_1 |
cms-web_1 | We will upgrade it, take a backup
cms-web_1 | Running database migrations
cms-web_1 | Phinx by CakePHP - https://phinx.org. 0.9.2
cms-web_1 |
cms-web_1 | using config file .varwwwcmsphinx.php
cms-web_1 | using config parser php
cms-web_1 | using migration paths
cms-web_1 | - /var/www/cms/db/migrations
cms-web_1 | warning no environment specified, defaulting to: production
cms-web_1 | using adapter mysql
cms-web_1 | using database cms
cms-web_1 |
cms-web_1 | == 20180130073838 InstallMigration: migrating
cms-web_1 |
cms-web_1 |
cms-web_1 | [PDOException]
cms-web_1 | SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name ‘session
cms-web_1 | _id’
cms-web_1 |
cms-web_1 |
cms-web_1 | migrate [-c|–configuration CONFIGURATION] [-p|–parser PARSER] [-e|–environment ENVIRONMENT] [-t|–target TARGET] [-d|–date DATE] [-x|–dry-run]
cms-web_1 |
cms-web_1 | Importing ca-certs
cms-web_1 | cp: can’t stat ‘/var/www/cms/ca-certs/.pem’: No such file or directory
cms-web_1 | cp: can’t stat '/var/www/cms/ca-certs/
.crt’: No such file or directory
cms-web_1 | WARNING: ca-certificates.crt does not contain exactly one certificate or CRL: skipping
cms-web_1 | Configuring Maintenance

You’re trying to import a database in to a pre-existing database.

You need to clear your database before you can import a database in to it. If you’re using MySQL that we provide in Docker, you can do that by downing the containers, and then emptying the shared/db directory.

Doing so will erase anything you have in the database. Be sure you only want the database that you’re going to import. Take a backup if you are at all unsure.

I got the containers down and empty the shared/db directory and when I run the command again I get this and when I type in “localhost” in the webbrowser then it says: the CMS is temporarily off-line as an upgrade is in progress. Please check with your system administrator for updates or refresh your page in a few minutes. again

Attaching to xibo2_cms-web_1
cms-web_1 | Waiting for MySQL to start - max 300 seconds
cms-web_1 | MySQL started
cms-web_1 | Updating settings.php
cms-web_1 | settingId
cms-web_1 | 1
cms-web_1 | Existing Database, checking if we need to upgrade it
cms-web_1 | Phinx by CakePHP - https://phinx.org. 0.9.2
cms-web_1 |
cms-web_1 | using config file .varwwwcmsphinx.php
cms-web_1 | using config parser php
cms-web_1 | using migration paths
cms-web_1 | - /var/www/cms/db/migrations
cms-web_1 | warning no environment specified, defaulting to: production
cms-web_1 | ordering by creation time
cms-web_1 |
cms-web_1 | Status [Migration ID] Started Finished Migration Name
cms-web_1 | ----------------------------------------------------------------------------------
cms-web_1 | down 20180130073838 InstallMigration
cms-web_1 | down 20180131113100 OldUpgradeStep85Migration
cms-web_1 | down 20180131113853 OldUpgradeStep86Migration
cms-web_1 | down 20180131113941 OldUpgradeStep87Migration
cms-web_1 | down 20180131113948 OldUpgradeStep88Migration
cms-web_1 | down 20180131113952 OldUpgradeStep92Migration
cms-web_1 | down 20180131113957 OldUpgradeStep120Migration
cms-web_1 | down 20180131114002 OldUpgradeStep121Migration
cms-web_1 | down 20180131114007 OldUpgradeStep122Migration
cms-web_1 | down 20180131114013 OldUpgradeStep123Migration
cms-web_1 | down 20180131114017 OldUpgradeStep124Migration
cms-web_1 | down 20180131114021 OldUpgradeStep125Migration
cms-web_1 | down 20180131114025 OldUpgradeStep126Migration
cms-web_1 | down 20180131114030 OldUpgradeStep127Migration
cms-web_1 | down 20180131114050 OldUpgradeStep128Migration
cms-web_1 | down 20180131114058 OldUpgradeStep129Migration
cms-web_1 | down 20180131114103 OldUpgradeStep130Migration
cms-web_1 | down 20180131114107 OldUpgradeStep131Migration
cms-web_1 | down 20180131114110 OldUpgradeStep132Migration
cms-web_1 | down 20180131114114 OldUpgradeStep133Migration
cms-web_1 | down 20180131114118 OldUpgradeStep134Migration
cms-web_1 | down 20180131114123 OldUpgradeStep135Migration
cms-web_1 | down 20180131122645 OneRegionPerPlaylistMigration
cms-web_1 | down 20180131123038 PlaylistTagsMigration
cms-web_1 | down 20180131123248 WidgetFromToDtMigration
cms-web_1 | down 20180212143336 DaypartSystemEntriesAsRecords
cms-web_1 | down 20180213173846 MailFromNameSettingMigration
cms-web_1 | down 20180219141257 DisplayGroupClosureIndexToNonUnique
cms-web_1 | down 20180223180534 DataSetColumnFilterAndSortOptionsMigration
cms-web_1 | down 20180302182421 WidgetCreatedAndModifiedDtMigration
cms-web_1 | down 20180313085749 MediaTableEditedIdIndexMigration
cms-web_1 | down 20180320154652 PlaylistAddDynamicFilterMigration
cms-web_1 | down 20180327153325 RemoveUserLoggedInMigration
cms-web_1 | down 20180514114415 FixCaseOnHelpTextFieldMigration
cms-web_1 | down 20180515123835 LayoutPublishDraftMigration
cms-web_1 | down 20180529065816 DataSetTruncateFixMigration
cms-web_1 | down 20180529073531 DisplayAsVncLinkMigration
cms-web_1 | down 20180621134013 AddWidgetSyncTaskMigration
cms-web_1 | down 20180621134250 EventLayoutPermissionSettingMigration
cms-web_1 | down 20180906115552 AddForeignKeysToTagsMigration
cms-web_1 | down 20180906115606 AddForeignKeysToPermissionsMigration
cms-web_1 | down 20180906115712 AddForeignKeysToWidgetMediaMigration
cms-web_1 | down 20180906131643 ForgottenPasswordReminderMigration
cms-web_1 | down 20180906131716 DataSetRssMigration
cms-web_1 | down 20181011160130 SimpleSettingsMigration
cms-web_1 | down 20181113173310 RemoveFinanceModuleMigration
cms-web_1 | down 20181113180337 SplitTickerModuleMigration
cms-web_1 | down 20181126113231 Release1812Migration
cms-web_1 | down 20181210092443 RemoveImageUriModuleMigration
cms-web_1 | down 20181212114400 CreatePlayerVersionsTableMigration
cms-web_1 | down 20181217135044 EventSyncMigration
cms-web_1 | down 20190121092556 PlayerUpgradeAndOverrideConfigMigration
cms-web_1 | down 20190125170130 PlayerSoftwareVersionFieldMigration
cms-web_1 | down 20190129103831 AddLinuxDisplayProfileMigration
cms-web_1 | down 20190212115432 AddDefaultTransitionDurationSettingMigration
cms-web_1 | down 20190213162212 AddHorizontalMenuSettingMigration
cms-web_1 | down 20190220165703 AddScheduleRecurrenceMonthlyRepeatsOnMigration
cms-web_1 | down 20190227101705 MakeDisplayLicenseColumnUniqueMigration
cms-web_1 | down 20190228120603 AddDynamicCriteriaTagsMigration
cms-web_1 | down 20190301115046 AdjustGenericfileValidExtensionsMigration
cms-web_1 |
cms-web_1 | We will upgrade it, take a backup
cms-web_1 | Running database migrations
cms-web_1 | Phinx by CakePHP - https://phinx.org. 0.9.2
cms-web_1 |
cms-web_1 | using config file .varwwwcmsphinx.php
cms-web_1 | using config parser php
cms-web_1 | using migration paths
cms-web_1 | - /var/www/cms/db/migrations
cms-web_1 | warning no environment specified, defaulting to: production
cms-web_1 | using adapter mysql
cms-web_1 | using database cms
cms-web_1 |
cms-web_1 | == 20180130073838 InstallMigration: migrating
cms-web_1 |
cms-web_1 |
cms-web_1 | [PDOException]
cms-web_1 | SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name ‘session
cms-web_1 | _id’
cms-web_1 |
cms-web_1 |
cms-web_1 | migrate [-c|–configuration CONFIGURATION] [-p|–parser PARSER] [-e|–environment ENVIRONMENT] [-t|–target TARGET] [-d|–date DATE] [-x|–dry-run]
cms-web_1 |
cms-web_1 | Importing ca-certs
cms-web_1 | cp: can’t stat ‘/var/www/cms/ca-certs/ .pem’: No such file or directory
cms-web_1 | cp: can’t stat '/var/www/cms/ca-certs/
.crt’: No such file or directory
cms-web_1 | WARNING: ca-certificates.crt does not contain exactly one certificate or CRL: skipping
cms-web_1 | Configuring Maintenance
cms-web_1 | Removing web/install/index.php from production container
cms-web_1 | Starting cron
cms-web_1 | Starting webserver
cms-web_1 | AH00558: httpd: Could not reliably determine the server’s fully qualified domain name, using 172.19.0.4. Set the ‘ServerName’ directive globally to suppress this message

You didn’t clear the database:

Existing Database, checking if we need to upgrade it

The database already existed, and no import was done either.

Down the containers, remove the contents of shared/db (assuming you’re using MySQL that we provide and not an external database), then put your import file in place, and bring it back up.

Your import file must be from a version 1.8 CMS. Direct upgrade from 1.7 isn’t supported.

And the Import file do I have to put in the shared/backup?

Yes. shared/backup/import.sql

Okay, I took the containers down with command docker-compose down. Then I went to shared/db and deleted everything what was in there. Then I went to shared/backup and deleted everything what was in there. And I put the import.sql file in here. I go to the terminal and bring the container up again. But still the same result in the log that says Existing Database, checking if we need to upgrade it

If it did the import then you would expect it to say existing database. The log you provided before didn’t show it doing an import.

If the import ran, and it errors, then I’d suggest the export you have is broken in some way, or is from a version you can’t upgrade directly from.

Could the problem be in that I’m trying to migrate a Theme too?

You need to have the theme in place first, but no I wouldn’t expect that to cause database errors even if you hadn’t.

The import file I export from mySQL database is 800mb and when I go to PHPmyAdmin I can see the “stat” table is around 200mb. Is it possible that this causes problems or can I delete some rows in the “stat” table?

I have around 17 displays for 8 users and 100 layouts

If you don’t use proof of play stats, then you can empty that table with

truncate `stat`

Similarly you can purge logs with

truncate `log`

Then export again. I would use mysqldump to export the database. PHPMyAdmin makes corrupt dumps in my experience.

Check too that you’re upgrading from a version that will upgrade directly to the version you’re installing.

I really appreciate what you’ve done for me. The ‘stat’ table was the issue and the migration works :slight_smile: