get-remote-database

所属分类:Telnet客户端/Shell
开发工具:Tcl
文件大小:6KB
下载次数:0
上传日期:2019-02-01 14:01:41
上 传 者sh-1993
说明:  连接到远程服务器,导出PG转储,将其下载到桌面,并将其导入本地PG数据库
(Connects to remote server, exports a PG dump, downloads it to your desktop and imports it on your local PG database)

文件列表:
LICENSE (1085, 2019-02-01)
configuration (0, 2019-02-01)
configuration\example.conf.tcl (514, 2019-02-01)
lib (0, 2019-02-01)
lib\common.tcl (265, 2019-02-01)
lib\download.tcl (473, 2019-02-01)
lib\export_mysql.tcl (398, 2019-02-01)
lib\export_postgres.tcl (441, 2019-02-01)
lib\import_mysql.tcl (366, 2019-02-01)
lib\import_postgres.tcl (476, 2019-02-01)
lib\init.tcl (1143, 2019-02-01)
lib\shutdown.tcl (470, 2019-02-01)
lib\ssh_to_server.tcl (386, 2019-02-01)
run.sh (765, 2019-02-01)

# Introduction I believe that if there is a command you have to run more than once a month, it is worth automating. The same commands I used to run to be able to ssh to a server, export a db's data, download it and then import it on my computer have been bundled up on a set of scripts that do exactly what their names are. Generally, a full list of commands would be: 1. SSH to remote server 2. Connect to a PostgreSQL or MySQL Server & export the preferred schema/database 3. Download the exported `.sql` to your computer 4. Drop the schema/database from your local server 5. Import the freshly downloaded `.sql` file to that schema - ### Usage: Please use `configuration/example.conf.tcl` as your starting configuration file. From within the project, copy `configuration/example.conf.tcl` to `{my-key}.conf.tcl`: ``` cp configuration/example.conf.tcl configuration/{my-key}.conf.tcl ``` **Edit `{my-key}.conf.tcl` to match your environment settings.** - The scripts should have execute permissions in order to be executable: ``` chmod u+x run.sh ``` Then simply run it by calling: ``` ./run.sh {my-key} ``` OR you can create an alias to it: ``` alias grd="/PATH/TO/PROJECT/get-remote-database/run.sh" ``` And then use it like this: ``` grd {my-key} ``` That's it. Feel free to contribute if you'd like or feel like something can be improved. ### Made with <3 in Athens, Greece

近期下载者

相关文件


收藏者