afon

Members
  • Posts

    6
  • Joined

  • Last visited

afon's Achievements

Noob

Noob (1/14)

0

Reputation

  1. Hi, I did. I paste the SMB configure field here:
  2. Hi, Squid. The pop-up argument input was fine, but after I upgraded the plugin. It's gone. Could you review my code? #!/bin/bash #description=Here is a housekeeping script. By default just deletes empty timestamp directories. Optionally, it can delete snapshots. foregroundOnly=true backgroundOnly=true #arrayStarted=false #name= BTRFS cleanup #argumentDescription="-a purges all snapshots; -i <Comma seperated list of shares> purges the selected shares. example -i Downloads,Test1,Test2 will purge all snapshots for Downloads, Test1, and Test2." #argumentDefault=-a shopt -s nullglob POSITIONAL=() while [[ $# -gt 0 ]] do key="$1" case $key in -i|--include) INCLUDE="$2" shift # past argument shift # past value ;; -a|--all) ALL=YES shift ;; *) # unknown option POSITIONAL+=("$1") # save it in an array for later shift # past argument ;; esac done set -- "${POSITIONAL[@]}" # restore positional parameters #Tokenize include list declare -A includes for token in ${INCLUDE//,/ }; do includes[$token]=1 done #iterate over all disks on array for disk in /mnt/disk*[0-9]* ; do #iterate over each timestamp for timestamp in ${disk}/.snapshots/* ; do #iterate over each share in the timestamp for snap in $timestamp/* ; do if [ -n "${includes[$(basename $snap)]}" ] || [ "$ALL" = "YES" ] ; then echo "Purging - $snap" btrfs subvolume delete $snap fi #check for empty timestamp if [ ! "$(ls -A $timestamp)" ] ; then echo "Purging empty directory - $timestamp" rmdir $timestamp fi done done done and it's original from Thank you so much.
  3. I just set up a whole new unraid sever with 8T*2 3T*2 hard drivers. Consider that unraid not support snapshot naturally. First experimental is using ZFS by freenas on VM, but rsync doesn't work very well on FreeNas. After one week I switch back to alternative solution on unraid. By those 2 articles: I added the SMB extra, run the script and checked the snapshot by command "btrfs sub list /mnt/diskN", they are exist on every disks. But I can't access the previous version files/folders on Win10 or OS X 10.15. Due to I can't reply the original topic as a new bie, I have to start the new topic of it. Have anyone made it? How can I use house keeping script with -i or -a option? I'm linux rookie, all my knowledges come from internet. And is there any way to backup the flash and cache to hard drive daily? Rsync the whole folder by corn? Thank you so much.
  4. After used Unraid for one month, I do love this amazing platform. And bought a basic license to become a officially Unraider. I found every time after I put my mac to sleep, and waked it up. The unraid server became unreachable, error message said "the original item can't be found". I found just relaunch finder works, ref to this article: https://www.cnet.com/news/fix-shared-computer-not-found-in-finder/ But it's still annoying, is there any solution? My unraid version: 6.8.3 Unraid shares via SMB and "Enhanced macOS interoperability" is on. Thank you so much.
  5. Does it work? Really complex for a rookie like me.
  6. Hello, Thank you for your great job. For snapshot disks, it works. I can see a list by command "btrfs sub list /mnt/diskN", but it doesn't work via windows 10 access to check the previous version. Does it conflict with "Enhanced macOS interoperability" option? If it is, may I just restore the disks to some specific time point? And what do we do with the cache drive? Seems there're no snapshot on it. Sry, I'm not very good at linux, and do need snapshot function for data safety. Thank you so much.