L0rdRaiden
-
Posts
568 -
Joined
-
Last visited
Content Type
Profiles
Forums
Downloads
Store
Gallery
Bug Reports
Documentation
Landing
Posts posted by L0rdRaiden
-
-
-
9 minutes ago, wgstarks said:
The CA Backups app will do uncompressed backups to the location of your choice IIRC.
I know the problem with CA backup is that it can not only do flash backup, you have to do it together with appdata (docker) although I guess I could you a dummy folder and
In any case if I backup the USB will CA remove all the files a backup the current status or will only replace o create files but won't delete older ones?
-
Does someone has a version of this script that just copy the files without making a zip file?
The next time the backup is done is ok if it deletes everything in that folder and put the new files.
I'm doing backups with Kopia (highly recommended after trying many) and this would be wonderful to have a decent versioning without taking almost any additional space.
With Kopia docker I don't have permissions to access to the boot folder so this is the only solution so far
For example for each snapshot
You can browse it individually and get any file, restore everything... it has encryption deduplication, compression, and it is way faster than duplicati.
-
This script does a backup of the flash drive of unraid, I would like the script to keep only N backups so I can run it every week or day but will only keep N backups and will delete the older ones.
I have no idea of scripting, can someone help me please?
I have already modify in my server the route where the zip file is dropped but I don't know how to do the rest.
#!/usr/bin/php -q <?PHP /* Copyright 2005-2018, Lime Technology * Copyright 2012-2018, Bergware International. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License version 2, * as published by the Free Software Foundation. * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. */ ?> <? $docroot = $docroot ?? $_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp'; $var = file_exists('/var/local/emhttp/var.ini') ? parse_ini_file('/var/local/emhttp/var.ini') : []; $dir = ['system','appdata','isos','domains']; $out = ['prev','previous']; $server = isset($var['NAME']) ? str_replace(' ','_',strtolower($var['NAME'])) : 'tower'; $mydate = date('Ymd-Hi'); $backup = "$server-flash-backup-$mydate.zip"; $used = exec("df /boot|awk 'END{print $3}'") * 1.5; $free = exec("df /|awk 'END{print $4}'"); if ($free > $used) $zip = "/$backup"; else { foreach ($dir as $share) { if (!is_dir("/mnt/user/$share")) continue; $free = exec("df /mnt/user/$share|awk 'END{print $4}'"); if ($free > $used) {$zip = "/mnt/user/$share/$backup"; break;} } } if ($zip) { chdir("/boot"); foreach (glob("*",GLOB_NOSORT+GLOB_ONLYDIR) as $folder) { if (in_array($folder,$out)) continue; exec("zip -qr ".escapeshellarg($zip)." ".escapeshellarg($folder)); } foreach (glob("*",GLOB_NOSORT) as $file) { if (is_dir($file)) continue; exec("zip -q ".escapeshellarg($zip)." ".escapeshellarg($file)); } symlink($zip,"$docroot/$backup"); echo $backup; } ?>
-
10 hours ago, Squid said:
With the templates, it should be best to leave them at the defaults as the maintainers would have already set the appropriate values accordingly. IE: set them to be nobody
Unraid doesn't have "users" in the normal Linux way.
The huge value in docker containers is that they don't have permissions to anything anywhere on your array unless you've explicitly granted them access to it (via the path mappings and whether or not its read-only or read/write). The PUID / PGID and UMASK basically set the permissions of the files that it writes to the array (if it does) to something that's compatible with Unraid's implementation of user shares.
But for example I mostly use linuxserver.io images
https://docs.linuxserver.io/images/docker-mariadb
I read somewhere that unraid uses "nobody" user for docker so if I do this
Should I use that UID and GID as PUID and PGID? or as you said my asumption doesn't make any sense? Please consider that linuxserver.io doesn't specifically create the dockers for unraid.
I am asking this because I get this error in mariadb log
-
Some help please 🥲
-
I have many dockers with PUID, PGID and UMAS, I have never bothered and I always left the default values, it worker, but....
What is the impact If I use a PUID / PGID that doens't exist in Unraid?
Should I assign to all my dockers the PUID and PGID of the user nobody in Unraid?
Is the nobody user in unraid already hardened to use for docker containers?
If a docker doesn't need special permissions what should be the best way to configure it?
What should I do with UMASK?
Thanks in advance
-
Is this normal??
UMASK must be a 3-digit mode with an additional leading 0 to indicate octal.
The first digit will be corrected to 6, the others may be 0, 2, 4, or 6.
UMASK corrected from 022 to 0640 ...
220118 10:53:37 mysqld_safe Logging to '/config/databases/a33da0ec2e80.err'.
220118 10:53:37 mysqld_safe Starting mariadbd daemon with databases from /config/databasesBrought to you by linuxserver.io ------------------------------------- To support LSIO projects visit: https://www.linuxserver.io/donate/ ------------------------------------- GID/UID ------------------------------------- User uid: 99 User gid: 100 ------------------------------------- [cont-init.d] 10-adduser: exited 0. [cont-init.d] 30-config: executing... [cont-init.d] 30-config: exited 0. [cont-init.d] 40-initialise-db: executing... [cont-init.d] 40-initialise-db: exited 0. [cont-init.d] 90-custom-folders: executing... [cont-init.d] 90-custom-folders: exited 0. [cont-init.d] 99-custom-files: executing... [custom-init] no custom files found exiting... [cont-init.d] 99-custom-files: exited 0. [cont-init.d] done. [services.d] starting services [services.d] done. UMASK must be a 3-digit mode with an additional leading 0 to indicate octal. The first digit will be corrected to 6, the others may be 0, 2, 4, or 6. UMASK corrected from 022 to 0640 ... 220118 10:53:37 mysqld_safe Logging to '/config/databases/a33da0ec2e80.err'. 220118 10:53:37 mysqld_safe Starting mariadbd daemon with databases from /config/databases
-
My last try is
- (To see de bus and device number) lsusb
- (To see the dev/bus route and confirm the device) udevadm info /dev/bus/usb/{BUS_NUMBER}/{DEVICE_NUMBER}
- (Add this to the docker container) --device=/dev/bus/usb/00X/00Y
Didn't work either
-
Check this posts maybe you understand it better than me to make it work
http://hintshop.ludvig.co.nz/show/persistent-names-usb-serial-devices/
-
55 minutes ago, ensnare said:
That worked, I adde the below to my /boot/config/go:
sudo curl -L https://raw.githubusercontent.com/Realtek-OpenSource/android_hardware_realtek/rtk1395/bt/rtkbt/Firmware/BT/rtl8761b_config -o /tmp/rtl8761bu_config.bin sudo mv /tmp/rtl8761bu_config.bin /lib/firmware/rtl_bt/rtl8761bu_config.bin sudo curl -L https://raw.githubusercontent.com/Realtek-OpenSource/android_hardware_realtek/rtk1395/bt/rtkbt/Firmware/BT/rtl8761b_fw -o /tmp/rtl8761bu_fw.bin sudo mv /tmp/rtl8761bu_fw.bin /lib/firmware/rtl_bt/rtl8761bu_fw.bin
However, I have to manually unplug and plug-in the usb dongle so the module reloads. Any way to do this programmatically?
Also, where does the device appear? Trying to pass this through to a Home Assistant container, but can't find it!
I think your script is wrong, why do you rename from rtl8761b_config to rtl8761bu_config.bin ?
-
45 minutes ago, ensnare said:
That worked, I adde the below to my /boot/config/go:
sudo curl -L https://raw.githubusercontent.com/Realtek-OpenSource/android_hardware_realtek/rtk1395/bt/rtkbt/Firmware/BT/rtl8761b_config -o /tmp/rtl8761bu_config.bin sudo mv /tmp/rtl8761bu_config.bin /lib/firmware/rtl_bt/rtl8761bu_config.bin sudo curl -L https://raw.githubusercontent.com/Realtek-OpenSource/android_hardware_realtek/rtk1395/bt/rtkbt/Firmware/BT/rtl8761b_fw -o /tmp/rtl8761bu_fw.bin sudo mv /tmp/rtl8761bu_fw.bin /lib/firmware/rtl_bt/rtl8761bu_fw.bin
However, I have to manually unplug and plug-in the usb dongle so the module reloads. Any way to do this programmatically?
Also, where does the device appear? Trying to pass this through to a Home Assistant container, but can't find it!
You can run this to see the status of the device "dmesg | grep -i blue"
You can run this to see the tty and do the passthrough in the container "ls -ltr /dev/tty*|tail -n 1"
Both in the unraid command line console
Then you create the passthrough in HA container like this.
I tried to make it work but I couldn't for some reason the integrations in Home Assistant that uses the bluetooth gave me errors.
If you manage to make it work, please, please, post the solution here. Thanks
-
It worked, apparently
-
On 9/16/2021 at 9:51 PM, Kuijibo said:
Did anyone make progress on this? I bought a long-range Bluetooth dongle and can't get it to work. I have the same issue as @L0rdRaiden.
I haven't solve it yet, it would be nice to have some official support for bluetooth devices
I guess the solution is here, but even if it works, the driver will disappear after a reboot
https://linuxreviews.org/Realtek_RTL8761B
There is already a folder for realtek devices, just need to add the new files
Download and rename to *.bin
-
On 2/18/2021 at 10:07 PM, L0rdRaiden said:
Can someone help me with this? how can I backup UnraidOS USB (/boot)?
-
On 2/18/2021 at 10:07 PM, L0rdRaiden said:
Can someone help me with this please?
-
17 hours ago, saarg said:
I don't see anything wrong there. Does it stop if you stop the container?
Yes
Could it be because of this? --cap-add=SYS_RAWIO
-
On 2/20/2021 at 11:50 PM, saarg said:
That should be in the unraid log. Not sure what is happening.
Could you post your docker run command?
root@localhost:# /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name='Scrutiny' --net='host' --cpuset-cpus='3,7' --privileged=true -e TZ="Europe/Paris" -e HOST_OS="Unraid" -e 'TCP_PORT_8080'='8080' -e 'PUID'='1000' -e 'PGID'='1000' -e 'SCRUTINY_API_ENDPOINT'='http://localhost:8080' -e 'SCRUTINY_WEB'='true' -e 'SCRUTINY_COLLECTOR'='true' -v '/mnt/user/Docker/Scrutiny':'/config':'rw' -v '/run/udev':'/run/udev':'ro' -v '/dev':'/dev':'ro' --dns=10.10.50.5 --cap-add=SYS_ADMIN --cap-add=SYS_RAWIO 'linuxserver/scrutiny'
02278bda8e2da04c238c983c5e85df76703f16eaaacb45dd974f6451b5ba0fe3
-
11 minutes ago, saarg said:
It's in the unraid log or the scrutiny docker log?
Unraid log
-
Does the new version spam the unraid log with hundreds of line?
QuoteFeb 20 19:36:00 Unraid crond[273]: user:root entry:*/15 * * * * run-parts /etc/periodic/15min
Feb 20 19:36:00 Unraid crond[273]: user:root entry:0 * * * * run-parts /etc/periodic/hourly
Feb 20 19:36:00 Unraid crond[273]: user:root entry:0 2 * * * run-parts /etc/periodic/daily
Feb 20 19:36:00 Unraid crond[273]: user:root entry:0 3 * * 6 run-parts /etc/periodic/weekly
Feb 20 19:36:00 Unraid crond[273]: user:root entry:0 5 1 * * run-parts /etc/periodic/monthly
Feb 20 19:36:00 Unraid crond[273]: user:root entry:0 0 * * * /usr/local/bin/scrutiny-collector-metrics run --api-endpoint http://localhost:8080 >> /config/log/scrutiny-collector-metrics.log 2>&1
Feb 20 19:36:00 Unraid crond[273]: wakeup dt=56
Feb 20 19:36:00 Unraid crond[273]: file root:
Feb 20 19:36:00 Unraid crond[273]: line run-parts /etc/periodic/15min
Feb 20 19:36:00 Unraid crond[273]: line run-parts /etc/periodic/hourly
Feb 20 19:36:00 Unraid crond[273]: line run-parts /etc/periodic/daily
Feb 20 19:36:00 Unraid crond[273]: line run-parts /etc/periodic/weekly
Feb 20 19:36:00 Unraid crond[273]: line run-parts /etc/periodic/monthly
Feb 20 19:36:00 Unraid crond[273]: line /usr/local/bin/scrutiny-collector-metrics run --api-endpoint http://localhost:8080 >> /config/log/scrutiny-collector-metrics.log 2>&1 -
How can I use it to backup only the flash drive? Unraid OS
-
-
On 2/9/2021 at 11:12 PM, BRiT said:
Look at the custom kernel tool instead.
well that is not "easy" to do
-
Using nerdpack can you give support to devices?
https://linuxreviews.org/Realtek_RTL8761B
https://aur.archlinux.org/packages/rtl8761b-fw/
It is probably the most (if not the only one) bluetooth chip used in usb dongles that supports bluetooth 5.0
QuoteJan 22 13:28:51 Unraid kernel: usbcore: registered new interface driver btusb
Jan 22 13:28:51 Unraid kernel: Bluetooth: hci0: RTL: examining hci_ver=0a hci_rev=000b lmp_ver=0a lmp_subver=8761
Jan 22 13:28:51 Unraid kernel: Bluetooth: hci0: RTL: rom_version status=0 version=1
Jan 22 13:28:51 Unraid kernel: Bluetooth: hci0: RTL: loading rtl_bt/rtl8761b_fw.bin
Jan 22 13:28:51 Unraid kernel: bluetooth hci0: Direct firmware load for rtl_bt/rtl8761b_fw.bin failed with error -2Jan 22 13:28:51 Unraid kernel: Bluetooth: hci0: RTL: firmware file rtl_bt/rtl8761b_fw.bin not found
Latest (super easy) method for automated flash zip backup!
in User Customizations
Posted
Thanks a lot, I would also need to delete all the content of the folder before the unzip, so the old files won't appear anymore and the unzip or the copy of the file starts always in a clean folder