× NETGEAR will be terminating ReadyCLOUD service by July 1st, 2023. For more details click here.
Orbi WiFi 7 RBE973
Reply

Solved: Is there an addon that can be used to download/ar...

BikeHelmet
Aspirant

Solved: Is there an addon that can be used to download/ar...

Hello everyone,

Is there an addon out there for my NV+ that can be used to download/archive a bunch of images from a website at regular intervals?

Someone I know has a webcam uploading photos to a website. It's on a 2 hour loop. I'd like to download all the images every 1-2 hours, then put together a video showing the days in highspeed. This requires saving the pictures every 1-2 hours to a unique folder. (preferably timestamped)

I can script it if necessary. The NV+ has wget and bash support right? But if anyone has any tips or pointers, please advise me before I spend effort on something that might be really simple. 🙂
Message 1 of 16
mdgm-ntgr
NETGEAR Employee Retired

Re: Is there an addon that can be used to download/archive?

I think doing your own script would be the way to go. You can use wget and create a folder with a timestamp in the name to contain the images.

You could write your script and run it using a cron script placed in /etc/cron.d

You'll need SSH access, available by installing the EnableRootSSH add-on for Sparc (NV+ is a Sparc ReadyNAS): http://www.readynas.com/?p=4203
Message 2 of 16
BikeHelmet
Aspirant

Re: Is there an addon that can be used to download/archive?

Alright. Time to brush up on my BASH. 🙂

What do scripts normally run under? Root? Full access to everything, so I can save the images to any share?
Message 3 of 16
sphardy1
Apprentice

Re: Is there an addon that can be used to download/archive?

Or you could use a Frontview backup job to simply copy the data to your NAS and then use any local machine with access to the NAS to manipulate the data.
Message 4 of 16
BikeHelmet
Aspirant

Re: Is there an addon that can be used to download/archive?

sphardy wrote:
Or you could use a Frontview backup job to simply copy the data to your NAS and then use any local machine with access to the NAS to manipulate the data.

Hmm? I'm not quite sure what you mean?
Message 5 of 16
mdgm-ntgr
NETGEAR Employee Retired

Re: Is there an addon that can be used to download/archive?

You enable FTP, Rsync or the like access to the files on your webserver, then go into Frontview (web-admin interface of the ReadyNAS) and create a backup job under Backup > Add a new Backup Job
Message 6 of 16
BikeHelmet
Aspirant

Re: Is there an addon that can be used to download/archive?

Can backup jobs automatically stick the files in a new timestamped folder every time? I've never looked into that feature.
Message 7 of 16
sphardy1
Apprentice

Re: Is there an addon that can be used to download/archive?

No - but you can implement a post processing script/app on your local network to do that, using any client and OS you choose, which is more the point.

Once you have the data locally, what you can do with it is unlimited, and you are not forced to just use bash scripting
Message 8 of 16
BikeHelmet
Aspirant

Re: Is there an addon that can be used to download/archive?

I think I'll just stick with BASH for getting the images. It keeps it all in a single script, which simplifies things.

Thanks for your help. I'll post back once I get it all working.
Message 9 of 16
BikeHelmet
Aspirant

Re: Is there an addon that can be used to download/archive?

Hi again,

My NAS ran out of space, so I had to put my plans on hold. But now that I've got more drives in there, I'm back at it.

The scripts are done. All that remains is setting up the cron job. One problem - I don't know how to do that? 😄

From putty:
ReadyNAS:/Webcam# crontab -e
no crontab for root - using an empty one
/bin/sh: line 1: /usr/bin/editor: No such file or directory
crontab: "/usr/bin/editor" exited with status 127
ReadyNAS:/Webcam#


So I gather there's no nano on my ReadyNAS? My Linux experience is limited to Ubuntu, which is a tad more userfriendly - from consulting man pages, I gather I somehow need to change the editor environmental variable to point to a text editor? What text editor is available on a ReadyNAS NV+, and how do I proceed with fixing this error message?
Message 10 of 16
sphardy1
Apprentice

Re: Is there an addon that can be used to download/archive?

Install apt from the readynas addons page, then

apt-get update
apt-get install nano
Message 11 of 16
BikeHelmet
Aspirant

Re: Is there an addon that can be used to download/archive?

Thank you. I should be able to figure out the rest. 🙂
Message 12 of 16
BikeHelmet
Aspirant

Re: Is there an addon that can be used to download/archive?

Well, I thought I'd be able to figure out the rest.

For whatever reason, my script isn't running at the specified time. I searched and found threads here saying that scripts couldn't have .sh extensions, had to be owned by root, etc.; I've corrected all that, and it still doesn't run.



Can you spot anything that I'm doing wrong? Maybe I should just run it hourly instead? (It'll use 3x the bandwidth and disk space, but oh well)
Message 13 of 16
BikeHelmet
Aspirant

Re: Is there an addon that can be used to download/archive?

Okay, so now I have three lines in Crontab

@hourly /bin/bash /Webcam/Cove/webcam_downloader.sh > /dev/null 2&>1
@hourly /Webcam/Cove/webcam_downloader.sh >/dev/null 2&>1
0 */3 * * * /bin/bash /Webcam/Cove/webcam_downloader.sh

None work. What am I doing wrong?

Setting up cron stuff on Ubuntu was trivial. There must be one tiny catch that's snagging it up?
Message 14 of 16
mdgm-ntgr
NETGEAR Employee Retired

Re: Is there an addon that can be used to download/archive?

Most likely an issue with the script. Did you remember to have an empty line at the bottom of the script?
Message 15 of 16
BikeHelmet
Aspirant

Re: Is there an addon that can be used to download/archive?

It appears I did remember to do that.

I'll write a simple testscript and try it out. touch /Webcam/Cove/testfile 😛

Edit: Got it figured out. It was bad `date *********` syntax. Odd that it worked fine when the script was manually invoked. ("bash scriptname")
Message 16 of 16
Top Contributors
Discussion stats
  • 15 replies
  • 1529 views
  • 0 kudos
  • 3 in conversation
Announcements