Posts by FeFiFoFum

    So I manaully installed it but it refused to actually work and I'm not sure why.

    Can someone please give me the EXACT string command to install it? Assuming I want the webUI on 56133?

    I think I need to specify a server port and that's where it's going wrong?

    I didn't update the addon version for a couple of reasons.

    1. The latest version image simply didn't work on a lot of arm boxes.

    2. They changed how a lot of the settings are input, leading to any web gui settings changes reverting back every time the container is restarted

    Please don't take my question as criticism, thank you for the hard work.

    I am fine with getting it manually, (mind you, I did that and it seemed to grab the latest version and it works fine)

    How do I install this, manually rather than using the addon version.

    It seems to me the addon version may be slightly out of date.

    Is it possible to pihole checkout dev (latest development build) but under docker, or do I need to work within what's encoded into docker images?

    The official pihole repository might be fine to be honest, but the one in LibreElec is out of date.

    (diginc/pi-hole)

    Hi All,


    I have written a small script, adapted from my Raspbian Pi Hole linux for LibreElec which will backup the ENTIRE SDCard to a share on the network (desktop PC, NAS, file server) once per week.

    This means if your MicroSD storage card dies, or heck if you lose your Pi somehow, you can simply "re-burn" an SDCard using an imaging program, like Win32DiskImager.
    (Please note I'm a mid-skill user, others may suggest cooler things which may be superior.)


    You'll need to enable SSH on your LibreElec install, it's in the menu somewhere (sorry, google it)

    SSH Terminal in to the Pi system with a tool like putty, mobaXterm, etc

    I decided to store my backup script file in the /storage/ folder. (NOTE: The SMB password is in plain text, inside a file, depending on your network setup, this may not be a big deal, some may find this scary, you can always make a new share, with a new username / password like 'backup/backup on your server with limited access)

    cd /storage
    nano backup.sh

    Paste in the below information into the nano text editor, be sure to change what's relevant to you!
    (I use shift insert to paste)

    mkdir /tmp/BackupDestination
    mount -t cifs -o username=USERNAME,password=PASSWORD //IPADDRESSOFSMBSHARE/SHARENAME/FOLDERS/ /tmp/BackupDestination
    dd bs=4M if=/dev/mmcblk0 | gzip -c >/tmp/BackupDestination/LibreElec-Pi-133.img.gz
    umount /tmp/LibreElecPi

    Press CTRL-O to 'write out' (save) the file and CTRL-X to exit Nano.

    You may need to put in a username and password, relevant to your share, you then need the IP of the server (your desktop PC?) and a shared Windows SMB folder off it

    Here's mine for example:

    Code
    mount -t cifs -o username=root,password=PASS //192.168.0.9/data/backup/LibreElecPi/  /tmp/BackupDestination

    This will map the local folder called tmp/BackupDestination to (a mount point) on the destination SMB (CIFS) share remotely, this case it's my NAS Server, share name data and a folder underneath called /backup/LibreElecPi/

    NOTE:

    It would be smart and time saving to test this mount line, by pasting it on its own into the console to see if it correctly maps your destination SMB share!

    You can test by going to

    cd /tmp/BackupDestination

    Make a folder in here, then check on your server to see if it appears.

    mkdir test

    I initially had lots of dififculty figuring out how to map SMB with linux, so test it before finishing your script.


    The next line in the script is the actual backup, this will take at least 30 minutes to run and the Pi will be basically unusable, it's best run at midnight for example or 3am etc. (more on schedule shortly)

    Finally, we unmount the share.

    Now to make the backup actually "runable" simply type "chmod +x backup.sh"

    To test your backup works simply type:

    ./backup.sh

    This should take a long time, when it's done, you'll have a file on your server, in my case 1.5GBytes, about an hour

    Scheduling:

    Finally, we schedule the backup using the linux schedule tool cron / crontab

    You'll want to generate an exact line for your schedule.

    Go to Crontab Generator - Generate crontab syntax and define a schedule by clicking the desired entrypoints.

    You will also need to paste in the actual command to run, which is simply

    /storage/backup.sh

    Then click generate, you'll end up with a weird looking line.

    Here's mine

    * 1 * * 6 /storage/backup.sh >/dev/null 2>&1

    That's gonna backup at 1am on the 6'th day of the week (Saturdays)


    Here's one which will backup at 6:45am, Monday to Friday

    45 6 * * 1-5 /storage/backup.sh >/dev/null 2>&1

    Cron is pretty weird / complicated, you don't need to learn the little numbers, just use the generator to make your desired schedule.

    Once you have your desired cron entry, type the following to edit the cron schedule

    crontab -e

    Simply paste in the line from the generator and hit CTRL-O to write out (save) your file.

    You're done.

    Whenever your schedule is configured, your Pi will backup the entire SDCard, across the network, to a share.

    If the SDCard wears out / corrupts or you just screw the settings up really badly, you can just install Win32DiskImager, open the gzip file and write a new SDCard. Put it in the Pi and it'll be like nothing happened.

    I hope this helps users with the simpler, 'fire and forget' systems on SDCard

    Generally a poweroff, reboot or shutdown will close all running programs, wait for them to finish, unmount all files and then shut the system down cleanly.

    It is probably a good idea, in a script (as @Jocke.Sve mentioned), to shutdown Kodi and any other "critical programs (mysql etc) prior to issuing a shutdown - especially if there is a lot of file activity.

    I want to thank you for your reply but you can also see the contradiction here. Either it's safe, or it isn't? Is it 'aggressive' in it's enforcement of rebooting the machine?

    Should I consider "shutdown -r <time period>" instead of "shutdown -r now" for example?

    End of the day, I just don't want a corrupt database, / damaged files, the longer this SDCard lasts the better.

    P.S I'll be writing a small guide for the community on how to backup a full SDCard for Pi users once this is done.

    How exactly would you expect the default graceful reboot command NOT to be fine?

    This is exactly why I'm asking, do I sound like a linux guru here?

    I am unsure of the backend of linux, is it smart enough to send a message saying "I'm shutting down, Kodi, please also shut down and please do it safely" does Kodi then close all open files / handles / stuff in the database?

    I don't know, that's why this thread exists :) I'd like to look after my install and have it long term reliable.

    Installed 2 days ago, been very very impressed with Kodi so far on the Pi, astoundingly reliable considering the little machine specifications.

    Used it for 8 hours yesterday, no issues.

    Got back home tonight and tried playing an episode and it just sat with the spinning dial as if it couldn't access the file, couldn't cancel either. UI seemed locked up.

    Note: Ethernet, not wifi, my file server was up and working fine, I could still ping the Pi.

    I had a terminal session (SSH) still running and managed to capture a shot of top, something had gone haywire.

    Long story short, is this common? Anyone else seen this? Is it a simple fix - a reboot fixed the Pi, however I'd prefer to not have to do periodically. (Especially considering how otherwise quite good it is)

    Alternatively, is there a way to reboot the Pi, once every 12 hours, IF the screensaver is active??


    EDIT: CRON does work, I'm a fool.

    What is the _best_ command to reboot Kodi / LibreElec *cleanly* so that no files or databases are damaged?