All Projects → markogresak → cloud-ignore-files

markogresak / cloud-ignore-files

Licence: other
Make Cloud sync ignore certain project files

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to cloud-ignore-files

iCloudDownloader
CLI for downloading iCloud file
Stars: ✭ 82 (+17.14%)
Mutual labels:  icloud, icloud-sync
syncTabs
Sync your firefox tabs with Safari on iOS
Stars: ✭ 25 (-64.29%)
Mutual labels:  icloud
Swiftassetspickercontroller
A simple assets picker controller based on iOS 8 Photos framework. Supports iCloud photos and videos. It's written in Swift.
Stars: ✭ 81 (+15.71%)
Mutual labels:  icloud
Pdf Archiver
A tool for tagging files and archiving tasks.
Stars: ✭ 182 (+160%)
Mutual labels:  icloud
Hardchoice
有时候作抉择真的很痛苦,Swift写的生活类APP
Stars: ✭ 90 (+28.57%)
Mutual labels:  icloud
icloud3
iCloud3 - An advanced device_tracker custom_component for iPhones, iPads, etc. It monitors zone & location updates triggered by the HA iOS App and supports Apple 2fa verification.
Stars: ✭ 304 (+334.29%)
Mutual labels:  icloud
Ricloud
Python client for Reincubate's ricloud API. Yes, it works with iOS 14 & iPhone 12 backups!
Stars: ✭ 71 (+1.43%)
Mutual labels:  icloud
pi-cloud-frame
An icloud-powered digital frame running on a Raspberry Pi. Downloads a random sample of photos from your icloud account, crops them to the correct aspect ratio and displays them. Supports parallel slideshows, interactive menus, GPS/EXIF lookup and auto rotation via a MPU-6050 accelerometer.
Stars: ✭ 21 (-70%)
Mutual labels:  icloud
icloud
Access the iCloud API
Stars: ✭ 34 (-51.43%)
Mutual labels:  icloud
Hxphotopicker
图片/视频选择器 - 支持LivePhoto、GIF图片选择、3DTouch预览、在线下载iCloud上的资源、编辑图片/视频、浏览网络图片 功能 Imitation wx photo/image picker - support for LivePhoto, GIF image selection, 3DTouch preview, Download the resources on iCloud online, browse the web image function
Stars: ✭ 2,363 (+3275.71%)
Mutual labels:  icloud
React Native Icloudstore
A drop in replacement for React Native's AsyncStorage API that wraps the iCloud Ubiquitous Key-Value Store.
Stars: ✭ 143 (+104.29%)
Mutual labels:  icloud
Fcuuid
iOS UUID / Universally Unique Identifiers library as alternative to UDID and identifierForVendor. 📱
Stars: ✭ 1,387 (+1881.43%)
Mutual labels:  icloud
node-red-contrib-ical-events
Node-RED module to get events from a iCal Calender (Google e.g.), icloud or Caldav Server via kalender-events
Stars: ✭ 38 (-45.71%)
Mutual labels:  icloud
Tothepenny
A budget tracker app for iOS
Stars: ✭ 82 (+17.14%)
Mutual labels:  icloud
iCloud-Photo-Downloader
iCloud Photo Downloader - Fetch Originals from iCloud Photo Library
Stars: ✭ 17 (-75.71%)
Mutual labels:  icloud
Docker Icloudpd
An Alpine Linux 3.13 container for the iCloud Photos Downloader command line utility
Stars: ✭ 76 (+8.57%)
Mutual labels:  icloud
Cloudkit Demo.swift
Stars: ✭ 244 (+248.57%)
Mutual labels:  icloud
Cloudkit Demo.objective C
Stars: ✭ 133 (+90%)
Mutual labels:  icloud
iBadApple
First ever: Windows, free iCloud & activation lock bypass... that isn't a malware!
Stars: ✭ 133 (+90%)
Mutual labels:  icloud
NAS-Nav-iCloud
NAS-Nav导航仿iCloud风格
Stars: ✭ 25 (-64.29%)
Mutual labels:  icloud

Cloud sync ignore files

Make Cloud sync ignore certain project files

Why?

I am using iCloud to share data between my macs, including my project files. I noticed that node_modules and similar project dependencies caused iCloud to take awfully long to sync thousands upon thousands of files, despite a fast internet connection.

I was looking for a solution to prevent node_modules from uploading, but iCloud doesn't seem to offer ignoring files. So I started to put together this solution/hack. It's not iCloud-specific; you can use it with any service which doesn't provide selective sync or ignoring files.

How it works?

The script expects a local project directory, which outside the cloud synced folders. The project directory is in sync with a duplicate project folder inside the cloud drive, but this clone doesn't contain project dependencies. This setup makes the size of the clone smaller and more importantly, faster to sync, thanks to a lot fewer files.

Syncing works both ways, so when new files are downloaded from the cloud, they are copied over to the local project directory.

The syncing works via unison CLI tool. Initially, I tried with rsync, but it doesn't support a simple bidirectional sync setup.

The sync script will ignore:

  • node_modules folder
  • bower_components folder
  • *.log files (rails apps can produce large logs and those are stored directly inside the project directory)
  • .DS_Store files

You can change the ignored files by modifying the ignore_files variable in install.sh. With the current version, the setup is based on personal project types (mostly rails and node), but it's open to suggestions.

Installing

Note: This currently works only on macOS because of the use of launchctl, but the rest is platform-agnostic (limited by unison support). It should not be a lot of work to swap in a platform-specific service manager (e.g. systemctl). But I am not an active Linux or Windows user, so I did not test the install script on other platforms. PRs welcome 😄

Due to stricter macOS security policy, you must ensure bash has the Full Disk Access permission
Thanks to @chrisblossom for pointing it out (see #5).

  1. Install unison CLI tool. The easiest way is brew install unison.
  2. Clone or download this repository and cd into the folder.
  3. Check install.sh script and edit paths to match your system setup. Check variables local_path, cloud_path and ignore_files, which can be found at the top of the script.
  4. Run ./install.sh.

By default, the script is configured to add log files in /var/log. To do this, the script requires sudo access, so the script will ask for the password during installation. You can disable logging by running the install script as ./install.sh --no-logs, which also skips the password prompt.

Updating config

If you make changes to install.sh or templates and want to update your config, just run ./install.sh again and it will re-generate and reload config. The updated config should start working immediately. But unison might take a moment to sync, depending on the size of the synced folder.

Uninstalling

Run ./install.sh --uninstall to unload and remove the config, remove the syncing script and log files.

Performance

As far as software goes, it all comes down to unison performance, which seems to be quite fast. On my MacBook Pro (13" retina, late 2013: 2.4 GHz CPU, 8gb RAM, 256gb SSD) with projects folder size of 2.5GB with ~125k files or 62k without counting node_modules, it took about 75s to init, i.e. clone the whole project folder. Real cases will probably see only a few files changed here and there, which should sync instantaneously.

Related solutions

  • iCloud-NoSync: An Automator utility to have iCloud Sync ignore an entire folder without losing access to the folder path

Credits

Thank you @tatums for the rsyc-icloud-hack project, it helped me a lot to shape this project!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].