mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-08 21:34:25 +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. [TL;DR](#tldr)
|
||||||
1. [Further readings](#further-readings)
|
1. [Further readings](#further-readings)
|
||||||
|
1. [Sources](#sources)
|
||||||
|
|
||||||
## TL;DR
|
## TL;DR
|
||||||
|
|
||||||
@@ -23,15 +24,28 @@ The composition uses `.env` for configuration.<br/>
|
|||||||
Refer the [Environment Variables] documentation page for the available environment variables.
|
Refer the [Environment Variables] documentation page for the available environment variables.
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
<!-- Uncomment if used
|
|
||||||
<details>
|
<details>
|
||||||
<summary>Usage</summary>
|
<summary>Usage</summary>
|
||||||
|
|
||||||
```sh
|
```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>
|
</details>
|
||||||
-->
|
|
||||||
|
|
||||||
<!-- Uncomment if used
|
<!-- Uncomment if used
|
||||||
<details>
|
<details>
|
||||||
@@ -49,6 +63,10 @@ Refer the [Environment Variables] documentation page for the available environme
|
|||||||
- [Main repository]
|
- [Main repository]
|
||||||
- [Environment Variables]
|
- [Environment Variables]
|
||||||
|
|
||||||
|
### Sources
|
||||||
|
|
||||||
|
- [Backup and Restore]
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Reference
|
Reference
|
||||||
═╬═Time══
|
═╬═Time══
|
||||||
@@ -58,6 +76,7 @@ Refer the [Environment Variables] documentation page for the available environme
|
|||||||
<!-- Knowledge base -->
|
<!-- Knowledge base -->
|
||||||
<!-- Files -->
|
<!-- Files -->
|
||||||
<!-- Upstream -->
|
<!-- Upstream -->
|
||||||
|
[backup and restore]: https://immich.app/docs/administration/backup-and-restore
|
||||||
[environment variables]: https://immich.app/docs/install/environment-variables
|
[environment variables]: https://immich.app/docs/install/environment-variables
|
||||||
[main repository]: https://github.com/immich-app/immich
|
[main repository]: https://github.com/immich-app/immich
|
||||||
[website]: https://immich.app/
|
[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] |
|
| [Gitlab] | Git server | [Gitea], [Gogs] |
|
||||||
| [Gogs] | Git server | [Gitea], [Gitlab] |
|
| [Gogs] | Git server | [Gitea], [Gitlab] |
|
||||||
| [Home Assistant] | Home automation platform | |
|
| [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] |
|
| [NextCloud] | File sharing platform | [OwnCloud] |
|
||||||
| [OpenMediaVault] | NAS solution | [TrueNAS] |
|
| [OpenMediaVault] | NAS solution | [TrueNAS] |
|
||||||
| [Paperless-ngx] | Document management system | |
|
| [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] |
|
| [Rundeck] | Task runner | [AWX], [CTFreak], [Semaphore], [Zuul] |
|
||||||
| [Semaphore] | Task runner | [AWX], [CTFreak], [Rundeck], [Zuul] |
|
| [Semaphore] | Task runner | [AWX], [CTFreak], [Rundeck], [Zuul] |
|
||||||
| [Uptime Kuma] | Status page | [Gatus], [Statping-ng], [Vigil] |
|
| [Uptime Kuma] | Status page | [Gatus], [Statping-ng], [Vigil] |
|
||||||
|
|||||||
Reference in New Issue
Block a user