Bash-based synchronization system between WSL and VPS with git/rsync hybrid.
# Clone
git clone git@github.com:hdworker/vps-sync.git ~/.vps-sync
# Configure
nano ~/.vps-sync/config.conf
# Setup SSH keys (recommended)
~/.vps-sync/sync.sh setup-keys
# Initial sync - pull all projects from VPS
~/.vps-sync/sync.sh init# Push changes to VPS
~/.vps-sync/sync.sh push # all projects
~/.vps-sync/sync.sh push --auto <project> # with auto-commit
# Pull from VPS
~/.vps-sync/sync.sh pull
# Deploy configs
~/.vps-sync/sync.sh deploy nginx <project>
~/.vps-sync/sync.sh deploy systemd <project>
# View help
~/.vps-sync/sync.sh help.vps-sync/
├── sync.sh # Main entrypoint
├── config.conf # Configuration
├── lib/ # Core modules
│ ├── remote.sh # SSH/rsync transport
│ └── deploy_db.py # Deployment database
├── helpers/ # Helper scripts
└── exclude.txt # Rsync exclusions
- Git push/pull for git repos, rsync for plain folders
- Auto-detect sync strategy per project
- Deploy nginx configs and systemd services
- Dotfiles sync support
- SSH key-based authentication
- rsync, git, sshpass (optional)
- SSH access to VPS
- Git identity configured for auto-commits:
git config --global user.email "you@example.com" git config --global user.name "Your Name"