https://github.com/torstein-eide/restoremysql
Restore many files sql files in a guided way
https://github.com/torstein-eide/restoremysql
mysql mysql-database mysqldump restore-database sql
Last synced: about 2 months ago
JSON representation
Restore many files sql files in a guided way
- Host: GitHub
- URL: https://github.com/torstein-eide/restoremysql
- Owner: Torstein-Eide
- License: unlicense
- Created: 2018-11-15T20:20:01.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-10-15T17:40:28.000Z (over 6 years ago)
- Last Synced: 2025-10-09T21:04:32.408Z (9 months ago)
- Topics: mysql, mysql-database, mysqldump, restore-database, sql
- Language: Shell
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# restore MySQL database's
Restore many files sql files in a guided way.
Will import any sql fils.
## dependency:
- MYSQL
- PV
## How to run:
```
cd [path to folder with sql files]
wget https://raw.githubusercontent.com/Eideen/restoreMySQL/master/db_restore.sh
chmod +x ./db_restore.sh
./db_restore.sh
```
or
```
./db_restore.sh [path to folder with sql files]
```
## Example of output:
>```
>$ll -h
>-rw-r--r-- 1 root root 8.3M Nov 7 22:22 db1.sql
>-rw-r--r-- 1 root root 299M Nov 7 22:22 db2.sql
>
>$./db_restore.sh
>Input username for mysql server [USER]:
>Input password for mysql server:
>Input hostname for mysql server [localhost]:
>list of databases before:
>* information_schema
>* mysql
>* performance_schema
>Warning: importing database will overwrite your exsisting data!
>
>Are you sure, you wanted to import db1 [y/N]y
>db1 exist
>importing data in db1
>8.24MiB 0:00:16 [ 519KiB/s] [====================================================>] 100%
>
>Are you sure, you wanted to import db2 [y/N]
>db2 exist
>importing data in db2
> 298MiB 0:02:39 [1.87MiB/s] [====================================================>] 100%
>list of databases after:
>* information_schema
>* db1
>* mysql
>* db2
>* performance_schema
>```