Introduction

This article explains the procedure for migrating an Omeka-S environment set up with Docker Compose, including volume data, to another server. You can proceed with the migration safely while maintaining data integrity.

Environment

  • Source server: Ubuntu 22.04
  • Destination server: Ubuntu 22.04 (new setup)
  • Stack: Omeka-S + MariaDB + phpMyAdmin + Traefik + Mailpit

Migration Flow

  1. Backup on the source server
  2. Download to local machine
  3. Docker environment setup on the destination server
  4. Data restoration and startup

Step 1: Backup on the Source Server

1.1 Check the Current Environment

#d#dooCcCchkhkeeeecrcrkkprsDouolncunkmieenrglscoolnutmaeisners

Output example:

DllRooIccVaaEllRVooOmmLeeUkkMaaE--ssN--AddMooEcckkeerr__moamreikaadb

1.2 Create Backup Files

#c#s#s#lduusMBdBdaVoaoaole-occprlepktkdooiihtuauommonftprpceepeyokkktoc-Deaa:tbpocor--/aatonzcssbrc/pffkr--ak*tieuddc-u.gornookcptdumccuzairekkpffrrako-eei.etalrrrlgci-um__beztobmomasonae\macrcerkyfkdkiuiuaaaplpt:d/e-a/bos$d:m((a/eedatdktapaaactp/t-.eroavom/o(+xemla%.kaupYarmp%1iermG\aso%Bd-xd)b$.)(.\d6ta0atMreB.)g+z%Yo%mme%kda)-.st-adro.cgkzer-/C/data.

Output example:

--rrww--rr----rr----11rroooottrroooott15.91MGOOcctt11661177::0024opptt/ommeekkaa--bvaoclkuumpe-s2-02205215011061.6t.atra.rg.zgz

1.3 Change Backup File Permissions

Change ownership to the current user for downloading:

ssuuddoocchhoowwnn$$UUSSEERR::$$UUSSEERRopptt/ommeekkaa--bvaoclkuumpe-s2-02205215011061.6t.atra.rg.zgz

Step 2: Download to Local Machine

Run on your local machine terminal:

#c#ss#ldccsMDppVo~oe-v/wuurleDnssiholeeftworryoona@@mldssdedooookoafuuwawdirrn-nslccl*leeeo.os--atassdadveerirr.davvgieezrSrreC--cPiitppo::r/yopptt/ommeekkaa--bvaoclkuumpe-s2-02205215011061.6t.atra.rg.zgz

Note: The 1.1GB file may take a while to download.


Step 3: Setting Up the Destination Server

3.1 System Update

ssuuddooaappttuuppdgartaede-y

3.2 Remove Existing Docker Packages (Clean Install)

fdoorsnuepdkogaipnt-dgoectkerre.mioovedo$cpkkegr-docdocker-composedocker-compose-v2podman-dockercontainerdrunc;do

3.3 Add Docker Official Repository

#sssss#esuuuuucuAdddddAh"$sddooooodod(uodde.daaiccbaGppnuhrpPttsrme[ettG--tlopate-ggadorcegkeel-sc/eettlfaiho/tys+t=seui-Sro$-tupnmLr(rcpds/yde/dat0heplaata7ttkeptel5tcgatel5p/s/saesc-:p-oad/tp&u-/r&rcdkiceeoeneertwytcstcnr-h.i/liaolfaonriipagc"sctdsh$ta/./i{.tkddtUdeeooeB/sycccUdrkktNocieeuTcunrrrUkrg..e_elsca)CrosO.mcsDl/iEilgNsinAtneMudE>x-:/b-/uy$db=Veu/EvneR/ttSnucIu//OlgaNlpp_gtC/OkDeEyN/rAeiMtnEcg}/s"a/)pdtos/ctkkaeebyrlr.eia"nsgc|s]/dhotctkpesr:./a/sdcownload.docker.com/linux/ubuntu\

3.4 Install Docker Engine

sudoapt-getinstalldocker-cedocker-ce-clicontainerd.iodocker-buildx-plugindocker-compose-plugin

3.5 Verify Installation

DllRooIccVaaEllRVooOmmLeeUkkMaaE--ssN--AddMooEcckkeerr__moamreikaadb

0

3.6 Set Docker Execution Permissions for Regular Users

DllRooIccVaaEllRVooOmmLeeUkkMaaE--ssN--AddMooEcckkeerr__moamreikaadb

1


Step 4: Data Transfer and Restoration

4.1 Upload Backup Files

Run from your local machine:

DllRooIccVaaEllRVooOmmLeeUkkMaaE--ssN--AddMooEcckkeerr__moamreikaadb

2

4.2 Extract on the Destination Server

DllRooIccVaaEllRVooOmmLeeUkkMaaE--ssN--AddMooEcckkeerr__moamreikaadb

3

4.3 Restore Docker Volumes

