[Sync.com](https://sync.com) offers secure cloud storage, ensuring your data is safe and accessible.
- Sync directories and files across multiple devices.
- Share [files](https://cp.sync.com/files/) with people.
- Store files in a [vault](https://cp.sync.com/vault/), which does not sync across devices.
# Limitations
Sync cannot exclude any files from backup. There is no concept of a `.syncignore` file or anything like that.
[[Git]] repositories have _many_ files, like historical versions of files and [[Python|Python]] virtual environments. They take up a lot of space and are not needed by the current project.
# Solution
Use an [[rsync]] script to periodically send files to a Sync directory.
```sh
source_dir="${1}"
target_dir="${2}"
rsync ${source_dir} ${target_dir} \
--recursive \
--filter="dir-merge,- .gitignore" \
--exclude=".git" \
--exclude=".venv"
```
Schedule the script to run each day with a [[cron]] task.
# Resources
[Exclude files from .gitignore. Stack Overflow.](https://stackoverflow.com/questions/13713101/rsync-exclude-according-to-gitignore-hgignore-svnignore-like-filter-c/15373763#15373763)