This is essentially just a cheatsheet for myself, but it might come in handy for someone else one day. Good luck!
Prerequisites
Composer
- SSH into your server.
- Run
sudo apt-get install composer.
PIP
Run the following commands:
sudo apt-get install python-pip python-dev build-essential -y sudo pip install --upgrade pip sudo pip install --upgrade virtualenv
Downloading the Scripts
- SSH into your server.
- Change directory into your DKAN installation:
cd /var/www/html - Clone the GitHub repository:
git clone https://github.com/mohnjatthews/dkan-backup-and-restore.git
Installing the Scripts
These instructions can be found on the GitHub repo home page, and inside README.md.
Run
cd dkan_backup_procedureto move into the repo folder.Run
cp .env-example .envto copy and rename.env-exampleto.env.Edit the
.envfile to relfect the details of the server you are connected to:username_mysql="SUPER_FUN_MYSQL_USERNAME" password_mysql"INCREDIBLY_SECURE_MYSQL_PASSWORD" database_mysql="STANDARD_DATABASE_NAME" dkan_environment="DEV" backup_storage_directory="BACKUP_FILE_LOCATION/"Run
composer installto install all the PHP dependencies.Install pip by running the following:
sudo apt-get install python-pip python-dev build-essential -y sudo pip install --upgrade pip sudo pip install --upgrade virtualenvInstall AWS CLI by running
pip install awscli --upgrade --userAdd the following line into
~/.bashrc:export PATH=~/.local/bin:$PATHRun
source ~/.bashrcRun
aws configureand fill out the form, inputting the correct credentials into each section.AWS Access KEY ID [None]: PASTE_KEY_HERE AWS Secret Access Key [None]: PASTE_KEY_HERE Default region name [None]: eu-west-1 Default output format [None]: json