mirror of
https://github.com/Mic92/nixos-wiki-infra.git
synced 2024-11-25 01:33:34 +01:00
update readme
This commit is contained in:
parent
4efa9b7048
commit
9c458a775a
31
README.md
31
README.md
@ -1,21 +1,30 @@
|
||||
# nixos-wiki-infra
|
||||
|
||||
This project contains everything to setup yourself a mirror of https://nixos.wiki/
|
||||
|
||||
## Demo
|
||||
|
||||
I have one instance deployed [here](https://nixos-wiki.thalheim.io/wiki/Main_Page)
|
||||
This project contains the setup of https://wiki.nixos.org
|
||||
|
||||
## Examples
|
||||
|
||||
Checkout [./targets/nixos-wiki2.thalheim.io]() for an example terraform deployment on hetzner cloud.
|
||||
Checkout [./targets/nixos-wiki.nixos.org]() for an example terraform deployment on hetzner cloud.
|
||||
|
||||
## Restoring from an backup
|
||||
## Downloading a dump of the wiki
|
||||
|
||||
After installing run:
|
||||
This is useful if you want to run your own instance.
|
||||
Every day an xml dump is updated here:
|
||||
|
||||
https://wiki.nixos.org/wikidump.xml.zst
|
||||
|
||||
## Restoring from a backup (wiki admins only)
|
||||
|
||||
```
|
||||
systemctl start wiki-backup.service && systemctl start wiki-restore
|
||||
$ systemctl stop phpfpm-mediawiki.service
|
||||
$ borg-job-wiki list
|
||||
$ borg-job-wiki mount u391032-sub1@u391032.your-storagebox.de:wiki.nixos.org/repo::wiki-wiki-2024-04-01T12:40:37 /tmp/restore
|
||||
$ ls -la /tmp/restore/var/lib/mediawiki/backup/
|
||||
$ sudo dropdb db
|
||||
$ sudo -u postgres dropdb mediawiki
|
||||
$ systemctl restart postgresql.service
|
||||
$ sudo -u postgres pg_restore -d mediawiki < /tmp/restore/var/lib/mediawiki/backup/db
|
||||
$ systemctl start phpfpm-mediawiki.service
|
||||
$ ls -la /tmp/restore/var/lib/mediawiki-uploads/
|
||||
$ umount /tmp/restore/
|
||||
```
|
||||
|
||||
Note that `nixos-wiki-backup` will do this restore every night.
|
||||
|
Loading…
Reference in New Issue
Block a user