Description
Describe the problem
There are certain use cases where it would make sense to back up only a given app rather than running a full backup. For example, I have thumbnails enabled for Plex so my plex directory is absolutely massive relative to the rest of my apps. I'm okay with the compromise of less frequent backups for my Plex directory in order to maintain the thumbnails, but I don't want the rest of my apps to be beholden to the same less-frequent backup settings.
On the other hand, there are times when an app will fail for whatever reason and I want to restore only that specific app from a backup. The only way to do this currently is to manually download the tar for that app and replace the current app directory with the download.
Describe any solutions you think might work
The way I would imagine this working would be via a command such as sb backup plex
which would then only backup /opt/plex. Similarly sb restore plex
would pull the most recent archived version of the directory and replace the current directory. Allowing users to select which backup to restore from if multiple archived versions exist may be more difficult since I'm not sure there's anyway for Ansible to list available backups by date and have you select one.
Utilizing the automated backups on an app-by-app basis would be more difficult but a reworked backup_config.yml sample below shows one possibility. In this configuration, a complete backup of all apps would occur monthly, while a partial backup of some key apps occurs more frequently.
backup:
local:
enable: true
destination: /mnt/local/Backups/Saltbox
rclone:
enable: true
destination: google:/Backups/Saltbox
rsync:
enable: false
destination: rsync://somehost.com/Backups/Saltbox
port: 22
restore_service:
user: #
pass: #
misc:
snapshot: true #
cron:
full_backup:
enable: true
cron_time: monthly
partial_backup:
enable: true
include:
- radarr # or /opt/radarr
- sonarr # or /opt/sonarr
- prowlarr # or /opt/prowloarr
- nzbget # or /opt/nzbget
cron_time: weekly
Additionally, partial backups would make even more sense for people who are not using btrfs as they would be able to backup their lighter apps quickly with little downtime and save the big stuff for a better time.