Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/laserborg/usb_dump
automatically copy data to USB on Raspberry Pi (lite)
https://github.com/laserborg/usb_dump
Last synced: 8 days ago
JSON representation
automatically copy data to USB on Raspberry Pi (lite)
- Host: GitHub
- URL: https://github.com/laserborg/usb_dump
- Owner: LaserBorg
- License: mit
- Created: 2024-09-15T13:47:23.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-09-15T20:42:12.000Z (4 months ago)
- Last Synced: 2024-11-15T19:21:51.798Z (2 months ago)
- Language: Shell
- Size: 17.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Dumping Data to USB Storage
The script installs **udevil** to mount USB devices since console-based OS (RPiOS lite) do not mount them automatically.
1. Enter the target directory, clone the repository and run the installer:
```
cd /home/pi
git clone https://github.com/LaserBorg/usb_dump
cd usb_dump
chmod +x install.sh && ./install.sh "$(pwd)"
```2. Create the config file:
```
echo '{"source_directories": ["/home/pi/Documents"], "target_root_directory": "Documents"}' > usbdump.json
```Note: The log file is located at `/tmp/usbdump.log`. If you want to change this, you'll need to update the `LOG_FILE` variable in the `usbdump.sh` script.
Troubleshooting:
- Check the log file:
```
tail -f /tmp/usbdump.log
```
- If the system isn't detecting USB drives, check the udev rule and systemd service for any errors.
- Ensure all paths in the scripts and service files are correct, especially if you've moved files to different locations.
- Check system logs for any errors: `sudo journalctl -u 'usbdump@*' -f`
- to manually mount/unmount a drive using udevil:
```
udevil mount /dev/sda1
udevil umount /dev/sda1
```