Arrchive mirrors Radarr, Sonarr, Prowlarr, and Bazarr database backups to Google Drive.
Although not required, a Discord Webhook is recommended for notifications.
Arrchive is intended to be run at an interval using a task scheduler, such as cron.
Environment Variables:
LOG_LEVEL
: Loguru severity level to write to the console.LOG_DISCORD_WEBHOOK_URL
: Discord Webhook URL to receive log events.LOG_DISCORD_WEBHOOK_LEVEL
: Minimum Loguru severity level to forward to Discord.DISCORD_WEBHOOK_URL
: Discord Webhook URL to receive backup action notifications.BAZARR_BACKUP_PATH
: Path to a directory containing database backup.zip
files for Bazarr.PROWLARR_BACKUP_PATH
: Path to a directory containing database backup.zip
files for Prowlarr.RADARR_BACKUP_PATH
: Path to a directory containing database backup.zip
files for Radarr.SONARR_BACKUP_PATH
: Path to a directory containing database backup.zip
files for Sonarr.GOOGLE_SERVICE_EMAIL
: Email Address for a Google Service Account.GOOGLE_SERVICE_CLIENT_ID
: Client ID for a Google Service Account.GOOGLE_SERVICE_PRIVATE_KEY_ID
: Private Key ID for a Google Service Account.GOOGLE_SERVICE_PRIVATE_KEY
: Private Key for a Google Service Account.GOOGLE_DRIVE_FOLDER_ID
: Identifier for a Google Drive folder derrived from its URL.BACKUP_RETAIN_LIMIT
: Number of backup files to retain on a per-application basis.
- Create a new Project in the Google Cloud console.
- (Recommended) Project Name:
Arrchive
- After creation, select the Project.
- (Recommended) Project Name:
- Enable the Google Drive API for the Arrchive project.
- Create a new Service Account for the Arrchive project.
- (Recommended) Servive Account Name:
Arrchive
- (Recommended) Service Account Description:
https://github.com/EthanC/Arrchive
- Create and Continue
- (Recommended) Servive Account Name:
- Grant the Arrchive Service Account access to the Arrchive project.
- (Recommended) Service Account Role:
Owner
- Continue -> Done
- (Recommended) Service Account Role:
- Obtain a Private Key for the Service Account.
- Actions -> Manage Keys -> Add Key -> Create a new Key -> JSON -> Private Key saved to your Computer
- Set the corresponding environment variables using the values in the JSON file.
- Open Google Drive and create a folder for *Arr application backups to be stored.
- (Recommended) Folder Name:
Arrchive
- (Recommended) Folder Name:
- Share the backup folder to the Service Account email address with Editor permissions.
- Open the Arrchive folder and copy its ID from the page URL.
- Example:
https://drive.google.com/drive/folders/ARRCHIVE_FOLDER_ID
- Set the
GOOGLE_DRIVE_FOLDER_ID
environment variable to this value.
- Example:
Modify the following compose.yaml
example file, then run docker compose up
.
services:
arrchive:
container_name: arrchive
image: ethanchrisp/arrchive:latest
environment:
LOG_LEVEL: INFO
LOG_DISCORD_WEBHOOK_URL: https://discord.com/api/webhooks/YYYYYYYY/YYYYYYYY
LOG_DISCORD_WEBHOOK_LEVEL: WARNING
DISCORD_WEBHOOK_URL: https://discord.com/api/webhooks/XXXXXXXX/XXXXXXXX
BAZARR_BACKUP_PATH: /container/path/to/bazarr/backups
PROWLARR_BACKUP_PATH: /container/path/to/prowlarr/backups
RADARR_BACKUP_PATH: /container/path/to/radarr/backups
SONARR_BACKUP_PATH: /container/path/to/sonarr/backups
GOOGLE_SERVICE_EMAIL: [email protected]
GOOGLE_SERVICE_CLIENT_ID: 000000000000000000000
GOOGLE_SERVICE_PRIVATE_KEY_ID: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
GOOGLE_SERVICE_PRIVATE_KEY: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
GOOGLE_DRIVE_FOLDER_ID: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
BACKUP_RETAIN_LIMIT: 3
volumes:
- /local/path/to/bazarr/backups:/container/path/to/bazarr/backups:ro
- /local/path/to/prowlarr/backups:/container/path/to/prowlarr/backups:ro
- /local/path/to/radarr/backups:/container/path/to/radarr/backups:ro
- /local/path/to/sonarr/backups:/container/path/to/sonarr/backups:ro
Arrchive is built for Python 3.13 or greater, compatability with prior versions is not guaranteed.
- Install required dependencies using uv:
uv sync
- Rename
.env.example
to.env
, then provide the environment variables. - Start Arrchive:
uv run arrchive.py
- Arrchive uses a Pirate icon created by Adrien Coquet via Noun Project.