First, create containers (without starting them) to prepare the volumes:

DllRooIccVaaEllRVooOmmLeeUkkMaaE--ssN--AddMooEcckkeerr__moamreikaadb

4

Next, restore data from backup to volumes:

DllRooIccVaaEllRVooOmmLeeUkkMaaE--ssN--AddMooEcckkeerr__moamreikaadb

5

What this command does:

  • -v omeka-s-docker_omeka:/data/omeka: Omekaのボリュームをマウント
  • -v omeka-s-docker_mariadb:/data/mariadb: MariaDBのボリュームをマウント
  • -v /opt:/backup: バックアップファイルのあるディレクトリをマウント
  • alpine tar -xzf ...: Alpine Linuxイメージでtarコマンドを実行してデータを展開

4.4 Verify Volumes

DllRooIccVaaEllRVooOmmLeeUkkMaaE--ssN--AddMooEcckkeerr__moamreikaadb

6

Output example:

DllRooIccVaaEllRVooOmmLeeUkkMaaE--ssN--AddMooEcckkeerr__moamreikaadb

7


Step 5: Start Containers

5.1 Check Environment Variables

起動前に、.envファイル(または.env.omekaなど)で以下を確認・設定します:

DllRooIccVaaEllRVooOmmLeeUkkMaaE--ssN--AddMooEcckkeerr__moamreikaadb

8

Minimum required settings:

DllRooIccVaaEllRVooOmmLeeUkkMaaE--ssN--AddMooEcckkeerr__moamreikaadb

9

5.2 Start Containers

#c#s#s#lduusMBdBdaVoaoaole-occprlepktkdooiihtuauommonftprpceepeyokkktoc-Deaa:tbpocor--/aatonzcssbrc/pffkr--ak*tieuddc-u.gornookcptdumccuzairekkpffrrako-eei.etalrrrlgci-um__beztobmomasonae\macrcerkyfkdkiuiuaaaplpt:d/e-a/bos$d:m((a/eedatdktapaaactp/t-.eroavom/o(+xemla%.kaupYarmp%1iermG\aso%Bd-xd)b$.)(.\d6ta0atMreB.)g+z%Yo%mme%kda)-.st-adro.cgkzer-/C/data.

0

5.3 Verify Startup

#c#s#s#lduusMBdBdaVoaoaole-occprlepktkdooiihtuauommonftprpceepeyokkktoc-Deaa:tbpocor--/aatonzcssbrc/pffkr--ak*tieuddc-u.gornookcptdumccuzairekkpffrrako-eei.etalrrrlgci-um__beztobmomasonae\macrcerkyfkdkiuiuaaaplpt:d/e-a/bos$d:m((a/eedatdktapaaactp/t-.eroavom/o(+xemla%.kaupYarmp%1iermG\aso%Bd-xd)b$.)(.\d6ta0atMreB.)g+z%Yo%mme%kda)-.st-adro.cgkzer-/C/data.

1


Troubleshooting

Problem 1: Empty Hostname Error in Traefik

Error message:

#c#s#s#lduusMBdBdaVoaoaole-occprlepktkdooiihtuauommonftprpceepeyokkktoc-Deaa:tbpocor--/aatonzcssbrc/pffkr--ak*tieuddc-u.gornookcptdumccuzairekkpffrrako-eei.etalrrrlgci-um__beztobmomasonae\macrcerkyfkdkiuiuaaaplpt:d/e-a/bos$d:m((a/eedatdktapaaactp/t-.eroavom/o(+xemla%.kaupYarmp%1iermG\aso%Bd-xd)b$.)(.\d6ta0atMreB.)g+z%Yo%mme%kda)-.st-adro.cgkzer-/C/data.

2

Solution:
.envファイルでOMEKA_HOSTが設定されているか確認してください。

#c#s#s#lduusMBdBdaVoaoaole-occprlepktkdooiihtuauommonftprpceepeyokkktoc-Deaa:tbpocor--/aatonzcssbrc/pffkr--ak*tieuddc-u.gornookcptdumccuzairekkpffrrako-eei.etalrrrlgci-um__beztobmomasonae\macrcerkyfkdkiuiuaaaplpt:d/e-a/bos$d:m((a/eedatdktapaaactp/t-.eroavom/o(+xemla%.kaupYarmp%1iermG\aso%Bd-xd)b$.)(.\d6ta0atMreB.)g+z%Yo%mme%kda)-.st-adro.cgkzer-/C/data.

3

Problem 2: Database Connection Error

MariaDB may take time to start. Check the following:

