For help, advice and discussion about stuff not related to aviation. Play nice: no religion, no politics and no axe grinding please.
  • 1
  • 18
  • 19
  • 20
  • 21
  • 22
  • 32
By Colonel Panic
#1818112
Well, after days of trying, I have finally managed to get my new NUC to where I wanted it to be, ie running Linux (in my case Ubuntu 20.04 as I couldn't get Mint to do _exactly_ what I wanted), along with x11vnc, Docker, Portainer and Home Assistant. 8)

Before I continue to populate Home Assistant, what would be the best way to (ideally) make a bootable backup of the entire system? There is currently just under 50GB used of a 500GB SSD. If it is easy to automate then perhaps I can use my Synology NAS, but if not then monthly backups on to a. removable USB Drive would also be OK. Keen to backup the entire drive as I could really do without having to set it all up again. What programme should I search Google for?

Linux is at times excruciatingly frustrating, but it can also be quite fun / rewarding when it eventually does what you want it to do. Typing out the Terminal commands as shown in various cheat sheets on the web brought back memories of typing out lines and lines of BASIC code printed in computing magazines in to my ZX Spectrum in 1984 ... one incorrect space or punctuation and it all goes pear shaped very quickly! :shock:
User avatar
By stevelup
FLYER Club Member  FLYER Club Member
#1818120
It's quite a challenge getting reliable bootable backups of a Linux system - you can't easily capture them whilst the OS is running.

I'd shut it down and do a full offline backup, then just make sure the individual things (eg., Home Assistant) are backing up correctly using their own mechanisms.

Then, perhaps, once a month do another full offline backup.

All my Linux systems are running on VMware and the backups are done via snapshots so I can't really give you any advice.

In hindsight, I should have probably suggested this to you - you could have installed VMware ESXi on the NUC and then installed Ubuntu into that - gives you an awful lot of flexibility.

You can spin up as many instances as you like, set snapshots before you do anything that might break something, then quickly return to a previous snapshot if you did bork it and so on.

You can even run Mac OS or Windows (or in fact any other OS) all on the same box, all at the same time.

It's not too late to do this... what am I getting myself into by suggesting this is my biggest worry! :lol:
Colonel Panic liked this
By Colonel Panic
#1818169
Running the NUC headlessly & without a monitor plugged in, and VNC doesn't work very well as although I can see the "desktop" I can't see the Dock etc. Googling suggests either telling the NUC to never turn off the monitor (tried that, but didn't work), but have also read that an EDID widget can cure the problem.

Would one of these permanently plugged in to the NUCdo the job? https://smile.amazon.co.uk/Pass-Through ... r=8-1&th=1

I want to put the NUC in the loft, and don't want to leave a screen up there 24/7/365.

TIA
User avatar
By stevelup
FLYER Club Member  FLYER Club Member
#1818173
...apart from my earlier post on this very thread suggesting you try it instead of VNC... ;)

stevelup wrote:RDP will often perform better - might be worth trying both.


Yes, it solves your problem. You can set the resolution you want when you connect - it won't matter what monitor (or no monitor) you have connected.
By Colonel Panic
#1820499
How to delete ip_bans.yaml

For some reason I find myself unable to interact with Home Assistant via the browser GUI, although it is evidently running as lights are going on and off according to the schedule etc.

HA is running within my NUC / Ubuntu / Docker / Portainer. I have found a file within /usr/share/hassio/homeassistant called _ip_bans.yaml and in it it lists my Unifi USG, along with a time stamp from when things started to go wrong.
192.168.2.1:
banned_at: '2021-01-15T15:18:05.409700+00:00'

192.168.2.1:
banned_at: '2021-01-15T15:18:05.419224+00:00

But the file is ReadOnly, and I can't edit or delete it from within the Ubuntu Files application. Is there another way to delete it (through Terminal perhaps?), and if so what might the syntax be? I am 99% sure this file isn't supposed to be there, or wanted. Is sudo rm /usr/share/hassio/homeassistant/ip_bans.yaml correct? Or does it need a ~ or similar?

TIA

EDITED TO ADD: Also, how would I change another (similar) file from ReadOnly to editable?
User avatar
By stevelup
FLYER Club Member  FLYER Club Member
#1820502
The file won't be read only, it will be a permissions issue. Your proposed command...

sudo rm /usr/share/hassio/homeassistant/ip_bans.yaml

... should zap it.

You might want to make your network a 'trusted-network' like so:-

Code: Select allhomeassistant:
  auth_providers:
   - type: homeassistant
   - type: trusted_networks
           trusted_networks:
             - 192.168.2.0/24
             - 127.0.0.1


Will also mean you don't have to log in.
By Colonel Panic
#1820512
Thanks both! Feeling a tad chuffed right now, as discovering the ip_bans.yaml file at all had been down to me searching through error logs & playing with the Files application; and now that it has been nuked normal HA service has ben resumed :D

If made & downloaded a Snapshot in case things go pear shaped again, and plan to do a CloneZilla full backup of the NUC when the Amazon man delivers a new HDD later today. :thumright:
By Colonel Panic
#1820854
stevelup wrote:It's quite a challenge getting reliable bootable backups of a Linux system - you can't easily capture them whilst the OS is running.

I've just done my first backup - using Clonezilla on a thumb drive, along with an external USB HDD. Not exactly difficult to do, but a bit of a pfaff having to get a keyboard, screen & mouse out, and more than somewhat nerve-racking trying to ensure you don't clone an empty disk on to the one you are wanting to backup. :shock: Not sure whether the resulting image(?) will be bootable or not, but at least I have a second copy of something :)

But it all goes to prove how easy the likes of SuperDuper!, CarbonCopyCloner and Time Machine are on a Mac!
User avatar
By Sjoram
#1820966
Been keeping an eye on this thread, so that I can chip in when I might have a useful suggestion. Just here to add I agree with the suggestion about making your home LAN subnet a trusted range anywhere you are running any kind of blacklist to avoid future issues.

I have similar issues with a blacklist I run on my firewall to catch & drop port scanning behaviour - certain functions within Win10 seem to trip up on that if the LAN subnets aren't excluded - I'm only interested in anything hitting my public IPs anyway, so that's no issue to do.
Colonel Panic liked this
  • 1
  • 18
  • 19
  • 20
  • 21
  • 22
  • 32