Difference between revisions of "Dropbox Syncing"

From WebOS Internals
Jump to navigation Jump to search
m (Removed spam link from top of page)
 
(43 intermediate revisions by 4 users not shown)
Line 1: Line 1:
Page under construction
+
== 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.  It syncs to inbox/outbox folders in each direction.  The current version is not yet able to sync bidirectionally to the same folder, so inbox/outbox folders are used within a defined dropbox folder.
  
== Overview ==
+
[https://www.dropbox.com/referrals/NTM4MTI4OTY5 Signup free or see for more info on Dropbox.]
Dropbox is a service that allows syncing files/folders across many computers. This 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 dropbox installed and syncs the files to that PC's dropbox folder.
 
  
[https://www.dropbox.com/referrals/NTM4MTI4OTY5 Signup free here or see for more info.]
+
Coming soon: True bidirectional dropbox syncing to the same folder (have it working in a testbed). In the meantime, separate in/outbox syncing is stable.
  
 
== How this method works ==
 
== How this method works ==
This uses Xorg Tools to setup the configuration and installs the following tools...
+
This uses Xorg Tools to setup the configuration.
  
- Samba (filesharing)<br>
+
It uses existing cifs filesharing and rsync to perform the dropbox syncing.
- Optware (so that samba can be installed)<br>
 
- Cron (for scheduling)
 
  
It uses existing '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 (limited) is used to periodically check for dropbox updates.
  
 
== Requirements ==
 
== Requirements ==
Line 19: Line 19:
  
 
- A dropbox account with client running on a Windows PC<br>
 
- A dropbox account with client running on a Windows PC<br>
- Need to know the IP address of the PC with dropbox client<br>
+
- PC terminal access to phone, or webOS Quick Install<br>
 +
- Need to know the local IP address of the PC with dropbox client<br>
 
- Helps to know how to setup Windows print/filesharing<br>
 
- Helps to know how to setup Windows print/filesharing<br>
-- though the wizard walks you through setup
+
-- though the xt wizard walks you through setup
  
 
== How to install ==
 
== How to install ==
  
- Install Xorg Tools.  [http://www.webos-internals.org/wiki/Xorg_Tools_-_Power_Tools_for_Power_Users more on xorg tools here] <br>
+
'''Install Xorg Tools'''
>
 
  
 
Paste this in a terminal session or use webOS Quick Install Linux Command line...
 
Paste this in a terminal session or use webOS Quick Install Linux Command line...
  
 
<pre>
 
<pre>
cd /tmp && wget -qO- http://dl.dropbox.com/u/3812896/xt2.setup | /bin/sh
+
cd /tmp && wget -qO- http://dl.dropbox.com/u/3812896/xt.setup | /bin/sh
 
</pre>
 
</pre>
  
  
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...
  
In Terminal app or in a Terminal session...
+
- Run 'xt' from linux
  
- Run 'xt' from linux
+
xt
  
- plg) Plugin Menu
+
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.
  
- dbx) Dropbox Menu
+
'''Initial Setup'''
  
 +
- adv) advanced menu<br>
 +
- dbx) dropbox menu<br>
 
- dbi) dropbox initial setup
 
- dbi) dropbox initial setup
  
more later
+
Follow all instructions very carefully.
  
== Details on what is setup ==
+
Once installed, run a manual sync.
These are the configuration files involved if you want to make manual changes.
 
  
 +
'''Manual Sync'''
 +
 +
- adv) advanced menu<br>
 +
- dbx) dropbox menu<br>
 +
- dsn) dropbox sync now
 +
 +
If this is successful, setup scheduling.  If not successful, see Troubleshooting section below.
 +
 +
'''Scheduling'''
 +
 +
- adv) advanced menu<br>
 +
- dbx) dropbox menu<br>
 +
- sds) schedule dropbox sync
 +
 +
There is an issue with cron that it doesn't consistently run jobs when asleep.  It will sync when you use your phone or if charging.  Am working on it.
 +
 +
== 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:<br>
 +
/media/internal/dropbox/inbox<br>
 +
/media/internal/dropbox/outbox
 +
 +
Drop a file on webOS outbox and it will appear on Windows inbox.<br>
 +
Drop a file on Windows outbox and it will appear on webOS inbox.<br>
 +
 +
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'.  On XP, it might say 'allow user to have full access', that must be checked.  Must have read/write access to the share.<br>
 +
- Ensure the Windows backup folder sharename is 'webos'.  It must be named this.<br>
 +
- In Vista/Win7, go to Advance Settings in Share tab to create a new sharename.<br>
 +
- The Windows user account cannot have a space in the name or password.  If so, create a new Windows user/password with no spaces and re-run "backup initial setup".  <br>
 +
- If you have firewall software, you may need to open ports: 137-139, 445
 +
 +
== 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
 +
 +
== Layout Details ==
 +
These are the configuration/script files involved if you want to make manual changes.
 +
 +
