I use my raspberry pi to collect pictures, movies via motion and the raspberry camera (Home surveillance). When the pictures are made, I want to move them to some cloud solution so that they are offsite, off the deveice and I can look at them from everywhere at anytime when needed. And thus keeping as little as possible of the images (data) on the raspberry pi.
I found a few sites on the PI and Cloud:
- https://coderwall.com/p/rwxnma/how-to-install-copy-com-on-a-headless-linux
- http://www.sbprojects.com/projects/raspberrypi/webdav.php
- http://pikiosk.tumblr.com/post/39853365308/raspberry-dropbox-sftp-mac
But that are all sync solutions, and as far as I could find there was not the mention of a move command. Mapping a remote folder alone is not enough because what then happens when for an hour there is no internet on the PI? Perhaps a local script that moves stuff to a mapped folder? I don't know..
The question(s)
- Is moving files without syncing via a deamon on the Pi to the cloud possible?
- and if yes, for what option and solution should I search? Because until now my google queries do not find what I need.
-
1In the old days, before we called off-site storage "the cloud" we used such tools as ftp.joan– joan2015年03月28日 12:53:25 +00:00Commented Mar 28, 2015 at 12:53
-
in the current days we outsource the thinking about storage space, uptime and gallery/album/user_access integration :)Edzob– Edzob2015年03月29日 09:54:35 +00:00Commented Mar 29, 2015 at 9:54
-
@Edzob speak for yourself :)jDo– jDo2016年03月19日 15:45:18 +00:00Commented Mar 19, 2016 at 15:45
4 Answers 4
I think that you have to map/mount the cloud drive. If it supports webdav or other common file transfer protocols you could do that. Then setup a mv cron job. http://www.linuxquestions.org/questions/linux-software-2/using-crontab-to-move-files-636271/
-
I found some tutorials on how to do this (dav2fs + rsync + list of cloud providers that support webdav) .. what is best practice? 1. To add the links in the comments or 2) to write an answers with the links and steps?Edzob– Edzob2015年03月29日 09:27:19 +00:00Commented Mar 29, 2015 at 9:27
Moving a file across filesystems requires two things:
- The file be copied from the source to the destination.
- The source file is then unlinked, meaning, removed from the filesystem indexing. On normal filesystems the data isn't actually erased, which is why if you want to make sure it is really gone you have to shred or zero the free space on the drive.
That last step is trivial. If those sync systems provide a "no delete" option on the destination, so you can copy all the files and then delete them yourself and not worry about them being erased on the destination next time you sync, there's not a problem.
Take a look at Amazon S3 Tools - they are command line AND S3 protocol is widely supported
rclone is reported to do exactly what you want. It has ARM support and it will do a copy or copy of new/changed files and a one-way sync. Works with multiple cloud vendors as well as local file systems. http://rclone.org/
-
Unfortunately, this answer does not answer the question - the OP wants to move, not copy (or sync), files. The link, that you provide, does not mention moving files at all.2016年03月19日 00:25:32 +00:00Commented Mar 19, 2016 at 0:25
Explore related questions
See similar questions with these tags.