Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Fully integrated backup solution

Featured Replies

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.

  • 2 weeks later...

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."

 

 

 

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."

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."

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 by NewDisplayName

  • 5 months later...

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 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.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.