3/25/2023 0 Comments Grsync webminNode-Red users may at this point say “but – the flow files contain the hostname- they will be wrong if you backup to a differently named unit” – well, no. Reboot the destination machine once finished and you’re done. That’s it – I’m assuming you have SSH on both machines – I have it on all of mine (openSSH) so I can remote into them – so unless you have certificates set up – it will ask for the host password for the other machine – and then promptly go off and ensure the other machine has any new files deleted and anything missing added so it becomes a copy of the machine you are on. To use – let’s say you are sitting on the good machine and you want to send updates to the one that is all messed up. You could store it in /etc/bash.bashrc for permanent use – as root (or with sudo) just add it to the end of etc/bash.bashrc and start up a terminal – and you’re done. So you can just run this function from the command line in Ubuntu (and most likely Debian as well) and nothing will happen – it merely stores the function. Sudo rsync -aAXv / –delete –exclude= lot easier than it looks, rsync is a standard synchronisation tool for Linux and is here copying remotely over the network from the current machine to the one specified by the IP address (can’t seem to use hostnames – tell me if I’m wrong) but excluding several directories which you don’t need to copy/sync and the options include verbose and stopping it over-writing the boot partition – so just the main file system. So it occurred to me that if I had 2 identical boards, I could back one up to the other a hell of a lot more quickly than copying SDs – while testing ideas which might go wrong.Īntonio and I came up with some sync code using RSYNC – that could be run on a good machine and, when pointed to the machine I’d just messed up, would delete anything new I’d put on that machine and restore it to a perfect copy of the master – except of course for the hostname which I’d rather leave alone! We wanted this to be an alias rather than a script – and along the way discovered that you can’t send parameters from the command line – to an alias.īut you CAN send parameters to a function – to old Linux hacks this is common sense – but to me this was brand new! SO – check this out.Įcho “Sorry – no IP specified. So I’m messing here with a NanoPi NEO PLUS2 (though this applies to other board too) – and I’ve had all sorts of issues getting SSD1306 drivers working on them – well, not so much getting them to work – that’s easy – more stopping this infernal “segmentation error”. The QNAS implementation of rsync is made for dummies - part of the trouble with that is that I think it is doing stuff under hood which I can't figure out.This article started off as two separate subjects – and has now gone SO much further – you really need to read this one… This is the job I set up, so it does look like the FreeNAS box is tying to push the data to the other box, but I'm a total rsync beginner so I'm not too confident about working out why this is not working. I ca't find any errors for the job not executing properly in this log (in the cron log) Mar 24 03:00:00 freenas /usr/sbin/cron: (tombuckland) CMD (PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/root/bin" lockf -s -t 0 -k '/mnt/BigHutchNAS/TomsFiles/Photographs' rsync -r -t -z '/mnt/BigHutchNAS/TomsFiles/Photographs' 2>&1 |/usr/bin/logger -t rsync) I have dug through the log files and found the following: I have looked over lots of tutorials online and i thought I'd set it up correctly, but the files are not replicating. I'm pretty much a FreeNAS newbie and I'm trying to set up an rsync job to push really important data to another nas box (QNAP TS219P+) on my network.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |