mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
chore(immich): add backup and restore procedure
This commit is contained in:
@@ -4,6 +4,7 @@ Self-hosted photo and video management solution.
|
||||
|
||||
1. [TL;DR](#tldr)
|
||||
1. [Further readings](#further-readings)
|
||||
1. [Sources](#sources)
|
||||
|
||||
## TL;DR
|
||||
|
||||
@@ -23,15 +24,28 @@ The composition uses `.env` for configuration.<br/>
|
||||
Refer the [Environment Variables] documentation page for the available environment variables.
|
||||
</details>
|
||||
|
||||
<!-- Uncomment if used
|
||||
<details>
|
||||
<summary>Usage</summary>
|
||||
|
||||
```sh
|
||||
# Backup the DB.
|
||||
docker exec -t 'immich_postgres' pg_dumpall --clean --if-exists --username='postgres' \
|
||||
| gzip > '/path/to/backup/dump.sql.gz'
|
||||
|
||||
# Restore the DB.
|
||||
# The procedure deletes *all* data to start from scratch.
|
||||
source '.env' \
|
||||
&& docker compose down -v \
|
||||
&& rm -rf "$DB_DATA_LOCATION" \
|
||||
&& docker compose create \
|
||||
&& docker start 'immich_postgres' && sleep 10 \
|
||||
&& gunzip < '/path/to/backup/dump.sql.gz' \
|
||||
| sed "s/SELECT pg_catalog.set_config('search_path', '', false);/SELECT pg_catalog.set_config('search_path', 'public, pg_catalog', true);/g" \
|
||||
| docker exec -i 'immich_postgres' psql --username='postgres' \
|
||||
&& docker compose up -d
|
||||
```
|
||||
|
||||
</details>
|
||||
-->
|
||||
|
||||
<!-- Uncomment if used
|
||||
<details>
|
||||
@@ -49,6 +63,10 @@ Refer the [Environment Variables] documentation page for the available environme
|
||||
- [Main repository]
|
||||
- [Environment Variables]
|
||||
|
||||
### Sources
|
||||
|
||||
- [Backup and Restore]
|
||||
|
||||
<!--
|
||||
Reference
|
||||
═╬═Time══
|
||||
@@ -58,6 +76,7 @@ Refer the [Environment Variables] documentation page for the available environme
|
||||
<!-- Knowledge base -->
|
||||
<!-- Files -->
|
||||
<!-- Upstream -->
|
||||
[backup and restore]: https://immich.app/docs/administration/backup-and-restore
|
||||
[environment variables]: https://immich.app/docs/install/environment-variables
|
||||
[main repository]: https://github.com/immich-app/immich
|
||||
[website]: https://immich.app/
|
||||
|
||||
@@ -18,11 +18,11 @@ The _art_ of hosting and managing applications on one's own servers instead of c
|
||||
| [Gitlab] | Git server | [Gitea], [Gogs] |
|
||||
| [Gogs] | Git server | [Gitea], [Gitlab] |
|
||||
| [Home Assistant] | Home automation platform | |
|
||||
| [Immich] | Photo and video management solution | Google Photo |
|
||||
| [Immich] | Photo and video management solution | Google Photo, [PhotoPrism] |
|
||||
| [NextCloud] | File sharing platform | [OwnCloud] |
|
||||
| [OpenMediaVault] | NAS solution | [TrueNAS] |
|
||||
| [Paperless-ngx] | Document management system | |
|
||||
| [PhotoPrism] | Google Photos replacement | |
|
||||
| [PhotoPrism] | Photo and video management solution | Google Photo, [Immich] |
|
||||
| [Rundeck] | Task runner | [AWX], [CTFreak], [Semaphore], [Zuul] |
|
||||
| [Semaphore] | Task runner | [AWX], [CTFreak], [Rundeck], [Zuul] |
|
||||
| [Uptime Kuma] | Status page | [Gatus], [Statping-ng], [Vigil] |
|
||||
|
||||
Reference in New Issue
Block a user