/media/internal/xorgtools/etc/dropbox.cfg (stores ip, username, passwd, etc)<br>
 +
/var/spool/cron/crontabs/root  (cron schedling)<br>
 +
 +
/media/internal/xorgtools/dbx.mnu (the dropbox menu)<br>
 +
/media/internal/xorgtools/dbx (directory of dropbox scripts)<br>
 +
 +
== How to Remove ==
 +
 +
Remove the backup setup...<br>
 +
- adv) advanced menu<br>
 +
- dbx) dropbox menu<br>
 +
- rdb) remove all dropbox setup <br>
 +
 +
This remove the dropbox related entries in...<br>
 
/etc/fstab<br>
 
/etc/fstab<br>
 
/etc/hosts<br>
 
/etc/hosts<br>
 
/var/spool/cron/crontabs/root
 
/var/spool/cron/crontabs/root
 +
 +
You can re-install with 'dropbox initial setup' menu item.
 +
 +
== ToDos/Requests ==
 +
 +
Please post other ideas and feature requests here.
 +
 +
- Am working on bi-directional syncing to the same folder so that it doesn't need separate in/outbox folders. Have made some progress but it needs thorough testing.  May be a while before released.
 +
 +
== Alternate Methods/Other Platforms ==
 +
 +
I chose to do Windows/cifs because that is what most have available and most systems can be configured to use it.  This could be easily modified to use Mac/Linux rysnc by just using rsync daemon (cifs not necessary).  The sync scripts in /media/internal/xorgtools/plugins can be altered by likely just stripping out the cifs mounting and change the rsync command to talk to rsyncd on backup computer.  See [http://www.webos-internals.org/wiki/Xorg_Tools_-_Power_Tools_for_Power_Users Xorg Tools] page on how to modify plugins.
 +
 +
Mac filesharing setup can be found [http://www.webos-internals.org/wiki/Talk:Backup_Media_Drive_over_WiFi here].
 +
 +
== Credits ==
 +
 +
Thanks much to testers... Vincent Law, navinaq, Kyusaku
 +
[[Media:[[Media:foo.jpg]]]]

Latest revision as of 08:06, 5 June 2011

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. It syncs to inbox/outbox folders in each direction. The current version is not yet able to sync bidirectionally to the same folder, so inbox/outbox folders are used within a defined dropbox folder.

Signup free or see for more info on Dropbox.

Coming soon: True bidirectional dropbox syncing to the same folder (have it working in a testbed). In the meantime, separate in/outbox syncing is stable.

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 (limited) 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/xt.setup | /bin/sh


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

- Run 'xt' from linux

xt

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

- adv) advanced menu
- dbx) dropbox menu
- dbi) dropbox initial setup

Follow all instructions very carefully.

Once installed, run a manual sync.

Manual Sync

- adv) advanced menu
- dbx) dropbox menu
- dsn) dropbox sync now

If this is successful, setup scheduling. If not successful, see Troubleshooting section below.

Scheduling

- adv) advanced menu
- dbx) dropbox menu
- sds) schedule dropbox sync

There is an issue with cron that it doesn't consistently run jobs when asleep. It will sync when you use your phone or if charging. Am working on it.

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'. On XP, it might say 'allow user to have full access', that must be checked. Must have read/write access to the share.
- Ensure the Windows backup folder sharename is 'webos'. It must be named this.
- In Vista/Win7, go to Advance Settings in Share tab to create a new sharename.
- The Windows user account cannot have a space in the name or password. If so, create a new Windows user/password with no spaces and re-run "backup initial setup".
- If you have firewall software, you may need to open ports: 137-139, 445

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

Layout Details

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

/media/internal/xorgtools/etc/dropbox.cfg (stores ip, username, passwd, etc)
/var/spool/cron/crontabs/root (cron schedling)

/media/internal/xorgtools/dbx.mnu (the dropbox menu)
/media/internal/xorgtools/dbx (directory of dropbox scripts)

How to Remove

Remove the backup setup...
- adv) advanced menu
- dbx) dropbox menu
- rdb) remove all dropbox setup

This remove the dropbox related entries in...
/etc/fstab
/etc/hosts
/var/spool/cron/crontabs/root

You can re-install with 'dropbox initial setup' menu item.

ToDos/Requests

Please post other ideas and feature requests here.

- Am working on bi-directional syncing to the same folder so that it doesn't need separate in/outbox folders. Have made some progress but it needs thorough testing. May be a while before released.

Alternate Methods/Other Platforms

I chose to do Windows/cifs because that is what most have available and most systems can be configured to use it. This could be easily modified to use Mac/Linux rysnc by just using rsync daemon (cifs not necessary). The sync scripts in /media/internal/xorgtools/plugins can be altered by likely just stripping out the cifs mounting and change the rsync command to talk to rsyncd on backup computer. See Xorg Tools page on how to modify plugins.

Mac filesharing setup can be found here.

Credits

Thanks much to testers... Vincent Law, navinaq, Kyusaku [[Media:Media:foo.jpg]]