Excluding files in ownCloud client

Update 2013-02-18: See comments. The exclude location is now /etc/ownCloud/sync-exclude.lst, with no user-specific exclude file.

I’ve been playing with ownCloud and just set up the sync client for Ubuntu 12.04. One immediate issue I encountered is that it tried to sync files I wanted it to ignore, like Vim’s swap (.filename.swp) files.

The way to do this is somewhat undocumented. The client has no GUI option for this, but after digging in logs and source code I discovered that it looks in ~/.csync/csync_exclude.conf for an exclusion list. A example is installed by the .deb package into /usr/etc/. This is an unused directory on Ubuntu; even the ownCloud client ignores it. I copied it to ~/.csync. Here is what mine looks like:

*.filepart
*~
*.bak
*.part
*.unison*
*csync_timedif.ctmp*
.*.sw?
.*.*sw?
.DS_Store
.ds_store
desktop.ini
Thumbs.db

The “sw?” lines cover my Vim issue. The rest match other common backup files and metadata. I’m happy to leave them even though some are irrelevant to Linux users.

Aside: With services like Google Calendar, Google Contacts, and Dropbox, why use ownCloud at all? If you’ve ever met me or read my blog, you can probably guess my response. The short answer is: because I want to control who sees my data. I’ll let Rob Hoelz give the long answer.

Tags:

  1. Michel Thielen’s avatar

    in the new version you have to change de file /etc/ownCloud/sync-exclude.lst

    Reply

    1. Tyler Wagner’s avatar

      You’re right. I just installed owncloud-client 1.2.0 and verified with strace. No user-specific excludes are respected. However, I can see the client reads these files at startup:

      /home/tyler/.config/ownCloud.conf
      /etc/xdg/ownCloud.conf
      /home/tyler/.local/share/data/ownCloud/folders/ownCloud
      /etc/ownCloud/sync-exclude.lst

      The first two don’t exist on my system. The third one defines my shared folder. The changelog says around release 1.1.0:

      “Renamed exclude.lst to sync-exclude.lst and moved it to /etc/appName()/ for more clean packaging. From the user path, still exclude.lst is read if sync-exclude.lst is not existing.”

      However, removing /etc/ownCloud/sync-exclude.lst did not cause owncloud-client to read any other exclude file.

      Devs, this sucks. Please read at least one user-specific exclude file.

      Reply

      1. Markus’s avatar

        Putting your excludes in a file named ~/.local/share/data/ownCloud/sync-exclude.lst should work.
        At least it does with my installation (version 1.2.5).
        Had to figure that one out myself, too. [No] Documentation sucks :-/

        Reply

        1. Tyler Wagner’s avatar

          That’s good news, thanks. It did not work under 1.2.4 and before. The state of csync documentation is deplorable.

          Reply

Reply to Markus Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.