Synchronization software for transferring files and reporting errors. The code monitors a specified directory for new files and uses rsync to transfer them to a destination location, with the option to use SSH. On the destination, it organizes files into date-sorted folders. The code also includes error handling and logging via Telegram messages. Runs/tested on Linux and Mac.
Needed python packages:
conda install requests
Before running the script, create a file called user_config.py in the same directory as imgstorage.py. This file allows you to override the default values provided in default_config.py. The script will first attempt to load settings from user_config.py, and if not found, it will fall back to default_config.py.
Once you’ve configured your user_config.py file, run the script with:
python imgstorage.py
A typical workflow involves first starting the video recording software, such as bb_imgacquisition or bb_raspicam, which will save the recorded videos to the operating system's drive (e.g., an SSD).
While recording is running, use bb_imgstorage_nfs
to transfer the saved files to the desired storage location. Common use cases include:
- Transfer to Network-Attached Storage (NAS):
E.g., a network-attached storage device that is mounted locally via NFS or CIFS. - Transfer to Another Computer or Location on the Network Using SSH:
- Transfer to a Locally-Attached Hard Drive: