Skip to content

hdworker/vps-sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VPS Sync

Bash-based synchronization system between WSL and VPS with git/rsync hybrid.

Quick Start

# 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

Commands

# 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

Structure

.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

Features

  • 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

Requirements

  • 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"

About

tool to sync configs, project files etc. from workstation to VPS. Done as Opencode skill.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors