datsync is a lightweight Bash tool for syncing data between your local machine and external devices — specifically Android devices (via ADB) and USB drives — with optional mirroring and persistent configuration.
🔧 Because backups should be simple, fast, and smarter than your average sync script.
- Push/pull files between local ↔ Android/USB
- Supports both Android internal (
/sdcard/) and external (/storage/) storage - Mirror mode: deletes files not present in the source (careful now)
- Supports short options:
-an(android-internal),-ax(android-external) - Persistent config – remembers your paths and preferences
- Designed for Linux
Just drop it somewhere in your PATH:
chmod +x datsync.sh
mv datsync.sh datsync # Remove .sh extension
sudo mv datsync /usr/local/bin/Then run it like:
datsync --helpAlso configure the target path as you like, defaults are :
- LOCAL_PATH="$HOME/backups/sync/local"
- OUT_PATH="/backups/sync/local"
datsync --configurePush to Android internal:
datsync push android internalPull from Android external:
datsync pull android external
# or the short way:
datsync pull -axMirror push to USB (deletes files on USB not in local):
datsync push-m usbMirror pull from Android internal:
datsync pull-m -anPrompt for storage if not specified:
datsync push androiddatsync <mode> <-target> [storage] [options]| Command | Description |
|---|---|
push |
Push files from local to device |
pull |
Pull files from device to local |
push-m |
Push with mirroring (removes target files not in local) |
pull-m |
Pull with mirroring (removes local files not in target) |
android– requires ADBusb– any mounted USB device path
android internalor-an– for/sdcard/android externalor-ax– for/storage/XXXX-XXXX/android allor-aa– do both
| Flag | Description |
|---|---|
-c, --config |
Set or update default paths |
-h, --help |
Show the help message |
- Mirror mode (
push-m,pull-m) removes files. Don’t be reckless. - When syncing to Android and no storage is specified, you'll be asked.
- Default paths are remembered once set using the --config, (saved in $HOME/.config/datsync.conf).
- It is recommended to create the same directory for the source and target.
- Backup path is automatically created in usb if it does not exist.
Backups shouldn't be annoying, and scripts shouldn't require a PhD in rsync.
datsync is your minimalist, no-BS companion for daily backups — fast, predictable, and just smart enough not to get in your way.
Now go sync like a legend.