[SOLVED] how to tranfer file @ boot via ftp on raspbian?
Linux - Embedded & Single-board computerThis forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I installed a camera on my raspberry pi.
It takes pictures via "motion" and avi files are created inn /home/pi/motion/video . you can find a good HowTo here http://jankarres.de/2013/12/raspberr...tion-tracking/
At each boot, I would like to tranfer all video files existing in that pi directory to /ftp://fritz.box/USBStickStorage/videofiles (fritz.box is my home router where an usb stick is attached) and delete them from the pi as soon the tranfer is successfully done. Has somebody any suggestion how to do it?
Attention: at boot, it takes approx 2 minutes before the raspberry pi is connecting to the home network via wifi; so, the copy/delete mechanism should not act immediatly at boot but wait till the raspberry is connected to the home network.
The next step could be: any new video should be copied to the home network then deleted if the copy was successfull.
As mentioned by the OP, his target device is a USB device attached to his router. A quick look at the documentation for a fritz.box would indicate that access to the storage is by FTP or "Media Server uPnP" only.
All file were transfered from my raspberry pi to the usb storage which is on my fritz.box router; alle files on the raspberry pi are deleted for more space.
Now, I will put that command in a cron job doing it every 2minutes; I will have a look for advice in the internet how to do it (I never used cron).
schneidz@xbmc:~$ tail .profile
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
(sleep 45 && /usr/bin/sshfs schneidz@mom:media/stuff hyper) &> /dev/null &
you can probably put the same in /etc/rc.local or add an @reboot entry in the users crontab.