|
1 | 1 | # go-sync utility |
2 | 2 |
|
| 3 | +[](https://github.com/webdevops/go-sync/releases) |
| 4 | +[](https://github.com/webdevops/go-sync/blob/master/LICENSE) |
| 5 | +[](https://travis-ci.org/webdevops/go-sync) |
| 6 | +[]() |
| 7 | +[]() |
| 8 | + |
3 | 9 | Easy project file and database synchronization for developers |
4 | 10 |
|
5 | | --> WIP |
| 11 | +Successor for [CliTools Sync](https://github.com/webdevops/clitools) written on Golang |
| 12 | + |
| 13 | +Features |
| 14 | +======== |
| 15 | + |
| 16 | +General: |
| 17 | +- Yaml based configuration files (`gosync.yml` or `.gosync.yml`) |
| 18 | +- Automatic cleanup of schemas before restore |
| 19 | + |
| 20 | +Sync: |
| 21 | +- Filesync (rsync) from remote servers using SSH |
| 22 | +- Dump MySQL schemas from remote servers using SSH, Docker and SSH+Docker |
| 23 | +- Restore MySQL schema to local MySQL servers or Docker/Docker-Compose containers |
| 24 | +- Filtering databases tabes with regexp |
| 25 | +- Rsync filters |
| 26 | +- Custom exec scripts (startup/finish) on local or remote machine (using SSH) |
| 27 | + |
| 28 | +Deployment: |
| 29 | +- Filesync (rsync) from local to remote servers using SSH |
| 30 | +- Dump MySQL schemas from local MySQL servers or Docker/Docker-Compose containers |
| 31 | +- Filtering databases tabes with regexp |
| 32 | +- Rsync filters |
| 33 | +- Custom exec scripts (startup/finish) on local or remote machine (using SSH) |
| 34 | + |
| 35 | +Example |
| 36 | +======= |
| 37 | + |
| 38 | +``` |
| 39 | +> gosync sync production |
| 40 | +
|
| 41 | +:: Initialisation |
| 42 | + -> found configuration file /Users/xxxxxx/Projects/examples/gosync.yml |
| 43 | + -> using production server |
| 44 | + -> using connection Exec[Type:ssh SSH:ssh-user@example.com] |
| 45 | +:: Starting exec mode "startup" |
| 46 | + -> executing >> Exec[Type:local Command:date +%s] |
| 47 | + -> executing >> Exec[Type:local Command:date +%s] |
| 48 | + -> executing >> Exec[Type:local Workdir:/ Command:date] |
| 49 | + -> executing >> Exec[Type:local Workdir:/ Command:date] |
| 50 | + -> executing >> Exec[Type:remote Workdir:/ Command:date] |
| 51 | +:: Starting sync of Filesystem[Path:/home/xxxxxx/application1/ -> Local:./application1/] |
| 52 | +:: Starting sync of Filesystem[Path:/home/xxxxxx/application2/ -> Local:./application2/] |
| 53 | +:: Starting sync of Database[Schema:application1 User:mysql-user Passwd:***** -> Schema:test-local] |
| 54 | + -> dropping local database "test-application1" |
| 55 | + -> creating local database "test-application1" |
| 56 | + -> syncing database structure |
| 57 | + -> get list of mysql tables for table filter |
| 58 | + -> syncing database data |
| 59 | +:: Starting sync of Database[Schema:application2 User:mysql-user Passwd:***** -> Schema:test] |
| 60 | + -> dropping local database "test-application2" |
| 61 | + -> creating local database "test-application2" |
| 62 | + -> syncing database structure |
| 63 | + -> get list of mysql tables for table filter |
| 64 | + -> syncing database data |
| 65 | +:: Starting exec mode "finish" |
| 66 | + -> executing >> Exec[Type:remote Workdir:/ Command:date] |
| 67 | +-> finished |
| 68 | +``` |
0 commit comments