-
Notifications
You must be signed in to change notification settings - Fork 15
Restoring an Archetype backup
This document explains how to restore a backup of an Archetype instance.
The file is usually named archetype.tar.gz
and contains the database,
the image files, the configuration and customisations of your Archetype instance.
The software itself is hosted separately on Dockerhub and can be downloaded and run on
your machine using Docker.
The following instructions have been tested on a Linux machine. They should work fine on a Mac. The terminal instruction / commands supplied in this document are designed for Mac & Linux but may need some adaptation for Windows. Please create a new issue on github if you need help and we'll try to respond when we can.
Before restoring your backup, it is strongly recommended to save a copy to a separate disk (USB key or external hard drive). This will save space on your computer and reduce the risk of accidental removal.
Create a new folder and copy archetype.tar.gz there. Make sure there is no other file or directory in that folder before installing archetype.
The following steps assume that you have created a folder 'archetype' directly under your home directory.
You can do that from the command line with the following instruction:
mkdir ~/archetype
Please refer to the Docker Desktop documentation for instructions on how to download, install and start Docker.
Start a terminal session in your archetype folder and run the following command:
docker stop archetype; docker run --name archetype -v ~/archetype:/home/digipal/digipal_project:cached -p 9080:80 kingsdigitallab/archetype:latest
It may take several minutes before the application is downloaded and launched. This is because the content is unpacked, the database restored and the search re-indexed. Please be patient as some of these steps can appear to move very slowly.
If all goes well you should eventually see the following output at the end:
==================
WEBSITE IS RUNNING
==================
Point your browser to the following address http://localhost:9080/ and the Archetype home page should appear.
In many cases you'll want to log into Archetype (see the link in the footer of your site) to edit or view all your content. If you already have a user and remember the password you can skip this step. Otherwise you'll need to create a new superuser (i.e. a user who has full permission to the content and admin interface).
Open a new terminal session and type the following command:
docker exec -ti archetype python manage.py createsuperuser
Then fill in the form (Email field can be left blank).
Username (leave blank to use 'root'): jsmith
Email address:
Password:
Password (again):
Superuser created successfully.
You can now log in using that user and password.
To stop the Archetype, you can use Docker Desktop interface or use the following command from a new terminal window:
docker stop archetype
Use Docker Desktop to restart Archetype, or use the following command from a new terminal window:
docker start -a archetype
IF you have made a copy of your backup file in step 1 above and your site is running well, you can save disk space on your computer by removing the ~/archetype/archetype.tar from your archetype folder as it is no longer needed.
If you are editing the content of your site it is advised to create a new backup from time to time to avoid accidental loss of your data.
Note that this process is not optimised and consumes a huge amount of additional disk space (twice the size of your original backup file). So please make sure you have enough space available on your machine before starting this process.
You can create a new backup by going to http://localhost:9080/digipal/search/index/ and clicking the 'Package your content' button at the bottom of the page. Please do not click a second time on the button.
You can refresh the page occasionally to check the progress. Eventually the red 'cancel' button will disappear.
Please don't use the 'download' button as this will create yet another copy, which is unnecessary and may fill up your disk.
Instead you can save the new backup, located in ~/archetype/static/archetype.tar.gz on a separate storage device according to step 1. Then delete it from your computer to save space.
Archetype is maintained by the King's Digital Lab at King's College London. It has received funding from the European Union Seventh Framework Programme (FP7) under Grant Agreement no. 263751 (DigiPal), the Arts and Humanities Research Council (AHRC) under Grant Reference n° AH/L008041/1 (Models of Authority) and AH/L013975/1 (Exon Domesday), and the Faculty of Arts and Humanities at King's College London.
Credits
Getting Started
Using Archetype
The Data Model
Editorial interface
- The Admin Interface
- Adding Items (Manuscripts)
- Adding Images
- Adding Hands and Scribes
- Adding Symbols (Letters)
- Content Permissions
- The Annotation Process
- Linking image regions with text regions
- Rebuilding the Indices
Customising the framework
Archetype for developers
- Installing Archetype on a Web Server
- Bulk Image Upload
- The Javascript API Library
- The Web API Syntax
- Upgrading Archetype
- Contributing to the code (third party development)
- Restoring an Archetype backup
Troubleshooting