#c#s#s#lduusMBdBdaVoaoaole-occprlepktkdooiihtuauommonftprpceepeyokkktoc-Deaa:tbpocor--/aatonzcssbrc/pffkr--ak*tieuddc-u.gornookcptdumccuzairekkpffrrako-eei.etalrrrlgci-um__beztobmomasonae\macrcerkyfkdkiuiuaaaplpt:d/e-a/bos$d:m((a/eedatdktapaaactp/t-.eroavom/o(+xemla%.kaupYarmp%1iermG\aso%Bd-xd)b$.)(.\d6ta0atMreB.)g+z%Yo%mme%kda)-.st-adro.cgkzer-/C/data.

4

Problem 3: Permission Error

#c#s#s#lduusMBdBdaVoaoaole-occprlepktkdooiihtuauommonftprpceepeyokkktoc-Deaa:tbpocor--/aatonzcssbrc/pffkr--ak*tieuddc-u.gornookcptdumccuzairekkpffrrako-eei.etalrrrlgci-um__beztobmomasonae\macrcerkyfkdkiuiuaaaplpt:d/e-a/bos$d:m((a/eedatdktapaaactp/t-.eroavom/o(+xemla%.kaupYarmp%1iermG\aso%Bd-xd)b$.)(.\d6ta0atMreB.)g+z%Yo%mme%kda)-.st-adro.cgkzer-/C/data.

5


Security Considerations

Automated Scanning on Public Servers

Once your server is public, automated scanning bots will immediately attempt to access it. It is normal to see access logs like the following:

#c#s#s#lduusMBdBdaVoaoaole-occprlepktkdooiihtuauommonftprpceepeyokkktoc-Deaa:tbpocor--/aatonzcssbrc/pffkr--ak*tieuddc-u.gornookcptdumccuzairekkpffrrako-eei.etalrrrlgci-um__beztobmomasonae\macrcerkyfkdkiuiuaaaplpt:d/e-a/bos$d:m((a/eedatdktapaaactp/t-.eroavom/o(+xemla%.kaupYarmp%1iermG\aso%Bd-xd)b$.)(.\d6ta0atMreB.)g+z%Yo%mme%kda)-.st-adro.cgkzer-/C/data.

6

These are bots searching for vulnerabilities. If all responses are 404 (Not Found) or 403 (Forbidden), there is no problem.

  1. Firewall Configuration
#c#s#s#lduusMBdBdaVoaoaole-occprlepktkdooiihtuauommonftprpceepeyokkktoc-Deaa:tbpocor--/aatonzcssbrc/pffkr--ak*tieuddc-u.gornookcptdumccuzairekkpffrrako-eei.etalrrrlgci-um__beztobmomasonae\macrcerkyfkdkiuiuaaaplpt:d/e-a/bos$d:m((a/eedatdktapaaactp/t-.eroavom/o(+xemla%.kaupYarmp%1iermG\aso%Bd-xd)b$.)(.\d6ta0atMreB.)g+z%Yo%mme%kda)-.st-adro.cgkzer-/C/data.

7 2. Install Fail2ban

#c#s#s#lduusMBdBdaVoaoaole-occprlepktkdooiihtuauommonftprpceepeyokkktoc-Deaa:tbpocor--/aatonzcssbrc/pffkr--ak*tieuddc-u.gornookcptdumccuzairekkpffrrako-eei.etalrrrlgci-um__beztobmomasonae\macrcerkyfkdkiuiuaaaplpt:d/e-a/bos$d:m((a/eedatdktapaaactp/t-.eroavom/o(+xemla%.kaupYarmp%1iermG\aso%Bd-xd)b$.)(.\d6ta0atMreB.)g+z%Yo%mme%kda)-.st-adro.cgkzer-/C/data.

8 3. Regular Updates

#c#s#s#lduusMBdBdaVoaoaole-occprlepktkdooiihtuauommonftprpceepeyokkktoc-Deaa:tbpocor--/aatonzcssbrc/pffkr--ak*tieuddc-u.gornookcptdumccuzairekkpffrrako-eei.etalrrrlgci-um__beztobmomasonae\macrcerkyfkdkiuiuaaaplpt:d/e-a/bos$d:m((a/eedatdktapaaactp/t-.eroavom/o(+xemla%.kaupYarmp%1iermG\aso%Bd-xd)b$.)(.\d6ta0atMreB.)g+z%Yo%mme%kda)-.st-adro.cgkzer-/C/data.

9


Useful Alias Configuration

When using specific compose files and environment variable files, setting up aliases is convenient:

--rrww--rr----rr----11rroooottrroooott15.91MGOOcctt11661177::0024opptt/ommeekkaa--bvaoclkuumpe-s2-02205215011061.6t.atra.rg.zgz

0


Summary

With this procedure, you can safely migrate Omeka-S in a Docker environment. Key points:

  1. Create two backups: One for configuration files and one for volume data
  2. Create containers before restoring volumes: Prepare volumes with up --no-start
  3. Check environment variable files: Especially hostname settings
  4. Security measures: Essential for public servers

This procedure can also be applied to migrating other Docker Compose environments.


Reference Information


Last updated: October 2025