motioneye-project/motioneye

Transfering incomplete files due to cron job

開放

#2,091 建立於 2021年4月7日

 (3 則留言) (0 個反應) (0 位負責人)Python (636 個分叉)batch import
Home Assistant addonhelp wantednotourproblemquestiontroubleshooting

倉庫指標

星標
 (3,533 顆星)
PR 合併指標
 (平均合併 16天 14小時) (30 天內合併 33 個 PR)

描述

motionEye Version | 0.42.1 Motion Version | 4.3.2 OS Version | Linux 5.4.83-v8 (docker / home assistant)

This is not an issue with Motioneye, as such more of a question. If this is not the right place I apollogise.

I have motioneye server running docker (home assistant) on a Rip 4, all file uploads to FTP, SFTP Google or dropbox, fail to work, which seems to be a Home assistant issue rather that a motioneye issue. But to get around the problem i have setup my system as follows.

3 slave RPi 0w (motioneyeOS latest), 1 Pi 4 master (in Docker/HomeAssistant), they save jpg and mp4 to a local Rpi 3 running openmediavault via SMB. This all works fine. from openmediavault, the files are sent foward to a remote server using rsync via a cron job on openmediavault.

This all works well unless there is a file being written when the cron job executes, in which case the file is sent incomplete to the remote server. I wanted to know if there is anyway to save the files with a diffent name until they comlete writing to the SMB attached storage. That way rsync will see the files as separate files and won't ignore complete files that were partially transfered duing the last cron job.

I hope I made sense.

貢獻者指南