Skip to content

Instantly share code, notes, and snippets.

@joennlae
Forked from Sieboldianus/README.md
Created August 26, 2022 09:32
Show Gist options
  • Save joennlae/3dab173dce490aefce8718686fe0fe83 to your computer and use it in GitHub Desktop.
Save joennlae/3dab173dce490aefce8718686fe0fe83 to your computer and use it in GitHub Desktop.
An opinionated nextcloud ignore list for developers (sync-exclude.lst)

An opinionated nextcloud ignore list for developers (sync-exclude.lst)

The latest nextcloud server versions will have ransomware detection automatically enabled, meaning that syncing common developer file types (e.g. .lock) will return errors.

Fatal webdav OCA\DAV\Connector\Sabre\Exception\Forbidden: Ransomware file detected. Prevented upload of ..py/bokeh/secrets.tar.enc because it matches extension pattern ".enc"

If you are syncing complex, nested work directories as a developer, the following list can be used, as a starting point, to exclude certain common file types and folders.

Examples:

  • .git/: folder will not be synced (but the latest files checked out, will)
  • node_modules/: (JS) will not be synced, preventing syncing of a massive quantity of unnecessary dependencies
  • cython_debug/: C-Extensions for Python debug directories
  • _site/: Commonly used for building static sites and serving temporary files (mkdocs serve, hugo serve)

The motivation behind this approach is that Nextcloud should not be used as a backup solution, but for syncing working files. For instance, if you want to continue working at home on selected files (*.md, *.odt), this will be possible. For checking out the latest git repositories, or dependencies, use the native approach (e.g. git pull for repositories, npm install for node_modules/).

Note: The file list is not exhaustive, please comment or update.

Setup

Clone this gist:

git clone [email protected]:280afdb2f994fae6e5f6b183888f659d.git
mv 280afdb2f994fae6e5f6b183888f659d nextcloud_ignore_gist
cd nextcloud_ignore_gist

Copy sync-exclude.lst file to:

%AppData%/Nextcloud/sync-exclude.lst
*~
~$*
.~lock.*
~*.tmp
]*.~*
]Icon\r*
].DS_Store
].ds_store
*.textClipping
._*
]Thumbs.db
]photothumb.db
System Volume Information
.*.sw?
.*.*sw?
].TemporaryItems
].Trashes
].DocumentRevisions-V100
].Trash-*
.fseventd
.apdisk
.Spotlight-V100
.directory
*.part
*.filepart
*.crdownload
*.kate-swp
*.gnucash.tmp-*
.synkron.*
.sync.ffs_db
.symform
.symform-store
.fuse_hidden*
*.unison
.nfs*
My Saved Places.
\#*#
*.sb-*
*.dll
*.exe
.git/
.lock
*.bin
.bin
bin/
*.lock
node_modules/
.cache/
.vscode/
.pytest_cache/
.github/
.ipynb_checkpoints/
*.exe
*.dll
*.class
*.com
*.so
*.o
@*/
__pycache__/
.Python/
build/
dist/
eggs/
.eggs/
wheels/
sdist/
var/
*.egg/
*.egg-info/
lib64/
lib/
.tox/
.nox/
env/
venv/
ENV/
env.bak/
venv.bak/
site/
cython_debug/
vendor/
tmp/
.libs/
.debs/
src/
Debug/
debug/
*.pdb
*.enc
.enc
.sass-cache/
_site/
.info
*.info
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment