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.

Docker Backup Script for ZFS filesystem (ideal for Plex)

Featured Replies

I wrote this script to be able to back up a single docker container in multiple ways while minimizing docker downtime to less than one second. I run it nightly for Plex as I've found that Plex tends to run a bit smoother if it's restarted every once in a while anyways.

 

Simplified order of operations of this script:

Stops docker.

Snapshots docker appdata.

Starts docker.

THEN it will do replications and/or create timestamped tarfiles/rsync folders by using the snapshot as a source.

 

GitHub Link: https://github.com/Blasman/Unraid_Docker_ZFS_AIO_Backup

See the sample log file below for a quick idea of what to expect (snapshotting, replicating, and only backing up the Plex DB files):
 

[2024_08_25 05:01:02.840] [PLEX BACKUP STARTED]
[2024_08_25 05:01:02.840] Stopping plex docker...
[2024_08_25 05:01:08.199] plex docker stopped in 5.357s.
[2024_08_25 05:01:08.199] Creating ZFS snapshot of 'pool_main/appdata/plex' using sanoid...
[2024_08_25 05:01:08.811] [✔️] 'pool_main/appdata/plex@autosnap_2024-08-25_05:01:08_daily' created in .5912s.
[2024_08_25 05:01:08.825] Starting plex docker...
[2024_08_25 05:01:09.638] plex docker started in .8106s. ⏱️ 6.795s of total plex downtime since start of 'docker stop' command.
[2024_08_25 05:01:09.762] Starting ZFS replication using syncoid...
[2024_08_25 05:01:13.586] [✔️] 'pool_main/appdata/plex' >> 'pool_ssds/backup_appdata/plex'. Successful Replication in 3.823s.
[2024_08_25 05:01:13.639] Created clone 'pool_main/temp/_temp_plex' from 'pool_main/appdata/plex@autosnap_2024-08-25_05:01:08_daily'.
[2024_08_25 05:01:13.685] Mounted 'pool_ssds/backup_plex_db'.
[2024_08_25 05:01:13.702] Copying files to '/mnt/pool_ssds/backup_plex_db/[[email protected]] plex Backup'...
[2024_08_25 05:01:15.778] [✔️] Copied 1020MB of data in 2.067s.
[2024_08_25 05:01:15.866] Destroyed clone 'pool_main/temp/_temp_plex'.
[2024_08_25 05:01:17.411] Unmounted 'pool_ssds/backup_plex_db'.
[2024_08_25 05:01:17.431] [PLEX BACKUP FINISHED] Run Time: 14.649s.

 

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.