Possible?: Script to copy from camera to volume ?

Status
Not open for further replies.

jeffsimply

Cadet
Joined
May 22, 2015
Messages
8
Hi guys, (question at the bottom if you want to skip my intro)

New to FreeNAS.org and just got my HDDs delivered to put in my first home NAS.

I've gone for a basic setup, but already imagining the realms of the possible with potential future setups. My hardware is:

Intel G3220 Pentium
MSI B85i
8GB RAM
Various gigabit switches around my house with lovely thick CAT6 cables running under the carpets (can definitely tell, but the GF hasn't noticed/told me off).

Some non-branded NAS case, with 4x lockable HDD trays in the front which currently have:

2x old 2TB drives I had in my PC beforehand
2x new HGST 3TB NAS drives.

I'm in the process of setting everything up, and just wanted to post an intro and ask a question:

Question: Is it possible to plug in USB devices such as cameras/usb drives etc into a FreeNAS computer?

If that is possible, then it must then be possible to create a job that moves/copies all data from that USB mount onto a freenas volume...

My idea being, have the box sat in my hall near the phone/key pot/shoes etc and be able to just plug a camera into the box after a day out filming/shooting and have it automatically remove everything from the camera and onto a drive I can then access from any of the other computers?

Sound good?

Best regards,

Jeff
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Well, it is possible to do. Nobody here will disagree with that. But I don't think it's something that is easy to do, or recommended.

For example, each time you plug in a device, it's device may change. So you have to write a script that would dynamically figure out which device to use, and then use it properly. You may have problems mounting things like NTFS and FAT32. Support for both (which is what 99% of cameras use) is basically "semi-reliable" at best.

Personally, I'd just copy the files off the memory stick manually.

If you want to be a pimp.. buy one of these... http://www.eyefi.com/

If setup properly, you can seamlessly receive the pictures from your camera to your desktop/laptop, which can save the pictures to your server automatically and without wires. All you do is turn the camera on and the camera will automatically upload the pictures. I have one and it works very well. ;)
 
Joined
Dec 26, 2013
Messages
18
I've been experimenting with a system that does something similar.

I have a headless Raspberry Pi on my nightstand, and plug my camera phone in to charge every night. The Raspberry Pi's USB port charges the phone, and a cron job on the Pi kicks off at 03:00 to mount the cameraphone's file system and rsync all the photos, videos, and audio recordings to a folder on my FreeNAS. I've had trouble with rsyncing data on FreeNAS in the past (Cyberjock says not to do it) but it seems to work well enough for images and videos and recordings.

The advantages are that the Pi sips tiny amounts of power, so I don't feel bad about leaving it on all the time. The cron job can send an e-mail notification when it's done. One day I'd like to have it send a list of the photos and videos with thumbnail images, just for fun.

You could look into building something similar if you want a convenient way to sync your stuff to a FreeNAS folder.


Steve.
 
Joined
Jan 9, 2015
Messages
430
As for phones and tablets you could use BTSYNC plugin, but that wouldn't work for the camera though.
 
Joined
Dec 26, 2013
Messages
18
Yeah, I tried a few sync apps for iOS, including the BitTorrent Sync app, but if memory serves me correct, it doesn't perform background syncing. So you need to open the app and leave it open for long enough for it to sync the photos and videos, every time you have something new to sync, which obviously isn't very convenient. The Dropbox app worked better, and would sometimes catch up with my latest photos, but I quickly ran out of my 8 GB Dropbox space allocation. It was the same story with the Microsoft SkyDrive/OneDrive app. Neither BitTorrent Sync, OneDrive, nor Dropbox would back up audio recordings.
 
Joined
Jan 9, 2015
Messages
430
I can't speak for iOS, but pairing the FreeNAS with my Andriod phone it works in the background just fine. BTSync has been going through some growing pain too. Might have caught them at a bad time.
 

jeffsimply

Cadet
Joined
May 22, 2015
Messages
8
I've been experimenting with a system that does something similar.

I have a headless Raspberry Pi on my nightstand, and plug my camera phone in to charge every night. The Raspberry Pi's USB port charges the phone, and a cron job on the Pi kicks off at 03:00 to mount the cameraphone's file system and rsync all the photos, videos, and audio recordings to a folder on my FreeNAS. I've had trouble with rsyncing data on FreeNAS in the past (Cyberjock says not to do it) but it seems to work well enough for images and videos and recordings.

The advantages are that the Pi sips tiny amounts of power, so I don't feel bad about leaving it on all the time. The cron job can send an e-mail notification when it's done. One day I'd like to have it send a list of the photos and videos with thumbnail images, just for fun.

You could look into building something similar if you want a convenient way to sync your stuff to a FreeNAS folder.


Steve.
That's bloody brilliant Steve!
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
I don't say "not to do it". rsync has some major limitations and pitfalls. Things like complex ACLs, in-use files, the fact that rsync is single threaded are all major contributors to end-users having problems.

Given a choice, I'll avoid rsync whenever I can. I'd rather do cp than rsync since cp doesn't have some of the same problems. ;)
 
Status
Not open for further replies.
Top