@@ -8,12 +8,16 @@ Database Backup & Restore
8
8
9
9
[ Documentation] ( https://codexshaper.github.io/docs/database-backup-restore/ )
10
10
11
+ ## Authors
12
+
13
+ * ** Md Abu Ahsan Basir** - [ github] ( https://github.com/maab16 )
14
+
11
15
# Installation
12
16
```
13
17
composer require codexshaper/database-backup-restore
14
18
```
15
19
16
- # MySql Dump * (Note: Mustbe installed ` mysqldump ` in your system)*
20
+ ### MySql Dump * (Note: Mustbe installed ` mysqldump ` in your system)*
17
21
```
18
22
$options = [
19
23
'host' => 'HOST',
@@ -53,7 +57,7 @@ Archive
53
57
->dump();
54
58
```
55
59
56
- # MySql Restore * (Note: Mustbe installed ` mysql ` in your system)*
60
+ ### MySql Restore * (Note: Mustbe installed ` mysql ` in your system)*
57
61
58
62
Restore from without archive
59
63
```
@@ -70,7 +74,7 @@ Restore from archive
70
74
->restore();
71
75
```
72
76
73
- # PgSql Dump * (Note: Mustbe installed ` pg_dump ` in your system)*
77
+ ### PgSql Dump * (Note: Mustbe installed ` pg_dump ` in your system)*
74
78
```
75
79
$options = [
76
80
'host' => 'HOST',
@@ -110,7 +114,7 @@ Archive
110
114
->dump();
111
115
```
112
116
113
- # PgSql Restore * (Note: Mustbe installed ` psql ` in your system)*
117
+ ### PgSql Restore * (Note: Mustbe installed ` psql ` in your system)*
114
118
Restore from without archive
115
119
```
116
120
$dumper = new \CodexShaper\Dumper\Drivers\PgsqlDumper($options);
@@ -126,7 +130,7 @@ Restore from archive
126
130
->restore();
127
131
```
128
132
129
- # Sqlite Dump * (Note: Mustbe installed ` sqlite3 ` in your system)*
133
+ ### Sqlite Dump * (Note: Mustbe installed ` sqlite3 ` in your system)*
130
134
```
131
135
$options = [
132
136
'dbName' => 'DATABASE_PATH', // /path/to/database.sqlite
@@ -158,7 +162,7 @@ Archive
158
162
->useCompress("gzip") // This command apply gzip to zip
159
163
->dump();
160
164
```
161
- # Sqlite Restore * (Note: Mustbe installed ` sqlite3 ` in your system)*
165
+ ### Sqlite Restore * (Note: Mustbe installed ` sqlite3 ` in your system)*
162
166
```
163
167
$options = [
164
168
'dbName' => 'DATABASE_PATH', // /path/to/database.sqlite
@@ -186,7 +190,7 @@ Restore From Archive
186
190
->restore();
187
191
```
188
192
189
- # MongoDB Dump * (Note: Mustbe installed ` mongodump ` in your system)*
193
+ ### MongoDB Dump * (Note: Mustbe installed ` mongodump ` in your system)*
190
194
191
195
```
192
196
$options = [
@@ -227,7 +231,7 @@ Archive
227
231
->useCompress("gzip") // This command will add --archive with --gzip
228
232
->dump();
229
233
```
230
- ## Use URI
234
+ #### Use URI
231
235
```
232
236
$options = [
233
237
'uri' => $uri,
@@ -257,7 +261,7 @@ Compress
257
261
->dump();
258
262
```
259
263
260
- # MongoDB Restore * (Note: Mustbe installed ` mongorestore ` in your system)*
264
+ ### MongoDB Restore * (Note: Mustbe installed ` mongorestore ` in your system)*
261
265
262
266
Restore from without archive
263
267
```
@@ -289,20 +293,14 @@ Restore from archive using URI
289
293
->restore();
290
294
```
291
295
292
- # Set Dump Binary Path
296
+ ### Set Dump Binary Path
293
297
```
294
298
// Same for other driver
295
299
\CodexShaper\Dumper\Drivers\MysqlDumper::create($options)
296
300
->setCommandBinaryPath($binaryPath) // /path/to/mysql/bin
297
301
->dump();
298
302
```
299
303
300
-
301
-
302
- ## Authors
303
-
304
- * ** Md Abu Ahsan Basir** - [ github] ( https://github.com/maab16 )
305
-
306
304
## License
307
305
308
306
- ** [ MIT license] ( http://opensource.org/licenses/mit-license.php ) **
0 commit comments