Page 1 of 1

Meteobridge RPi 4b USB storage

Posted: Wed Oct 12, 2022 1:34 pm
by wsnoordbergum
Now I've got my RPi running it has some differences compared to my Nano SD
On my Nano SD backups are on the SD card
I wanted to backup data on my RPi but it seems there has to be a USB storage attached, otherwise it says in the log no backup media found
So I attached a USB storage to the RPi
And yes it does backup
In my network I can reach the RPi SMB server this shows the SD card directories, the same as on the Nano SD
How can I reach the attached USB storage over LAN?
Or do I first have to reboot the RPi in order to see the attached USB drive

Again a question from a RPi newbie 🫣

Re: Meteobridge RPi 4b USB storage

Posted: Wed Oct 12, 2022 7:27 pm
by Gyvate
there are two ways of reading your USB storage:
1. unplug from the RPi and plug into your PC :wink:
2. mount the USB device into the exported file system and look it up under Windows
- connect via SSH to the RPi
- issue the following commands
# mkdir /tmp/mnt/data/USB
# mount /dev/sda1 /tmp/mnt/data/USB

now you can see the content of your USB device in the exported file system under \\METEOBRIDGE\data\USB
(if you have more than one MB device in your network, you may have to replace the exported share name "METEOBRIDGE" by the IP address of the RPi)

when you have a regular backup running, the backup script will unmount the USB stick after each backup so you have to mount it again
(this will be avoided as long as your have the directory \\METEOBRIDGE\data\USB opened in a WIndows File Explorer window)

the mkdir command will only need to be issued once - afterwards the created directory continues existing
"#" stands for the root prompt in the command window (CLI)

Re: Meteobridge RPi 4b USB storage

Posted: Wed Mar 15, 2023 9:56 pm
by jpouyaud2
hi
you can also make a script launched on the meteobridge:
1) it will backup your DB on the USB
2) it will then send your DB backup from USB to an external server with "scp"

some tweak will be needed for scp to work without password interactive needed (sshpass, and store your server hash in ~/.ssh/known_hosts.)

et voila !

cheers