All Projects → webdevops → go-sync

webdevops / go-sync

Licence: MIT license
🔁 CLI synchronization utility to sync project files and databases for your local project with SSH and Docker support

Programming Languages

go
31211 projects - #10 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to go-sync

K8s Wait For
A simple script that allows to wait for a k8s service, job or pods to enter a desired state
Stars: ✭ 172 (+181.97%)
Mutual labels:  synchronization
Backbone Redux
Easy way to keep your backbone collections and redux store in sync.
Stars: ✭ 185 (+203.28%)
Mutual labels:  synchronization
React Agent
Client and server-side state management library
Stars: ✭ 235 (+285.25%)
Mutual labels:  synchronization
Multiotp
multiOTP open source strong two factor authentication PHP library, OATH certified, with TOTP, HOTP, Mobile-OTP, YubiKey, SMS, QRcode provisioning, etc.
Stars: ✭ 173 (+183.61%)
Mutual labels:  synchronization
Grav Plugin Git Sync
Collaboratively Synchronize your Grav `user` folder hosted on GitHub, BitBucket or GitLab
Stars: ✭ 183 (+200%)
Mutual labels:  synchronization
Pevents
Implementation of Win32 events for *nix platforms, built on top of pthreads.
Stars: ✭ 200 (+227.87%)
Mutual labels:  synchronization
Rats
Movie Ratings Synchronization with Python
Stars: ✭ 156 (+155.74%)
Mutual labels:  synchronization
Volumetriccapture
A multi-sensor capture system for free viewpoint video.
Stars: ✭ 243 (+298.36%)
Mutual labels:  synchronization
Android
EteSync - Secure, end-to-end encrypted, and privacy respecting sync for your contacts, calendars and tasks.
Stars: ✭ 184 (+201.64%)
Mutual labels:  synchronization
Abool
💡 Atomic Boolean library for cleaner Go code, optimized for performance yet simple to use.
Stars: ✭ 225 (+268.85%)
Mutual labels:  synchronization
Etesync Dav
This is a CalDAV and CardDAV adapter for EteSync
Stars: ✭ 176 (+188.52%)
Mutual labels:  synchronization
Etesync Web
An EteSync web client
Stars: ✭ 183 (+200%)
Mutual labels:  synchronization
Ansible Role Ntp
Ansible Role - NTP
Stars: ✭ 203 (+232.79%)
Mutual labels:  synchronization
Java Concurrency Examples
Java Concurrency/Multithreading Tutorial with Examples for Dummies
Stars: ✭ 173 (+183.61%)
Mutual labels:  synchronization
Syncthingtray
Tray application and Dolphin/Plasma integration for Syncthing
Stars: ✭ 234 (+283.61%)
Mutual labels:  synchronization
Redux First History
🎉 Redux First History - Redux history binding support react-router - @reach/router - wouter
Stars: ✭ 163 (+167.21%)
Mutual labels:  synchronization
Llvs
Low-Level Versioned Store
Stars: ✭ 193 (+216.39%)
Mutual labels:  synchronization
React Scroll Sync
Synced scroll position across multiple scrollable elements
Stars: ✭ 252 (+313.11%)
Mutual labels:  synchronization
Syncsettings
Sync Settings - The cross-platform solution to keep Sublime Text configuration synchronized
Stars: ✭ 240 (+293.44%)
Mutual labels:  synchronization
Concurrent
Functional Concurrency Primitives
Stars: ✭ 206 (+237.7%)
Mutual labels:  synchronization

go-sync utility

GitHub release license Build Status Github All Releases Github Releases

Easy project file and database synchronization for developers

Successor for CliTools Sync written on Golang

Features

General:

  • Yaml based configuration files (gosync.yml or .gosync.yml)
  • PostgreSQL and MySQL support
  • SSH and Docker support (with docker-compose support)

Sync:

  • Filesync (rsync) from remote servers using SSH
  • Create file stubs instead of fetching files from remote (with real images, see options.generate-stubs = true)
  • Dump databases from remote servers using SSH, Docker and SSH+Docker
  • Restore databases to local database servers or Docker/Docker-Compose containers
  • Filtering databases tables with regexp
  • Rsync filters
  • Custom exec scripts (startup/finish) on local or remote machine (using SSH)

