115

I am trying to sync my Firefox profile folder using Dropbox, but there are several files that Firefox changes quite frequently

  1. Folders: Cache, OfflineCache can be excluded
  2. Files: urlclassifier3.sqlite, places.sqlite - these files are big and are changed anytime

OS: Windows 7

Does anyone know how to exclude files listed in #2 from Dropbox sync?

DanielTA
  • 258

7 Answers7

76

To exclude FILES, not folders, from Dropbox, there is a trick you can do:

  1. Move the file somewhere else

  2. Create a folder with the same name in place of the file

  3. Go to Dropbox selective sync options and ignore the folder, this will also delete it

  4. Move the file back in place

Example

How to ignore single file in Dropbox

Enjoy your ignored file!

Zequez
  • 1,652
60

On Linux, you can use the dropbox command line tool that comes with Dropbox:

$ dropbox filestatus
PV_2013.aux:                      up to date
PV_2013.log:                      up to date
PV_2013.pdf:                      up to date
PV_2013.tex:                      up to date    

$ dropbox exclude add *.log *.aux
Excluded: 
../ag_2013/pv_2013.aux
../ag_2013/pv_2013.log

$ dropbox filestatus
PV_2013.pdf:                      up to date
PV_2013.tex:                      up to date    
raphink
  • 3,871
15

It actually is available now, currently in beta, may not work for all users.

Mac:

xattr -w com.dropbox.ignored 1 <absolute dir/filepath>

Linux

attr -s com.dropbox.ignored -V 1 <absolute dir/filepath>

Windows

Set-Content -Path <absolute path>  -Stream com.dropbox.ignored -Value 1

let's hope they add the GUI part in the near future.

source

Martin.
  • 312
8

In Dropbox Settings, go to Advanced > Selective Sync. If you see an Advanced View or similar button, click it. Uncheck the cache folders and any other folders you find Firefox is changing frequently.

I did this with my Chrome installation and the above steps helped me shave off the syncing of huge caches, icons, etc.

As for any files you don't want synced but you find are inside folders that you do want synced, exit Firefox, move the file to another location, then create a symbolic or hard-link to it in the original location. When Firefox is run again, it will see the file as though it was never moved, but Dropbox will see the link and not sync the actual file.

Apparently Dropbox does sync symbolic links or hard links as though they are actual files.

But if you know for sure what files in a folder you want synced (that is, their names are fixed, not changing or random), you can do a reverse-syncing hack:

  • In Selective Sync feature, exclude the entire folder containing both the files you don't want synced and those you do want synced.
  • Create a new folder next to the excluded folder. This folder will be synced by Dropbox. You may name it suitably to indicate that it is a duplicate of the excluded folder.
  • In the new folder, create hard links (or symbolic links) to the files in the original excluded folder that you do want to be synced.

Dropbox will sync these files as though they are residing in this new folder, eventhough they are actually in the original one. In addition, Dropbox will not sync files that you did not create links to.

ADTC
  • 3,044
6

Since Dropbox staff made it clear that it will NOT implement a selective file/folder sync, the user will have to implement this manually. Instead of using symbolic link, you can use a program like FreeFileSync and customize exactly which files you want synced and to which folder[x].

You can either use realtimesync or windows task scheduler to have granular control over how often the files are synced.

Or if you want compression/encryption of your files, then you can use cryptsync.


I do understand that for those that have large files elsewhere on their system and do not want to duplicate them into a separate folder (and thus use symbolic links) this is not an ideal situation. If there was a way to schedule how often to apply the syslink, maybe that would be a compromise. For example, setup a windows task to add symlink, wait xx minutes for dropbox sync to complete, then another task to delete/undo the symlink to prevent unwanted auto-syncing by dropbox.


Here is a photo showing dropbox staff confirming after >3 years of multiple request, they will not be adding the feature:

dropbox says no selective file syncing for you

^I don't know how to make the image a thumbnail or smaller so that users can click on it and make it larger in a separate lightbox, sorry.

Jon Grah
  • 653
4

[NOTE: This NO LONGER WORKS WELL AND IS DISCOURAGED by DropBox and by me based on my own personal experiences with symlinks causing high CPU usage of the Dropbox app. I'm leaving the answer here for posterity and a warning to others. No need to downvote (ahem)]

I'm not sure what OS you're using or how Firefox in particular would react to this but whenever I need to exclude files from Dropbox (which cannot simply be deleted or moved for whatever reason), I simply move the file outside of the Dropbox folder and then create a symlink in the old location pointing to the new one.

Dropbox sync the link as a symbolic link but knows/cares nothing about the underlying content.

Jay Allen
  • 375
2

You cant exclude files from dropbox sync , but you can delete them or change those files location.

Using DropBox for Firefox sync may result in conflict of profile, better use FireFox built in Sync tab under option or settings

James Mertz
  • 26,529