Jump to content

JoeUnraidUser

Members
  • Content Count

    77
  • Joined

  • Last visited

Community Reputation

11 Good

About JoeUnraidUser

  • Rank
    Advanced Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. If it helps, I ran UTT v4.1 and here are my results: LongSyncTestReport_2019_08_21_0445.csv LongSyncTestReport_2019_08_21_0445.txt ScreenOutput_2019-08_21_0445.txt
  2. Script to convert text files from DOS to Unix format. dos2unix #!/bin/bash # Convert text files from DOS to Unix format. if [ $# -eq 0 ] || [ "$1" == "--help" ] then printf "Usage: dos2unix <files>...\n" exit 0 fi for file in "${@}" do user=$(stat -c '%U' "$file") group=$(stat -c '%G' "$file") perms=$(stat -c "%a" "$file") tmp="$file.$(date +%N)" cat "$file" | fromdos > "$tmp" mv "$tmp" "$file" chown $user:$group "$file" chmod $perms "$file" done Script to convert text files from Unix to DOS format. unix2dos #!/bin/bash # Convert text files from Unix to DOS format. if [ $# -eq 0 ] || [ "$1" == "--help" ] then printf "Usage: unix2dos <files>...\n" exit 0 fi for file in "${@}" do user=$(stat -c '%U' "$file") group=$(stat -c '%G' "$file") perms=$(stat -c "%a" "$file") tmp="$file.$(date +%N)" cat "$file" | todos > "$tmp" mv "$tmp" "$file" chown $user:$group "$file" chmod $perms "$file" done
  3. It works if you fix the script. Copy/paste will not work due to incorrect line endings. To fix the file you need to load it into an editor like notepad++, select everything, then go to the menu and select Edit -> EOL conversion -> Unix (LF). Edit: or you can use dos2unix script to fix the file
  4. I store my scripts in a bin directory on the flash drive: /boot/bin To modify the profile I run the following script from the go file: /boot/bin/setup.sh >> /boot/logs/setup.log 2>&1 & setup.sh #!/bin/bash if [ -f /root/.bash_profile.orig ] then cp /root/.bash_profile.orig /root/.bash_profile else cp /root/.bash_profile /root/.bash_profile.orig fi ( cat <<"EOF" # alias alias bin="ls -al /boot/bin" # Path PATH=.:/boot/bin:$PATH EOF ) >> /root/.bash_profile
  5. Your lucky you only get the error every few days. When I first started using Unraid I got the error message every 15 minutes.
  6. Thanks... Let me know where you get with the docker. It is frustrating dealing with a limited version of Linux.
  7. Have you made any progress with this? I am having the same problem.
  8. I changed it to 022 and it is working now. Thank You
  9. I tried installing lates t and 2.3.9-1-05. I am still getting the same error. supervisord.log
  10. I followed the instruction and got the following file: supervisord.log I also printed all the file and directory permissions in the following file: permissions.txt
  11. I just updated and I am still having the same problem. How do I roll back to a previous version?
  12. Backup/Restore dockers. The backup directory contains cache files and Gzip files. Running dockers are stopped and started during backup and restore. Gzip compression is used so the owner and permissions are preserved in the backup files. If you want to run with hard coded variables, then set the variables under Defaults. Usage: Usage: backupDockers.sh: [-a] [-d <backup directory>] [<dockers and/or archive files>...] -b : backup mode -r : restore mode -l : list dockers -a : all dockers -c : crc comparison during rsync, default is check time and size -d : set backup directory -s : save backup during restore Examples: Backup dockers into a specific backup directory: backupDockers.sh -b -d /mnt/user/backup/dockers binhex-plexpass transmission Restore docker latest file and a certain docker file from a specific backup directory: backupDockers.sh -r -d /mnt/user/backup/dockers binhex-plexpass transmission.2019-07-02-12-30-38-EDT.tgz Backup all dockers into a specific backup directory: backupDockers.sh -bad /mnt/user/backup/dockers Restore all dockers from a specific backup directory: backupDockers.sh -rad /mnt/user/backup/dockers Source: If copy/paste doesn't work then download the file. backupDockers.sh #!/bin/bash # Defaults backup="/mnt/user/Backup/Dockers" restore=false all=false checksum=false dockers=() files=() usage() { echo "Usage: backupDockers.sh: [-a] [-d <backup directory>] [<dockers and/or archive files>...]" echo echo " -b : backup mode" echo " -r : restore mode" echo " -l : list dockers" echo " -a : all dockers" echo " -c : crc comparison during rsync, default is check time and size" echo " -d : set backup directory" echo " -s : save backup during restore" echo exit 1 } while getopts 'brlacd:?h' opt do case $opt in b) restore=false ;; r) restore=true ;; l) docker ps -a --format "{{.Names}}" | sort -fV exit 0 ;; a) all=true ;; c) checksum=true ;; d) backup=${OPTARG%/} ;; h|?|*) usage ;; esac done shift $(($OPTIND - 1)) if [ "$all" == "true" ] then readarray -t all < <(printf '%s\n' "$(docker ps -a --format "{{.Names}}" | sort -fV)") else all=() fi readarray -t items < <(printf '%s\n' "$@" "${dockers[@]}" "${all[@]}" | awk '!x[$0]++') [ "${items[0]}" == "" ] && usage for item in "${items[@]}" do if echo $item | grep -sqP ".+\.\d\d\d\d-\d\d-\d\d-\d\d-\d\d-\d\d-\w+\.tgz" then files+=("$item") else if [ ! -z $item ] then dockers+=("$item") fi fi done date=$(date +"%Y-%m-%d-%H-%M-%S-%Z") echo "DATE: $date" appdata="/mnt/user/appdata" cache="$backup/appdata" if [ "$restore" == "true" ] then restores=() errors=() for docker in "${dockers[@]}" do file="$(ls -t $backup/$docker/*.tgz 2>/dev/null | head -1)" [ -e "$file" ] && restores+=("$file") || errors+=("$docker") done for file in "${files[@]}" do docker=$(echo $file | cut -d '.' -f 1) file="$backup/$docker/$file" [ -e "$file" ] && restores+=("$file") || errors+=("$file") done for error in "${errors[@]}" do archive=$(echo "$error" | rev | cut -d '/' -f 1 | rev) echo "ERROR: $archive: archive not found" done readarray -t restores < <(printf '%s\n' "${restores[@]}" | awk '!x[$0]++') for restore in "${restores[@]}" do archive=$(echo "$restore" | rev | cut -d '/' -f 1 | rev) docker=$(echo "$archive" | cut -d '.' -f 1) [ "$docker" == "" ] && continue echo "DOCKER: $docker" running=$(docker ps --format "{{.Names}}" -f name="^$docker$") if [ "$docker" == "$running" ] then echo "STOP: $docker" docker stop --time=30 "$docker" >/dev/null fi cd "$appdata" backup="$docker.$date" echo "MOVE: $docker -> $backup" mv -f "$docker" "$backup" 2> /dev/null if [ -d "$backup" ] then echo "RESTORE: $archive -> $appdata" #tar --same-owner --same-permissions -xzf "$restore" pv $restore | tar --same-owner --same-permissions -xzf - if [ ! -d "$appdata/$docker" ] then echo "ERROR: restore failed" mv -f "$backup" "$docker" 2> /dev/null if [ ! -d "$appdata/$docker" ] then echo "ERROR: repair failed" fi fi if [ ! -d $docker ] then echo "ERROR: restore failed" fi else echo "ERROR: move failed" fi if [ "$docker" == "$running" ] then echo "START: $docker" docker start "$docker" >/dev/null fi done else for docker in "${files[@]}" "${dockers[@]}" do if ! docker ps -a --format "{{.Names}}" | grep $docker -qs then echo "ERROR: $docker: docker not found" fi done mkdir -p "$backup" "$cache" chown nobody:users "$backup" "$cache" chmod ug+rw,ug+X,o-rwx "$backup" "$cache" for docker in "${dockers[@]}" do if [ -d "$appdata/$docker" ] then echo "DOCKER: $docker" running=$(docker ps --format "{{.Names}}" -f name="^$docker$") if [ "$docker" == "$running" ] then echo "STOP: $docker" docker stop --time=30 "$docker" >/dev/null fi echo "SYNC: $docker" [ "$checksum" == "true" ] && checksum=c || checksum= rsync -ha$checksum --delete "$appdata/$docker" "$cache" if [ "$docker" == "$running" ] then echo "START: $docker" docker start "$docker" >/dev/null fi mkdir -p "$backup/$docker" echo "GZIP: $docker.$date.tgz" tar cf - -C "$cache" "$docker" -P | pv -s $(du -sb "$cache/$docker" | cut -f 1) | gzip > "$backup/$docker/$docker.$date.tgz" chown -R nobody:users "$backup/$docker" chmod -R ug+rw,ug+X,o-rwx "$backup/$docker" fi done fi date=$(date +"%Y-%m-%d-%H-%M-%S-%Z") echo "DATE: $date"