Skip to content

Restoring your Archetype instance from a data package

Geoffroy Noël edited this page Jul 3, 2024 · 3 revisions

An Archetype data package is a compressed file that contains a backup of an Archetype website. It only contains data as the code is available from github or dockerhub. The file is usually called archetype.tar.gz and is generated by a python script (/build/zip_digipal_project.py).

The package contains the following data:

  • the full database backup (including the content management system and the Archetype tables)
  • all image uploaded via the CMS (e.g. blog pages, home carousel)
  • the site settings
  • any stylistic or functional customisation to your site
  • the high resolution image files (originals format and/or JP2 compressed) of your annotated objects (e.g. manuscripts)

Note that some data packages may not contain the high resolution images. If they are particularly large, KDL may have shared the images with you separately.

Please make sure you create a backup of your data package on a dedicated storage when you receive it as KDL may not always be able to send you a new copy.

The following instructions assumes that:

  • you have another working copy of the data package on the machine you want to restore it
  • you have a vanilla Archetype instance running properly with Docker on your machine. The content of which can be overwritten or lost.

For more information on how to install Archetype using Docker see Dockerhub.

High level instructions

  1. stop your docker container
  2. empty your project folder
  3. copy the data package into your project folder
  4. start the docker container
  5. wait while the package is being restored, this may take 20 minutes or more
  6. check your website at the usual address (typically http://localhost:9080 if you followed the Dockerhub instructions)

Detailed instructions

This is a quick set of detailed instructions for Mac / Linux systems. For more details please read the documentation on Dockerhub.

Install a vanilla Archetype instance

# create your project folder which will contain all your site data
mkdir -p ~/archetype/home/digipal/digipal_project;
# download and launch Archetype with Docker
docker run -d --name archetype -v  ~/archetype/home/digipal/digipal_project:/home/digipal/digipal_project:cached  -p 9080:80 kingsdigitallab/archetype:latest;

If all goes well the vanilla site should be running at http://localhost:9080/. Feel free to modify the parameters (port, folder) to your liking.

1. Stop the instance

docker stop archetype

2. Empty the project folder

rm -rf ~/archetype/home/digipal/digipal_project/*;

3. Copy your data package in the project folder

cp PATH_TO_MY_DATA_PACKAGE ~/archetype/home/digipal/digipal_project/.;

Where PATH_TO_MY_DATA_PACKAGE usually ends with .tar.gz

4. Restart your Archetype instance

docker start archetype

5. Wait...

Restoring may take a while. You can check progress or errors using docker log command.

docker logs --follow archetype

6. Test

Point your browser to your site URL: http://localhost:9080/

Clone this wiki locally