December 5, 20241 yr I would like a completely integrated backup solution for docker, usb, vm and data. This is an essential function and should not be solved with third-party plugins.
December 19, 20241 yr would be cool ofc, but i dont think that should be high priority because you can archieve it very easy and fast... via user scripts... "some" directory: #!/bin/bash #--DEFINE VARIABLES--# # Set Appdata Directory (must include trailing /) appdataDirectory='/mnt/user/XXX/' # Set Backup Directory (must include trailing /) backupDirectory='/mnt/user/BACKUP/XXX/' # Set Number of Days to Keep Backups days=7 #--START SCRIPT--# /usr/local/emhttp/plugins/dynamix/scripts/notify -s "Carat Backup" -d "Backup of Carat starting." now="$(date +"%Y-%m-%d"@%H.%M)" mkdir """$backupDirectory"""$now"" for path in "$appdataDirectory"* do name="$(basename "$path")" path=""$appdataDirectory""$name"" cRunning="$(docker ps -a --format '{{.Names}}' -f status=running)" if echo $cRunning | grep -iqF $name; then # echo "Stopping $name" # docker stop -t 60 "$name" cd ""$backupDirectory""$now"" tar cWfC "./$name.tar" "$(dirname "$path")" "$(basename "$path")" # echo "Starting $name" # docker start "$name" else cd ""$backupDirectory""$now"" tar cWfC "./$name.tar" "$(dirname "$path")" "$(basename "$path")" # echo "$name was stopped before backup, ignoring startup" fi done #Cleanup Old Backups find "$backupDirectory"* -type d -mtime +"$days" -exec rm -rf {} + #Stop Notification /usr/local/emhttp/plugins/dynamix/scripts/notify -s "Carat Backup" -d "Backup of XXX complete."
December 19, 20241 yr appdata #!/bin/bash #--DEFINE VARIABLES--# # Set Appdata Directory (must include trailing /) appdataDirectory='/mnt/cache/appdata/' # Set Backup Directory (must include trailing /) backupDirectory='/mnt/user/BACKUP/appdata/' # Set Number of Days to Keep Backups days=360 #--START SCRIPT--# /usr/local/emhttp/plugins/dynamix/scripts/notify -s "AppData Backup" -d "Backup of ALL Appdata starting." now="$(date +"%Y-%m-%d"@%H.%M)" mkdir """$backupDirectory"""$now"" for path in "$appdataDirectory"* do name="$(basename "$path")" path=""$appdataDirectory""$name"" cRunning="$(docker ps -a --format '{{.Names}}' -f status=running)" if echo $cRunning | grep -iqF $name; then echo "Stopping $name" docker stop -t 180 "$name" cd ""$backupDirectory""$now"" tar cWfC "./$name.tar" "$(dirname "$path")" "$(basename "$path")" echo "Starting $name" docker start "$name" else cd ""$backupDirectory""$now"" tar cWfC "./$name.tar" "$(dirname "$path")" "$(basename "$path")" echo "$name was stopped before backup, ignoring startup" fi done #Cleanup Old Backups find "$backupDirectory"* -type d -mtime +"$days" -exec rm -rf {} + #Stop Notification /usr/local/emhttp/plugins/dynamix/scripts/notify -s "AppData Backup" -d "Backup of ALL Appdata complete."
December 19, 20241 yr docker.img #!/bin/bash #--DEFINE VARIABLES--# # Set Appdata Directory (must include trailing /) appdataDirectory='/mnt/user/system/docker/' # Set Backup Directory (must include trailing /) backupDirectory='/mnt/user/BACKUP/docker/' # Set Number of Days to Keep Backups days=360 #--START SCRIPT--# /usr/local/emhttp/plugins/dynamix/scripts/notify -s "Docker.img Backup" -d "Backup of Docker.img starting." now="$(date +"%Y-%m-%d"@%H.%M)" mkdir """$backupDirectory"""$now"" for path in "$appdataDirectory"* do name="$(basename "$path")" path=""$appdataDirectory""$name"" cRunning="$(docker ps -a --format '{{.Names}}' -f status=running)" if echo $cRunning | grep -iqF $name; then # echo "Stopping $name" # docker stop -t 60 "$name" cd ""$backupDirectory""$now"" tar cWfC "./$name.tar" "$(dirname "$path")" "$(basename "$path")" # echo "Starting $name" # docker start "$name" else cd ""$backupDirectory""$now"" tar cWfC "./$name.tar" "$(dirname "$path")" "$(basename "$path")" # echo "$name was stopped before backup, ignoring startup" fi done #Cleanup Old Backups find "$backupDirectory"* -type d -mtime +"$days" -exec rm -rf {} + #Stop Notification /usr/local/emhttp/plugins/dynamix/scripts/notify -s "Docker.img Backup" -d "Backup of Docker.img complete."
December 19, 20241 yr in the end its always the same script, just change the directories accordingly... i dont stop dockers because i couldnt find a difference and had never problems with backimg them up live... (or restoring) but it could be enabled by removing # in front of the code Edited December 19, 20241 yr by NewDisplayName
June 4, 20251 yr It should absolutely be baked into the OOBE. If the scripts exist, it just needs some vars injecting from fields in the GUI if the scripts are as acceptable a solution as you feel they are.Anything that manages data as a solution should of course ship with a first-party-supported backup facility. Even if the backup is just a GUI for ZFS snapshotting, replication and automatic self-repair from redundant replicated datasets.The selling point of Unraid is in how user-friendly 95% of it is. The remaining 5% being less sexy yet still very important stuff like this. Edited June 4, 20251 yr by Hammy Havoc
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.