Deployment:

  • Filesync (rsync) from local to remote servers using SSH
  • Dump databases from local database servers or Docker/Docker-Compose containers
  • Filtering databases tables with regexp
  • Rsync filters
  • Custom exec scripts (startup/finish) on local or remote machine (using SSH)

Install

The binary file can be found in the project releases.

DOWNLOAD_VERSION=0.5.5
DOWNLOAD_OS=linux
DOWNLOAD_ARCH=x64

wget -O/usr/local/bin/gosync "https://github.com/webdevops/go-sync/releases/download/${DOWNLOAD_VERSION}/gosync-${DOWNLOAD_OS}-${DOWNLOAD_ARCH}"
chmod +x /usr/local/bin/gosync

Help

Usage:
  gosync [OPTIONS] <command>

Application Options:
  -v, --verbose  verbose mode

Help Options:
  -h, --help     Show this help message

Available commands:
  deploy       Deploy to server
  list         List server configurations
  self-update  Self update
  sync         Sync from server
  version      Show version

Configuration (gosync.yml)

Gosync is controlled by gosync.yml (or .gosync.yml) which will be searched in current and parent directories.

Example

> gosync sync production

:: Initialisation
   -> found configuration file /Users/xxxxxx/Projects/examples/gosync.yml
   -> using production server
   -> using connection Exec[Type:ssh SSH:[email protected]]
:: Starting exec mode "startup"
   -> executing >> Exec[Type:local Command:date +%s]
   -> executing >> Exec[Type:local Command:date +%s]
   -> executing >> Exec[Type:local Workdir:/ Command:date]
   -> executing >> Exec[Type:local Workdir:/ Command:date]
   -> executing >> Exec[Type:remote Workdir:/ Command:date]
:: Starting sync of Filesystem[Path:/home/xxxxxx/application1/ -> Local:./application1/]
:: Starting sync of Filesystem[Path:/home/xxxxxx/application2/ -> Local:./application2/]
:: Starting sync of Database[Schema:application1 User:mysql-user Passwd:***** -> Schema:test-local]
   -> dropping local database "test-application1"
   -> creating local database "test-application1"
   -> syncing database structure
   -> get list of mysql tables for table filter
   -> syncing database data
:: Starting sync of Database[Schema:application2 User:mysql-user Passwd:***** -> Schema:test]
   -> dropping local database "test-application2"
   -> creating local database "test-application2"
   -> syncing database structure
   -> get list of mysql tables for table filter
   -> syncing database data
:: Starting exec mode "finish"
   -> executing >> Exec[Type:remote Workdir:/ Command:date]
-> finished

Docker support

Docker support

Using the configuration connection.docker=configuration this command can be execued with docker containers. If the container id is passed the container is used without lookup using eg. docker-compose.

docker-compose:

CONTAINER is the name of the docker-compose container.

DSN style configuration Description
compose:CONTAINER Use container with docker-compose in current directory
compose:CONTAINER;path=/path/to/project Use container with docker-compose in /path/to/project directory
compose:CONTAINER;path=/path/to/project;file=custom-compose.yml Use container with docker-compose in /path/to/project directory and custom-compose.yml file
compose:CONTAINER;project-name=foobar Use container with docker-compose in current directory with project name foobar
compose:CONTAINER;host=example.com Use container with docker-compose in current directory with docker host example.com
compose:CONTAINER;env[FOOBAR]=BARFOO Use container with docker-compose in current directory with env var FOOBAR set to BARFOO
Query style configuration Description
compose://CONTAINER Use container with docker-compose in current directory
compose://CONTAINER?path=/path/to/project Use container with docker-compose in /path/to/project directory
compose://CONTAINER?path=/path/to/project&file=custom-compose.yml Use container with docker-compose in /path/to/project directory and custom-compose.yml file
compose://CONTAINER?project-name=foobar Use container with docker-compose in current directory with project name foobar
compose://CONTAINER?host=example.com Use container with docker-compose in current directory with docker host example.com
compose://CONTAINER?env[FOOBAR]=BARFOO Use container with docker-compose in current directory with env var FOOBAR set to BARFOO
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].