Setting up Dropbox on Pinephone


DropBox is not natively available for aarch64/arm64, which presents a pain point for Pinephone users. Bananas, right? As a workaround, these instructions walk through setting up Rclone with Rclonesync to create a bidirectional sync with Dropbox on demand. Assumes a Pinephone Beta 2 running Manjaro.

⚠️OUT OF DATE⚠️

rclone now directly supports bidirectional syncing. Instead of setting up Rclonesync, you can create a script like mine:

#### bisync.sh start
#!/bin/sh

rclone bisync $1 --filters-file /home/user/dropbox-filter.txt dropbox-pine:/ ~/dropbox/

#### bisync.sh end

Assumptions

Initial setup:

These steps will get you up and running with Rclone and Dropbox.

Test (Optional)

Perform a dry run test to see if Rclone is talking to Dropbox.

Set up RcloneSync

⚠️OUT OF DATE⚠️: See above

Set up Rclonesync for bidirectional syncing between the Pinephone and desktops.

Repeat results with an alias

If you only want to sync one path from Dropbox, we can take the easy way out here. I’ll just make an alias for convenience to run the necessary command:

How do I sync multiple specific paths (like Selective Sync)?

We can use the filters-file option to control what is, and is not, synced under a new path. This is closer to Dropbox’s Selective Sync.

We’ll essentially keep the alias above, but change the syntax to include --filters-file.

First, create a file called dropbox-filter.txt in your home, with contents similar to:

# Include everything in /stories/ and any subdirectories
+ /stories/**
# Same for drafts
+ /drafts/**
# exclude everything else
- *

Make a new parent directory: mkdir ~/dropbox

Use nano .bashrc to update the alias at the end to be:

alias dsync="rclonesync -f ~/dropbox-filter.txt dropbox-pine:/ ~/dropbox/"

Reload bash, then try dsync -dv to run a dry run and make sure the correct paths are included.

As before, run dsync --first-sync, then in the future, dsync to synchronize changes.

Important: rclonesync has a safety feature that will abort the sync when it detects 100% of files have changed. Unfortunately, this is likely exactly what will happen if you are just testing this out with 1-2 files. You will need to run dsync --force in this case.

Tip: You can always run dsync -v or even dsync -vv for more run-time details, and add these to the alias if preferred, e.g. alias dsync="rclonesync -vv -f ~/dropbox-filter.txt dropbox-pine:/ ~/dropbox/"

More information on the filter file: https://rclone.org/filtering/#filter-from-read-filtering-patterns-from-a-file

Where to go from here

It’s a little clunky in that we still need to run dsync to keep our directory up to date at both ends. There are some scripts to tie into the Linux iNotify system that I’ll look into in the future. I hope you’ll understand if I take the simple win for now!

– POTTER