High performance self-hosted photo and video management solution.
TypeScript backup-toolfluttergoogle-photosgoogle-photos-alternativejavascriptmobile-appnestjsnodejsphoto-galleryphotosphotos-managementself-hostedsveltesveltekittypescriptvideos
docs: add server backup to First Steps (#12555)
Matthew Momjian1593eaf6fc39
diff --git a/docs/docs/administration/backup-and-restore.md b/docs/docs/administration/backup-and-restore.mdindex 3d226dd061..860b1e1ce7 100644--- a/docs/docs/administration/backup-and-restore.md+++ b/docs/docs/administration/backup-and-restore.md@@ -21,6 +21,8 @@ The recommended way to backup and restore the Immich database is to use the `pg_It is not recommended to directly backup the `DB_DATA_LOCATION` folder. Doing so while the database is running can lead to a corrupted backup that cannot be restored.:::+### Manual Backup and Restore+<Tabs><TabItem value="Linux system" label="Linux system" default>@@ -29,10 +31,11 @@ docker exec -t immich_postgres pg_dumpall --clean --if-exists --username=postgre``````bash title='Restore'-docker compose down -v # CAUTION! Deletes all Immich data to start from scratch.-# rm -rf DB_DATA_LOCATION # CAUTION! Deletes all Immich data to start from scratch.+docker compose down -v # CAUTION! Deletes all Immich data to start from scratch+## Uncomment the next line and replace DB_DATA_LOCATION with your Postgres path to permanently reset the Postgres database+# rm -rf DB_DATA_LOCATION # CAUTION! Deletes all Immich data to start from scratchdocker compose pull # Update to latest version of Immich (if desired)-docker compose create # Create Docker containers for Immich apps without running them.+docker compose create # Create Docker containers for Immich apps without running themdocker start immich_postgres # Start Postgres serversleep 10 # Wait for Postgres server to start upgunzip < "/path/to/backup/dump.sql.gz" \@@ -49,10 +52,11 @@ docker exec -t immich_postgres pg_dumpall --clean --if-exists --username=postgre``````powershell title='Restore'-docker compose down -v # CAUTION! Deletes all Immich data to start from scratch.-# Remove-Item -Recurse -Force DB_DATA_LOCATION # CAUTION! Deletes all Immich data to start from scratch.+docker compose down -v # CAUTION! Deletes all Immich data to start from scratch+## Uncomment the next line and replace DB_DATA_LOCATION with your Postgres path to permanently reset the Postgres database+# Remove-Item -Recurse -Force DB_DATA_LOCATION # CAUTION! Deletes all Immich data to start from scratchdocker compose pull # Update to latest version of Immich (if desired)-docker compose create # Create Docker containers for Immich apps without running them.+docker compose create # Create Docker containers for Immich apps without running themdocker start immich_postgres # Start Postgres serversleep 10 # Wait for Postgres server to start upgc "C:\path\to\backup\dump.sql" | docker exec -i immich_postgres psql --username=postgres # Restore Backup@@ -68,6 +72,8 @@ Note that for the database restore to proceed properly, it requires a completelySome deployment methods make it difficult to start the database without also starting the server or microservices. In these cases, you may set the environmental variable `DB_SKIP_MIGRATIONS=true` before starting the services. This will prevent the server from running migrations that interfere with the restore process. Note that both the server and microservices must have this variable set to prevent the migrations from running. Be sure to remove this variable and restart the services after the database is restored.:::+### Automatic Database Backups+The database dumps can also be automated (using [this image](https://github.com/prodrigestivill/docker-postgres-backup-local)) by editing the docker compose file to match the following:```yaml@@ -157,7 +163,7 @@ for more info read the [release notes](https://github.com/immich-app/immich/rele- The Immich database containing all the information to allow the system to function properly.**Note:** This folder will only appear to users who have made the changes mentioned in [v1.102.0](https://github.com/immich-app/immich/discussions/8930) (an optional, non-mandatory change) or who started with this version.- - Stored in `UPLOAD_LOCATION/postgres`.+ - Stored in `DB_DATA_LOCATION`.:::dangerA backup of this folder does not constitute a backup of your database!@@ -203,7 +209,7 @@ When you turn off the storage template engine, it will leave the assets in `UPLO- The Immich database containing all the information to allow the system to function properly.**Note:** This folder will only appear to users who have made the changes mentioned in [v1.102.0](https://github.com/immich-app/immich/discussions/8930) (an optional, non-mandatory change) or who started with this version.- - Stored in `UPLOAD_LOCATION/postgres`.+ - Stored in `DB_DATA_LOCATION`.:::dangerA backup of this folder does not constitute a backup of your database!diff --git a/docs/docs/install/post-install.mdx b/docs/docs/install/post-install.mdxindex ba8aa2e9a3..bc1ee80b47 100644--- a/docs/docs/install/post-install.mdx+++ b/docs/docs/install/post-install.mdx@@ -8,6 +8,7 @@ import StorageTemplate from '/docs/partials/_storage-template.md';import MobileAppDownload from '/docs/partials/_mobile-app-download.md';import MobileAppLogin from '/docs/partials/_mobile-app-login.md';import MobileAppBackup from '/docs/partials/_mobile-app-backup.md';+import ServerBackup from '/docs/partials/_server-backup.md';# Post Install Steps@@ -33,6 +34,10 @@ A list of common steps to take after installing Immich include:<MobileAppLogin />-## Step 6 - Backup Your Library+## Step 6 - Upload Your Library<MobileAppBackup />++## Step 7 - Setup Server Backups++<ServerBackup />diff --git a/docs/docs/partials/_server-backup.md b/docs/docs/partials/_server-backup.mdnew file mode 100644index 0000000000..7aab90a753--- /dev/null+++ b/docs/docs/partials/_server-backup.md@@ -0,0 +1,2 @@+Now that you have imported some pictures, you should setup server backups to preserve your memories.+You can do so by following our [backup guide](/docs/administration/backup-and-restore.md).