Setting Google Drive Sync to certain times in the day

685 views
Skip to first unread message

Pete Diemer

unread,
Apr 6, 2020, 5:28:13 PM4/6/20
to motioneye
The internet connection used for uploading media files at my location is very slow. I'd like to schedule the uploading of videos to Google Drive during the evening/night, when fewer users are on the the network. Otherwise, the network gets bogged down by the constant need to upload motion-activated videos. I understand there is the ability to only do motion triggering during a work schedule, but we'd like to capture all motion events, even during regular work hours. 

The only option I could find to possibly help would be with Cron, but I am not very familiar with how this works. Could someone please help me out with this? I currently have 4 cameras, each running on it's own Raspberry Pi 4 (2gb) with MotionEyeOS with one of the Pi's being used as a central hub for the other feeds. They are each connected by ethernet through switches and currently each have a 32gb microSD card for local storage. I have the storage set to rollover after 3 days.

Thank you!
Pete

Kevin Shumaker

unread,
Apr 6, 2020, 5:40:11 PM4/6/20
to Pete Diemer, motioneye
Basically you'd want to write a script, to either mv (move) or cp (copy) the files up to the GDrive.
It could be as simple as
cp -r /data/media/ /path to gdrive/
or
mv /data/media /path to gdrive/
then you'd add a line to crontab like
* 1,2,3,4,22,23 * * * /bin/bash /data/usr/file_mover.sh
I am not in a position to write it up for you, right now, but there are a lot of resources out there.



--
You received this message because you are subscribed to the Google Groups "motioneye" group.
To unsubscribe from this group and stop receiving emails from it, send an email to motioneye+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/motioneye/0a8ce115-8ead-494c-9c97-0c799121bbe0%40googlegroups.com.


--
Thanks

Kevin Shumaker


N38° 19' 56.52"
W85° 45' 8.56"

Semper Gumby
“Don't tell people how to do things. Tell them what to do and let them surprise you with their results.” - G.S. Patton, Gen. USA
Ethics are what we do when no one else is looking.
Quis custodiet ipsos custodes?
“There is no end to the good you can do if you don’t care who gets the credit.” - C Powell
You know we're sitting on four million pounds of fuel, one nuclear weapon and a thing that has 270,000 moving parts built by the lowest bidder. Makes you feel good, doesn't it?

Pete Diemer

unread,
Jun 10, 2020, 1:51:35 PM6/10/20
to motioneye
Kevin, thank you for your reply. Sorry I didn't follow up for a couple months!

I'm not familiar enough with how the current gdrive uploading works. Would I need to disable the built-in option so it wouldn't conflict with what I'm trying to accomplish? Do you know if I could then just use the process described here: https://github.com/ccrisan/motioneyeos/issues/4  ? Then adjust the crontab to run the sync.sh during the desired hours?

Otherwise, I didn't know where the gdrive directory is located in order copy the files over. Would simply copying files from the output directory over create duplicate uploads or would it work as a sync instead? 

I'm learning as I go along, so I apologize for my novice questions. I greatly appreciate any help!

Thanks,
Pete


On Monday, April 6, 2020 at 5:40:11 PM UTC-4, StarbaseSSD wrote:
Basically you'd want to write a script, to either mv (move) or cp (copy) the files up to the GDrive.
It could be as simple as
cp -r /data/media/ /path to gdrive/
or
mv /data/media /path to gdrive/
then you'd add a line to crontab like
* 1,2,3,4,22,23 * * * /bin/bash /data/usr/file_mover.sh
I am not in a position to write it up for you, right now, but there are a lot of resources out there.



On Mon, Apr 6, 2020 at 5:28 PM Pete Diemer <die...@gmail.com> wrote:
The internet connection used for uploading media files at my location is very slow. I'd like to schedule the uploading of videos to Google Drive during the evening/night, when fewer users are on the the network. Otherwise, the network gets bogged down by the constant need to upload motion-activated videos. I understand there is the ability to only do motion triggering during a work schedule, but we'd like to capture all motion events, even during regular work hours. 

The only option I could find to possibly help would be with Cron, but I am not very familiar with how this works. Could someone please help me out with this? I currently have 4 cameras, each running on it's own Raspberry Pi 4 (2gb) with MotionEyeOS with one of the Pi's being used as a central hub for the other feeds. They are each connected by ethernet through switches and currently each have a 32gb microSD card for local storage. I have the storage set to rollover after 3 days.

Thank you!
Pete

--
You received this message because you are subscribed to the Google Groups "motioneye" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moti...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages