Last active
January 5, 2021 16:23
-
-
Save jfeilbach/e648a09a98fb1fcde8f211974fdf5d89 to your computer and use it in GitHub Desktop.
simple backup script for Jackett config running in docker
This file contains 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
#!/bin/bash | |
# I misspelled Jackett when I mapped the docker vol, oops | |
work_dir=/'opt/docker/jacket_config/Jackett' | |
# Use Sonarr/Radarr backup date format | |
date=$(date +%Y.%d.%m_%H.%M.%S) | |
# This works on the linuxserver.io docker image | |
ver=$(docker exec -it jackett /app/Jackett/jackett --version | head -n 1 | awk '{ print $2 }' | tr -d '\r') | |
/usr/bin/zip -r \ | |
${HOME}/jackett_backup_${ver}_${date}.zip \ | |
${work_dir}/ServerConfig.json \ | |
${work_dir}/Indexers/ \ | |
${work_dir}/DataProtection/ | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment