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.

Dataset conversion added trailing slash?

Featured Replies

Hello all. This morning I followed the tuturial from the awesome @SpaceInvaderOne to convert my appdata folder to a dataset for snapshots. I followed everything to the letter, but when I went to run the script again on my domains folder, I get errors. It seems that a trailing slash was added at some point and the script doesn't like it. See below:

 

#!/bin/bash
#set -x
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 
# #   Script for watching a dataset and auto updating regular folders converting them to datasets                                         # #
# #   (needs Unraid 6.12 or above)                                                                                                        # # 
# #   by - SpaceInvaderOne                                                                                                                # # 
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 


# real run or dry run
dry_run="yes"              # Set to "yes" for a dry run. Change to "no" to run for real

#
# Main Variables
source_pool="cache"     #this is the zpool in which your source dataset resides (note the does NOT start with /mnt/)
source_dataset= "appdata" "domains"    #this is the name of the dataset you want to check and convert its child directories to datasets
should_stop_containers="yes" # Setting to "yes" will stop all containers except thos listed below. This should be set to yes if watching the appdata share
containers_to_keep_running=("AdGuard-Home" "binhex-plexpass") #Containers that you do not want to be stopped (see readme)
should_stop_vms="no"        #Setting to "yes" will stop all vms except thos listed below. This should be set to yes if watching the domain share
vms_to_keep_running=("Home Assistant" "vm2") #Containers that you do not want to be stopped (see readme)
cleanup="yes"               #Seeting to yes will cleanup after running (see readme)
replace_spaces="no"         # Set this to "no" to keep spaces in the dataset names
#
#
#Avanced variables you do not need to change these.
source_path="${source_pool}/${source_dataset}"
mount_point="/mnt"  
stopped_containers=()
stopped_vms=()
converted_folders=()
buffer_zone=11 # this is a bufferzone for addional free space needed in the dataset set as a percentage value beween 1 and 100.
#                it should be set a little higher than what you have your minimum free space floor that is set in the Unraid gui for the zpool

 

 

Script location: /tmp/user.scripts/tmpScripts/auto convert to dataset/script
Note that closing this window will abort the execution of this script
/tmp/user.scripts/tmpScripts/auto convert to dataset/script: line 16: appdata: command not found
Checking Docker containers...
Stopping Docker container nextcloud...
Dry Run: Docker container nextcloud would be stopped
Stopping Docker container mariadb...
Dry Run: Docker container mariadb would be stopped
Stopping Docker container swag...
Dry Run: Docker container swag would be stopped
Stopping Docker container Cloudflare-DDNS...
Dry Run: Docker container Cloudflare-DDNS would be stopped
Processing folder /mnt/cache//appdata...
Folder size: 71G
cannot open 'cache/': trailing slash in name
/tmp/user.scripts/tmpScripts/auto convert to dataset/script: line 142: ((: >= buffer_zone_size : syntax error: operand expected (error token is ">= buffer_zone_size ")
Skipping folder /mnt/cache//appdata due to insufficient space
Processing folder /mnt/cache//domains...
Folder size: 88G
cannot open 'cache/': trailing slash in name
/tmp/user.scripts/tmpScripts/auto convert to dataset/script: line 142: ((: >= buffer_zone_size : syntax error: operand expected (error token is ">= buffer_zone_size ")
Skipping folder /mnt/cache//domains due to insufficient space
Processing folder /mnt/cache//system...
Folder size: 13G
cannot open 'cache/': trailing slash in name
/tmp/user.scripts/tmpScripts/auto convert to dataset/script: line 142: ((: >= buffer_zone_size : syntax error: operand expected (error token is ">= buffer_zone_size ")
Skipping folder /mnt/cache//system due to insufficient space
The following folders were successfully converted to datasets:

 

 

Not sure what's going on or why. I don't think I did anything wrong, but would appreciate any help available. Thanks!!!

  • Author

Ok, well I guess this can get closed. I'm switching to TrueNas anyways.

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.