Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write a script to sync video from storage card to external FTP server #3

Open
JayGoldberg opened this issue Aug 4, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@JayGoldberg
Copy link
Owner

Since the camera is usually behind a NAT, it would be better to sync the contents of /mnt/alarm_record_dir/ to an external server. This way we can sync and clear the storage card without having to have physical access to the camera and remove the TF card.

It would be kicked off from a daemon-like shell script (( cd /; umask 0; setsid your_script.sh </dev/null &>/dev/null & ) &), and be intelligent about what files have already been synced.

Could use a text filelist to track it, or a simple key/value store like db.sh using hashed filenames and timestamp.

Would be good to have throttling of the bandwidth as well so we don't affect live viewing.

Running it on a schedule (like sleep 600) is fine, but wouldn't it be nice to use inotify?

And also some facility to notice when a sync has not been done recently.

@JayGoldberg JayGoldberg added the enhancement New feature or request label Aug 4, 2021
@JayGoldberg JayGoldberg changed the title Write a script to FTP sync to a Write a script to sync video from storage card to external FTP server Aug 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant