/ piacw.com / backups /

[ICO]NameLast modifiedSizeDescription
[PARENTDIR]Parent Directory  -  
[DIR]uploads/2 years ago -  
[TXT]README.md2 years ago2.9K0fb859dc fixed mobile overflwo options [كارل مبارك]
[   ]data-2.db.bak2 years ago460K0fb859dc fixed mobile overflwo options [كارل مبارك]
[   ]data-3.db.bak2 years ago524K0fb859dc fixed mobile overflwo options [كارل مبارك]
[   ]data-4.db.bak2 years ago524K0fb859dc fixed mobile overflwo options [كارل مبارك]
[   ]data-5.db.bak2 years ago524K0fb859dc fixed mobile overflwo options [كارل مبارك]
[   ]data.db.bak2 years ago304K0fb859dc fixed mobile overflwo options [كارل مبارك]
README.md

Backups and Restoration

After last year, we never know what can happen. This directory contains the necessary database files and instructions to restore Pia's room.

Overview

Pia's room, its front-end, backend, and database are all contained in the parent directory. The directory has been compressed into piacw.zip on February 1, 2021 at 11:31.

This directory contains backups of Pia's room's database in the following structure:

  1. A data-X.db.bak file. This file is a manual copy of the data.db file that describes the contents of the API as Pia had put them in. The original file was generated and is updated by the current running instance of Strapi. It can be found here. To back up this file, I just occasionally make a copy of the original and move it to this folder. The most recent back-up of data.db is data-X.db.bak, with the highest 'X'. Currently this is data-5.db.bak.
  2. An uploads folder. This folder is a manual copy of the uploads folder that contains the files that Pia uploaded to Strapi, including all images and their auto-generated size alternates. This folder was created by Strapi and is updated regularly. Its contents are always referenced by data.db. The original uploads folder is here. I back up this folder by making a copy manually here: uploads.
  3. A README.md file with instructions for restoration. This file.

Instructions

Follow these instructions on the server that will host Pia's Room.

First, download and unpack the compressed project folder, piacw.zip, then:

cd piacw

Copy the most recent data-X.db.bak file to Strapi's .tmp directory:

cp backups/data-4.ddb.bak dev/pias-backend-2/.tmp/data.db

Copy the uploads folder to Strapi's public directory:

cp -r backups/uploads dev/pias-backend-2/public/uploads

Start the back-end server (Strapi)

cd dev/pias-backend-2/
npm install
npm run develop

If everything looks ok, build and start Strapi.

NODE_ENV=production npm run build
NODE_ENV=production npm run start

Start the front-end server (Vue)

cd dev/final/
npm install
npm run serve

If everything looks ok, build the front-end.

npm run build

This generates a dist directory containing the build files that can be served statically. At this point you need to configure two apache/nginx sites on the server. The first is api.piacw.com, and needs to reverse proxy to the running Strapi server, most likely at localhost:1337. The second is piacw.com, and needs to point to the build files of the front-end by changing the web root to dev/final/dist.

Finally, generate self-signed certificates for both sites and restart your server.

Conclusion

Pia's Room should be online at piacw.com and her CMS accessible at api.piacw.com.

Apache/2.4.38 (Debian) Server at www.karls.computer Port 80