Difference between revisions of "Dropbox Syncing"

From WebOS Internals
Jump to: navigation, search
(Where to find your files on webOS)
Line 111: Line 111:
 
/etc/hosts<br>
 
/etc/hosts<br>
 
/var/spool/cron/crontabs/root
 
/var/spool/cron/crontabs/root
 +
 +
== How to Remove ==
 +
 +
I'll have a better way to remove in future version but here is a way in the meantime...
 +
 +
Remove the scheduling entry...<br>
 +
- plg) plugin menu<br>
 +
- dbx) dropbox menu<br>
 +
- sds) schedule dropbox sync
 +
- select 'r' to remove the cron entry
 +
 +
While this does nothing unless the manual sync or schedule is performed, you can edit this line out of...<br>
 +
/etc/fstab
 +
 +
Remove entire line that starts with..<br>
 +
//dropbox/webos
 +
 +
I'll have that automated in next version.
  
  

Revision as of 20:00, 1 February 2010

Overview

Dropbox is a service that allows syncing files/folders across many computers. Now there is a way to sync a webOS device to Dropbox. This is not a native dropbox client. It connects to a Windows PC that has a Dropbox client installed and syncs the files to that PC's dropbox folder.

Signup free here or see for more info on Dropbox.

How this method works

This uses Xorg Tools to setup the configuration.

It uses existing cifs filesharing and rsync to perform the dropbox syncing.

In a nutshell, it mounts a Windows fileshare specific to dropbox onto webOS device and uses rsync to sync. Cron scheduling is used to periodically check for dropbox updates.

Requirements

You need the following tools/knowledge to use this service...

- A dropbox account with client running on a Windows PC
- PC terminal access to phone, or webOS Quick Install
- Need to know the local IP address of the PC with dropbox client
- Helps to know how to setup Windows print/filesharing
-- though the xt wizard walks you through setup

How to install

Install Xorg Tools

Paste this in a terminal session or use webOS Quick Install Linux Command line...

cd /tmp && wget -qO- http://dl.dropbox.com/u/3812896/xt2.setup | /bin/sh


The menus are a mess right now. I'll be cleaning that up in time.

In Terminal app (available on Preware) or in a Terminal session...

- Run 'xt' from linux

Find the IP address of the computer with dropbox before continuing. If you don't know how to find the local IP address on your computer, this is not for you. Use the local IP address, not the WAN address. Best to start with local segment and then once working, tinker with router port forwarding to maybe use over EVDO and external WiFi.

Initial Setup

- plg) plugin menu
- dbx) dropbox menu
- dbi) dropbox initial setup

Follow all instructions very carefully.

Once installed, run a manual sync.

Manual Sync

- plg) plugin menu
- dbx) dropbox menu
- dsn) dropbox sync now

You may see an error about the "outbox", which is OK. It just means there are no files in there yet - (fixed in next version). If this is successful otherwise, setup scheduling.

Scheduling

- plg) plugin menu
- dbx) dropbox menu
- sds) schedule dropbox sync

Using the Inbox/Outbox Folders

This method cannot sync dropbox in both directions to the same folder so inbox and outbox folders are created.

webOS inbox and outbox locations:
/media/internal/dropbox/inbox
/media/internal/dropbox/outbox

Drop a file on webOS outbox and it will appear on Windows inbox.
Drop a file on Windows outbox and it will appear on webOS inbox.

To delete files, you must do it from the outbox side. If you delete from the inbox side, it will be updated again. I hope to find a way around this in a future release.

Use Internalz app (available on Preware) to manage moving files/folders in and out of dropbox.

Troubleshooting

Permission Errors

If you get permission errors when doing a manual sync, check the following...

- Make sure the Windows backup folder share has 'full control'. Must have read/write access to the share.
- Ensure the Windows folder _sharename_ is 'webos'. It must be named this.
- The Windows user account cannot have a space in the name or password. If so, create a new Windows user with no space/password and re-run backup initial setup.

Caveats

- The username and password on the Windows PC cannot have any spaces. You'll need to use or create an account on Windows that has no spaces for the user id and password.

- The username/password of the Windows PC appear in /etc/fstab. Anyone know how to hide this?

- It turns out that webos kernel has built in cifs support and samba is not needed. If you were an early tester and installed samba (on or before Jan 31), you can remove unless you're using for other reasons.

ipkg-opt remove samba

Details on what is setup

These are the configuration files involved if you want to make manual changes.

On the webos device:

This is where to drop off or pickup dropbox files on webos:
/media/internal/dropbox/inbox
/media/internal/dropbox/outbox

Edited:
/etc/fstab
/etc/hosts
/var/spool/cron/crontabs/root

How to Remove

I'll have a better way to remove in future version but here is a way in the meantime...

Remove the scheduling entry...
- plg) plugin menu
- dbx) dropbox menu
- sds) schedule dropbox sync - select 'r' to remove the cron entry

While this does nothing unless the manual sync or schedule is performed, you can edit this line out of...
/etc/fstab

Remove entire line that starts with..
//dropbox/webos

I'll have that automated in next version.


ToDos/Requests

Looking for help on triggering the sync when a file changes in /media/internal/dropbox/outbox. It can likely be done with Upstart inotify but I'm not too up on Upstart. Could use some help. - pm me at precentral - xorg.

Please post other ideas and feature requests here.

Alternate Methods/Other Platforms

I chose to do Windows/cifs because that is what most people have available. This could be more easily ported to Mac/Linux by just using rsync (cifs not necessary) in both directions setting up in/outbox as described above.

Credits

Thanks much to testers... Vincent Law, navinaq, Kyusaku