IsSuE
Posts: 11
Joined: Tue Jun 05, 2012 10:56 am

Dropbox-like filecloud

Tue Jun 05, 2012 11:08 am

Hi!

Will receive my RPi today and I want to set up a dropbox like sync between my computers.
So basically what I want is: folder A ond machine A is synced, so whenever I change files in that direcory they get synced to my RPi. When machine B now comes online, it should sync all the files from folder A.

Is owncloud the program I am looking for?

-Armin

obarthelemy
Posts: 1399
Joined: Tue Aug 09, 2011 10:53 pm

Re: Dropbox-like filecloud

Tue Jun 05, 2012 1:27 pm

No need to go to the cloud to set up a sync between 2 local folders (and Dropbox is not available on the PI, nor is anything similar yet, though Ubuntu's stuff looks like it *might* be portable)

First, you want to make sure both folders are shared on the network. The Pi uses Samba to share its folders, and /mount with the appropriate parameter to access the folder on the other PC (probable ntfs-3g if the other machine runs Windows)

Second, you use rsync inside a cron job to synchronize both directories every few minutes after checking that both are available.

That's it.

A few remarks though. Depending of the volume and type of data, I find synching 2 local dirs a bit weird:
- If you want backups, you should rather pack and archive by date.
- If there's lots of stuff, you may want to just have 1 copy shared on an always-on server.
- if you want remote access (non-LAN), you can do pretty much the same thing I described via an FTP server, your ISP usually provides some FTP storage.

IsSuE
Posts: 11
Joined: Tue Jun 05, 2012 10:56 am

Re: Dropbox-like filecloud

Tue Jun 05, 2012 1:35 pm

Looks like I specified what I want not 100% :)
I want this to work "just the way dropbox does". So if I am not home, I want to access my files via a tool or a webinterface. I also want other people to be able to use my synced folder.

Use for this is, that when I work at home, I have all my documents and stuff on my local machine. When I leave home for university or work I want my laptop to sync up with the stuff I did back home and continue working.

Hope you understand what I mean :)

(Btw all my machines run Linux)

yntelectual
Posts: 3
Joined: Mon Jun 04, 2012 7:20 pm

Re: Dropbox-like filecloud

Tue Jun 05, 2012 1:55 pm

Have a look at OwnCloud its opensource project that provides easy file synchronization and cloud like functionality just like dropbox.
http://owncloud.org/

orcusomega
Posts: 8
Joined: Tue Jun 05, 2012 6:52 pm

Re: Dropbox-like filecloud

Tue Jun 05, 2012 6:53 pm

I can confirm this works - I am using my RPi as an owncloud server with the clients on my laptops - not SO crazy about the web interface (I am a Dropbox user as well) but it is a poor man's backup :)

broo0ose
Posts: 317
Joined: Wed Dec 14, 2011 3:59 pm
Location: Wirral, UK

Re: Dropbox-like filecloud

Tue Jun 05, 2012 8:58 pm

orcusomega wrote:I can confirm this works - I am using my RPi as an owncloud server with the clients on my laptops - not SO crazy about the web interface (I am a Dropbox user as well) but it is a poor man's backup :)
Reading the webpage, I see that you can access ownCloud using WebDAV. This means that the ownCloud share can seen in your standard file system interface which might be better for you.

obarthelemy
Posts: 1399
Joined: Tue Aug 09, 2011 10:53 pm

Re: Dropbox-like filecloud

Wed Jun 06, 2012 12:51 am

I must be dumb, I still don't see why good old FTP can't do it. All web browsers I know can also browse an FTP server, and FTP clients often have a sync function on top of the upload one. Nevermind, do the cloud thing. The whole thing reminds me of when I was told that FTP was unsafe, so docs *had* to be sent via email.

User avatar
willhelm
Posts: 2
Joined: Mon Jun 04, 2012 6:00 pm

Re: Dropbox-like filecloud

Wed Jun 06, 2012 7:29 pm

obarthelemy wrote:I must be dumb, I still don't see why good old FTP can't do it. .
Beacuse WebDAV is much easier to use and WebDAV clients are integrated into the file system on Mac, Linux, and Windows. You can also install WebDAV clients on iphones, androids, etc. You use WebDAV just like you use any other network drive.

FTP only works for file transfers. With WebDAV, files can be edited directly on the server.

You should read the FTP comment on the following page (Are you a caveman?) :lol: :
http://barracudaserver.com/products/Bar ... er.lsp#FTP

BTW, read the following if you want to use the BarracudaDrive WebDAV server on the Raspberry Pi:
http://barracudaserver.com/products/Bar ... aspberrypi

Jancis
Posts: 25
Joined: Thu Jan 26, 2012 3:54 pm

Re: Dropbox-like filecloud

Sat Jun 09, 2012 11:44 am

how well does raspi work with owncloud? web interface, is it snappy? i was looking at it before, but didn't dare to use it yet :)

i am using different approach for this - i installed git on raspi and use as ssh+git server with ssh private keys. application for desktop is sparkleshare, check it out, might be exactly what you asked.

