master
Kaitlyn Parkhurst 3 years ago
parent dfba3aab44
commit d28d81d9ef
  1. 51
      README.md

@ -278,8 +278,59 @@ Now that the `panel_config.jekyll_init_repo` repository exists, we should be rea
### How to perform a system backup
There are two sources of truth for MyJekyllBlog that should be backed up regularly.
The first is the installation of Gitea, a Git Service, that MyJekyllBlog uses for storage and atomic changes of all Jekyll blogs it hosts.
The second is the PSQL database for mjb.panel. This database contains all of the information about user accounts, blog ownership, etc.
#### Backup Gitea Data
Take a root shell on the store machine and stop gitea.
```bash
systemctl stop gitea
```
Confirm that gitea is stopped by going to the store server over HTTPS. You should recieve a 502 Bad Gateway error.
```bash
su - git
cd /var/lib/gitea/
./gitea dump --c /etc/gitea/app.ini
```
There will be a file with a timestamp, such as `gitea-dump-1669000424.zip`. This is the backup of all Gitea data and can be used to restore the repositories.
Remember to start Gitea again.
```bash
systemctl start gitea
```
#### Backup PSQL Data
Take a shell for the manager user on the store server and run the following.
```bash
cd mjb/Web
./script/mjb db_dump > psql-backup-`date +%s`.sql
```
### How to perform a system restore
#### Restore Gitea Data
See https://docs.gitea.io/en-us/backup-and-restore/#restore-command-restore for information on processing the gitea-dump-timestamp.zip file.
#### Restore PSQL Data
Instructions -- I should make an ansible task that handles this.
Drop table, create table, import SQL dump.
TODO
## Development Guide
### Enable development mode

Loading…
Cancel
Save