1 | <?php |
||
5 | class BackupEnginePgsql extends BackupEngineAbstract |
||
6 | { |
||
7 | private const ENGINE_NAME = 'pgsql'; |
||
8 | private const ENGINE_EXTENSION = 'pgsql'; |
||
9 | private const ENGINE_EXPORT_PROCESS = 'pg_dump'; |
||
10 | private const ENGINE_RESTORE_PROCESS = 'pg_restore'; |
||
11 | |||
12 | /** |
||
13 | * Get export process. |
||
14 | * |
||
15 | * @return string |
||
16 | */ |
||
17 | public function getExportProcess() |
||
21 | |||
22 | /** |
||
23 | * Get restore process. |
||
24 | * |
||
25 | * @return string |
||
26 | */ |
||
27 | public function getRestoreProcess() |
||
31 | |||
32 | /** |
||
33 | * Get database file extension. |
||
34 | * |
||
35 | * @return string |
||
36 | */ |
||
37 | public function getFileExtension() |
||
41 | |||
42 | /** |
||
43 | * Export the database to a file path. |
||
44 | * |
||
45 | * @param string $filepath |
||
46 | * |
||
47 | * @return bool |
||
48 | */ |
||
49 | public function export($filepath) |
||
63 | |||
64 | /** |
||
65 | * Restore the database from a file path. |
||
66 | * |
||
67 | * @param string $filepath |
||
68 | * |
||
69 | * @return bool |
||
70 | */ |
||
71 | public function restore($filepath) |
||
85 | } |
||
86 |