Skip to content

Commit

Permalink
Merge pull request #101 from Drazzilb08/rework
Browse files Browse the repository at this point in the history
Rework folder structure to remove backup scripts from main.py and docker integration
  • Loading branch information
Drazzilb08 authored Mar 2, 2024
2 parents 6163275 + 6af5b52 commit 849459e
Show file tree
Hide file tree
Showing 11 changed files with 53 additions and 767 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.7
0.1.8
74 changes: 0 additions & 74 deletions config/config.sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@ schedule:
renameinatorr:
unmatched_assets:
upgradinatorr:
backup_folder:
# Include as many backup folder instances as you want, name must match the name of the backup_folder instance
backup_folder_1:
backup_folder_2:
backup_plex:
backup_appdata:
nohl_bash:
jduparr:

Expand Down Expand Up @@ -90,37 +84,6 @@ instances:
# This is a collection of BASH scripts that can be run by the script.
bash_scripts:
log_level: info
# This script can use the config here, if using this config DO NOT use the plex_backup.conf file
backup_plex:
source: /path/to/plex/appdata/
destination: /path/to/backup/destination/
# This is the number of essential backups to keep
keep_essential: 5
# This is the number of full backups to keep
keep_full: 2
# This is the number of days to keep the full backups
force_full_backup: 7
# This is to perform a full backup every time the script is run
full_backup: false
# This is to compress the backup
compress: true
dry_run: true
# This is to shutdown plex before the backup
shutdown_plex: true
debug: false
# This is not currently used, but will be used in the future (DO NOT USE, however the script can be scheduled), you just need to use the backup_appdata.conf file
backup_appdata:
backup_folder:
backup_folder_1:
source: /path/to/source
destination: /path/to/destination
keep_backups: 5
compress: false
backup_folder_2:
source:
destination:
keep_backup: 12
compress: true
nohl_bash:
source:
include:
Expand Down Expand Up @@ -474,42 +437,5 @@ health_checkarr:
- sonarr_1
- sonarr_anime

backup_appdata:
log_level: info
# Dry run will not actually perform the backup, it will only print what it would do and create dummy files
dry_run: true
destination: /path/to/backup/destination/
keep_backup: 5
# Use compression?
compress: true
# Add new containers to the stop list
add_to_stop: true
# Add new containers to the no stop list
add_to_no_stop: false
use_summary: false
stop_list:
# Containers you want to stop before backing up
- radarr
- sonarr
- qbittorrent
no_stop_list:
# Containers you want to not stop before backing up
- wrapperr
- Sonarr
- wizarr
exclusion_list:
# Containers you want to exclude from the backup, typically containers without appdata or such as plex (or if running this in a container)
- dazzling_mendeleev
- gifted_feistel
- xenodochial_grothendieck
- Dozzle
- scripts
- naughty_brown
- agitated_curie
appdata_paths:
# paths to appdata on host this is used for the script to better understand what to backup
- /mnt/user/appdata/
- /mnt/cache/appdata/

main:
log_level: info
44 changes: 44 additions & 0 deletions extra-scripts/backup-plex-example.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# ____ _ _____ _
# | _ \ | | | __ \| |
# | |_) | __ _ ___| | ___ _ _ __ | |__) | | _____ __
# | _ < / _` |/ __| |/ / | | | '_ \ | ___/| |/ _ \ \/ /
# | |_) | (_| | (__| <| |_| | |_) | | | | | __/> <
# |____/ \__,_|\___|_|\_\\__,_| .__/ |_| |_|\___/_/\_\
# | |
# |_|

# Note: All these variables can be overridden by using the command line arguments simply type `bash <script_name>.sh --help` for information on usage

#!!!!!NOTE: DO NOT USE IF USING THE YAML SETTINGS WITH MAIN.PY!!!!!

#------------- DEFINE VARIABLES -------------#
source_dir='/path/to/plex' # Path to your plex appdata location
destination_dir='/path/to/plex/backup' # Path to your backup folder
keep_essential=7 # Options: (1-99) Number of essential backups to keep
full_backup=false # Options: (true/false) creation of entire Plex backup (true) or essential data only (false)
# true will significantly increase the amount of time and size to create a backup
# as all metadata (potentially hundreds of thousands of files) is included in the backup.
force_full_backup=7 # Options: (1-99) Create a full backup every (#) number of days, in addition to regular essential data (0 to disable)
# this will create an essential backup and then a full backup separately
# this setting is ignored if full_backup = true
keep_full=2 # Options: (1-99) number of full backups to keep - these can be very large
compress=true # Options: (true/false) Due to the size of full backups if you're using a full backup and would like to really compress your backups down as much as possible use 7Zip
dry_run=false # Options: (true/false) Run script without actually making any back ups. Useful for testing.
quiet=false # Options: (true/false) Run script without echoing actions.
shutdown_plex=false # Options: (true/false) Shut down Plex before backing up
debug=false # Options: (true/false) Enable debug logging


#------------- DEFINE NOTIFICATION VARIABLES -------------#
# This section is not required
webhook='' # Discord or Notifiarr webhook (Notifarr uses passthrough integration)
bar_color='e5a00d' # Requires 6-digit hex color

#------------- DEFINE DISCORD ONLY VARIABLES -------------#
bot_name='Notification Bot' # Name your bot (Only used if using Discord webhook)

#------------- DEFINE NOTIFIARR ONLY VARIABLES -------------#
channel='0' # Required if using Notifiarr is your webhook

#------------- DEFINE UNRAID ONLY VARIABLES -------------#
unraid_notify=false # Use unRAID's built in notifications
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 0 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
]

list_of_bash_scripts = [
"backup_folder",
"backup_plex",
"jduparr",
"nohl_bash",
]
Expand Down
Loading

0 comments on commit 849459e

Please sign in to comment.