IsSuE
Posts: 11
Joined: Tue Jun 05, 2012 10:56 am

Re: Dropbox-like filecloud

Sat Jun 09, 2012 12:04 pm

I installed owncloud on Arch on my RPi.
Works pretty well so far. Only tried it with a couple of files though. As client i use csync-owncloud with the owncloud-client.

The webinterface seems to work fine for me, not sluggish or anything.

Sparkleshare sounds interesting, thanks for that!

orcusomega
Posts: 8
Joined: Tue Jun 05, 2012 6:52 pm

Re: Dropbox-like filecloud

Mon Jun 18, 2012 10:30 pm

Jancis wrote:how well does raspi work with owncloud? web interface, is it snappy? i was looking at it before, but didn't dare to use it yet :)

i am using different approach for this - i installed git on raspi and use as ssh+git server with ssh private keys. application for desktop is sparkleshare, check it out, might be exactly what you asked.
It's plenty snappy - not the fastest, but I have no complaints. Right now I am using it as a ghetto backup solution - sync files from my PC to the RPi just as a VERY basic backup, but I can see it growing more and more in the future.

Since I do a lot of photos, it looks like this would be a good way to keep a mirror of a local directory on a separate box.

Killerbee
Posts: 62
Joined: Tue Sep 20, 2011 6:38 pm

Re: Dropbox-like filecloud

Tue Jun 19, 2012 8:23 am

Hello Guys

What kind of webserver are u using with owncloud on your PI? I used lighthttpd and it's not so snappy :(
Browsing folders takes a 6~10 seconds. FastCGI processes pushing my CPU to 100%
I am using raspbian.

Any suggestions?

KB

victagayun
Posts: 127
Joined: Sun Apr 15, 2012 4:01 pm
Contact: Website

Re: Dropbox-like filecloud

Thu Oct 04, 2012 5:24 am

hello guys,

i am coming from windows and i know how to use dropbox.
to use dropbox, i just run the exe file and the setup will follow like:
username and password, folder location etc...
is it the same as ownCloud?
from what i see in the website, i need to install a webserver which i havent explored yet.

apt-get install apache2 php5 php5-json php-xml php-mbstring php5-zip php5-gd
apt-get install php5-sqlite curl libcurl3 libcurl3-dev php5-curl php-pdo

is there an easy setup similar to dropbox which doesnt need a webserver?

hoping for you kind response.

Borner
Posts: 49
Joined: Tue Sep 25, 2012 2:53 pm
Location: .de

Re: Dropbox-like filecloud

Thu Oct 04, 2012 9:22 am

to use dropbox, i just run the exe file and the setup will follow like:
username and password, folder location etc...
is it the same as ownCloud?
it's more easy, using windows viste / 7 : simply add your Cloud as an network drive/ share, assing an drive letter an use it (nearly) like an local drive
This works, because you can access owncloud using webDav protocol.

there are a lot of tutorials in the web, like this: http://www.chrisk.de/blog/2008/11/how-t ... ows-vista/

-borner-

victagayun
Posts: 127
Joined: Sun Apr 15, 2012 4:01 pm
Contact: Website

Re: Dropbox-like filecloud

Thu Oct 04, 2012 10:00 am

hello borner,
thanks for the reply.
what i meant is that,dropbox is very easy to use than owncloud.
to setup owncloud in raspi,
owncloud needs to setup a webserver first, as per their website. do i need to setup a webserver? is it nessesary?
what if i skip setting up a webserver?
i havent tried setting up a webserver before,i only know how to setup samba in raspi.
are there any easy setup for cloud storage for raspi?

Borner
Posts: 49
Joined: Tue Sep 25, 2012 2:53 pm
Location: .de

Re: Dropbox-like filecloud

Thu Oct 04, 2012 10:35 am

owncloud needs to setup a webserver first, as per their website. do i need to setup a webserver? is it nessesary?
yes, it is.
the webserver is the door to your raspberry. Without webserver, the "owncloud" istallation is nothing more the a bundle of skripts, written in the programmer language php. Therfore you have to setup an webserver (like apache) which is able to execute php skripts.

Everythink you have to install are the follownig packages:

Code: Select all

apt-get install apache2
apt-get install sqlite
apt-get install php5 php-xml-serializer php5-gd php5-sqlite
apt-get install php-pear php-apc php5-curl
than add a file: /etc/apache2/sites-available/cloud with this content:

Code: Select all

<VirtualHost *:81>
       ServerName cloud.ltd
       ServerAdmin [email protected]
       DocumentRoot /var/www/cloud/
       <Directory /var/www/cloud/>
               Options Indexes FollowSymLinks MultiViews
               AllowOverride all
               Order allow,deny
               allow from all
       </Directory>
       ErrorLog /var/log/apache2/error.owncloud.log
       LogLevel warn
       CustomLog /var/log/apache2/access.owncloud.log combined
       ServerSignature On
</VirtualHost>
... where /var/www/cloud/ is the place where your extract the owncloud download
now look if the follwoing lines are part of the file /etc/apache2/ports.conf

Code: Select all

NameVirtualHost *:81
Listen 80
Listen 81
Next is: download and extract owncloud

Code: Select all

cd /var/www
 wget http://owncloud.org/releases/owncloud-latest.tar.bz2
 tar -xjf owncloud-latest.tar.bz2
 mv owncloud cloud
 rm owncloud-latest.tar.bz2
now: add an directory, where you store the files (must be called data)
and change rights:

Code: Select all

 mkdir /var/www/cloud/data/
 chown -R www-data:www-data /var/www/cloud/config/
 chown -R www-data:www-data /var/www/cloud/apps/
 chown -R www-data:www-data /var/www/cloud/data/
finaly enable the apache virual host for owncloud and (re)start the apache to load all the new setting

Code: Select all

a2ensite cloud
service apache2 reload
a2enmod rewrite
a2enmod headers
service apache2 restart

...i think... that's it!

pwinwood
Posts: 76
Joined: Mon Jul 02, 2012 2:21 am
Location: Oxford, England

Re: Dropbox-like filecloud

Thu Oct 04, 2012 10:47 am

FWIW, I use Box.com with WebDav to do this. It syncs with all my devices including the Pi.

victagayun
Posts: 127
Joined: Sun Apr 15, 2012 4:01 pm
Contact: Website

Re: Dropbox-like filecloud

Thu Oct 04, 2012 11:01 am

hello pwinwood,
would you like to share how to setup box.com or could you point me the reference to read?
thanks!

JungleBoogie
Posts: 35
Joined: Thu Sep 06, 2012 12:06 am
Location: Simi Valley, California
Contact: Website Yahoo Messenger AOL

Re: Dropbox-like filecloud

Thu Oct 04, 2012 9:34 pm

If you're looking for a secure backup "to the clouds", you can check out www.tarsnap.com

I'd advise just to keep the private key off of the pi.
Happy Hacking!

gosy
Posts: 4
Joined: Fri Oct 26, 2012 2:57 am

Re: Dropbox-like filecloud

Sat Oct 27, 2012 12:27 pm

For thoose who's having problem installing ownCloud, they have put togheter their own installation setup step-by-step on their official webpage.

Check it out.

http://owncloud.org/support/install/

Borner
Posts: 49
Joined: Tue Sep 25, 2012 2:53 pm
Location: .de

Re: Dropbox-like filecloud

Sat Oct 27, 2012 9:12 pm

Hi gosy,

the point is, that this official owncloud tutorial not works (at all aspects) on an raspberry.
For example the package php5-zip (and other) are not part of the raspbian distribution.

Therefore simply follow me step-by-step guide some posts above, which will result in an working owncloud installation.

gosy
Posts: 4
Joined: Fri Oct 26, 2012 2:57 am

Re: Dropbox-like filecloud

Mon Oct 29, 2012 12:29 am

Ah oki! Thanks for the heads up Borner.. Didn't know that, and i'm kinda really new to the raspbian ( linux ) OS

goci
Posts: 12
Joined: Thu May 16, 2013 8:22 pm

Re: Dropbox-like filecloud

Fri May 17, 2013 11:53 am

Have you guys set up SparkleShare as a daemon in CLI?

What about iFolder? It seems it's just for Suse now, but there is some old source code available.

silverfun
Posts: 1
Joined: Thu May 30, 2013 4:45 pm

Re: Dropbox-like filecloud

Thu May 30, 2013 4:51 pm

Have you tried to setup Bit Torrent Sync? I have this setup at my house right now using a Raspberry Pi and a Mac (Mountain Lion). I have two folders on the Pi one Incoming (from Mac) and one Sharing(who ever I share my Read Only key with. I place file(s) or folder(s) in my shared folder on my mac which will sync to the Pi, then the pi will cut and paste the file to the Sharing folder for others to have. You can skip the dual folder setup by just browsing to the sharing folder on the Pi.

This has been great. You can set up what you want to have buy just having one folder. Follow the instructions here -> http://blog.bittorrent.com/2013/05/23/h ... pberry-pi/

I skipped the Own cloud setup as bit Torrent Sync has its own web interface and I did not care about accessing from home.

User avatar
RTL
Posts: 30
Joined: Tue Jan 15, 2013 6:05 pm
Location: California
Contact: Website

Re: Dropbox-like filecloud

Thu May 30, 2013 11:59 pm

obarthelemy wrote:I must be dumb, I still don't see why good old FTP can't do it. All web browsers I know can also browse an FTP server, and FTP clients often have a sync function on top of the upload one. Nevermind, do the cloud thing. The whole thing reminds me of when I was told that FTP was unsafe, so docs *had* to be sent via email.
It's just a buzz word and an FTP server can be considered a cloud service.

FTP is a bit old and the WebDAV protocol is easier to use since most operating systems support it in the file system. This means you can mount/map it as a drive from your client computer.

The following video shows how to use WebDAV from the client:
http://youtu.be/i5ubScGwUOc

One of the easier to use WebDAV servers for RPI is BarracudaDrive:
http://barracudadrive.com/RaspberryPi.lsp

Return to “Networking and servers”