Replace backup script with autorestic
This commit is contained in:
		
							parent
							
								
									13084e3558
								
							
						
					
					
						commit
						ed51a86935
					
				
					 17 changed files with 180 additions and 224 deletions
				
			
		|  | @ -1,3 +0,0 @@ | |||
| FROM restic/restic | ||||
| 
 | ||||
| RUN apk add curl | ||||
|  | @ -1,5 +1,6 @@ | |||
| backup_path="$BACKUP_LOCATION/immich" | ||||
| mkdir -p "$backup_path" | ||||
| #!/usr/bin/env bash | ||||
| 
 | ||||
| backup_path="$1" | ||||
| 
 | ||||
| cd /opt/services/immich || exit | ||||
| docker compose exec database sh -c 'pg_dump -U "$DB_USERNAME" "$DB_DATABASE"' | gzip >"$backup_path/immich.sql.gz" | ||||
							
								
								
									
										5
									
								
								roles/backup/files/hooks/mailcow
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										5
									
								
								roles/backup/files/hooks/mailcow
									
										
									
									
									
										Executable file
									
								
							|  | @ -0,0 +1,5 @@ | |||
| #!/usr/bin/env bash | ||||
| 
 | ||||
| export MAILCOW_BACKUP_LOCATION="$1" | ||||
| 
 | ||||
| /opt/mailcow-dockerized/helper-scripts/backup_and_restore.sh backup all | ||||
|  | @ -1,5 +1,6 @@ | |||
| mkdir -p "$BACKUP_LOCATION/postgres" | ||||
| cd "$BACKUP_LOCATION/postgres" || exit | ||||
| #!/usr/bin/env bash | ||||
| 
 | ||||
| cd "$1" | ||||
| 
 | ||||
| postgres_tables=$(sudo -u postgres psql -Atc "SELECT datname FROM pg_database WHERE datistemplate = false;") | ||||
| 
 | ||||
|  | @ -1,3 +0,0 @@ | |||
| export MAILCOW_BACKUP_LOCATION="$BACKUP_LOCATION/mailcow" | ||||
| mkdir -p "$MAILCOW_BACKUP_LOCATION" | ||||
| /opt/mailcow-dockerized/helper-scripts/backup_and_restore.sh backup all | ||||
|  | @ -1,3 +0,0 @@ | |||
| export MAILCOW_BACKUP_LOCATION="$BACKUP_LOCATION/mailcow" | ||||
| mkdir -p "$MAILCOW_BACKUP_LOCATION" | ||||
| /opt/mailcow-dockerized/helper-scripts/backup_and_restore.sh backup all | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue