Created
September 13, 2025 11:11
-
-
Save amorphobia/f93d33a88dedba1272632e3b97b42fe2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $env:RESTIC_REPOSITORY = "E:\Documents\Backup\restic-immich" | |
| $env:RESTIC_PASSWORD = "XXXXXXXXXXXXXXXX" | |
| $BaseDir = "F:" | |
| $UploadLocation = "$BaseDir\library" | |
| Write-Host "Begin database dumping..." | |
| [System.IO.File]::WriteAllLines("F:\library\database-backup\immich-database.sql", (docker exec -t immich_postgres pg_dumpall --clean --if-exists --username=postgres)) | |
| restic backup "$UploadLocation" --exclude "$UploadLocation\thumbs" --exclude "$UploadLocation\encoded-video" | |
| # restic forget --keep-hourly 6 --keep-daily 5 --keep-weekly 4 --keep-monthly 3 --prune |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment