Loopion

NAS to FTP

Introduction

The purpose of this task came from a need I originally had. I was wondering if I could:

  1. Download via Bittorrent my movies I’ll would like to see
  2. When download complete it will be saved in /volume1/downloads/videos
  3. A crontab will take everyday my downloaded movies
  4. Send all movies to my Freebox HD (french provider box that can read many videos format)

So what we gonna do is proceed to an automatic file transfer with the FTP protocol from your NAS to your device (PMA, PS3, FAI Box, any thing that get a built in FTP server with write rule).

Procedure

  1. First, you need to need to apply the SSH patch to access your Synology NAS from a SSH terminal (like Putty for Windows users).
  2. We’ll need the IPKG Bootstrap from Maartendamen. To do so, follow carefully instructions on this article: Installing my ARM Marvell bootstrap
  3. When you are done with installing IPKG Bootstrap, you’ll need to download a specific package to get an FTP client on your Synology. To do so type the following command:Loopion> ipkg install http://ipkg.nslu2-linux.org/feeds/optware/syno-x07/cross/unstable/ncftp_3.2.2-1_arm.ipk
  4. Now that ncftp is installed we would be able to use ncftp command: ncftpput. After all test manually be executing the following command:Loopion> ncftpput -A -R -u yourlogin -p yourpassword ftp.yourhost.com "/Disque dur/Video" /volume1/downloads/*.aviThis command line will copy all files and directories from /volume1/videos/ to /Disque dur/videos by FTP. The -A option is mention to append files and the -R to make it all recursive.
  5. Finally, let’s schedule the task everyday at 6 PM to be sure that all our Divx are ready to be watched when you come home:vi /etc/crontab
    0 18 * * * ncftpput -A -R -u yourlogin -p yourpass hd1.freebox.fr "/Disque dur/Video" /volume1/downloads/*.avi

Customize

For more information about ncFTP you will find more information on this page.

If you would like to output all logs from your task just add >> /pathtoyourlog.txt to get a file with all logs

Another thing is that you can create a bash script to execute a bunch of commands like: extracting all rars videos, transferring your vids, delete them from your NAS, output all logs in a file and finally send a mail to know wich videos have been succefully uploaded.

Categories

About

Emmanuel Pays personal blog dealing with news and tips about Web 2.0, software, new technologies, ergonomic designs and hacks.

They help me to

Hotel Madrid
Bijoux diamant

Photos

Old women Metal worker Ricefield and red flowers Bird Wood carving (snake)

Loopion MixTape