Add support for zstd backups via tzst extension.
This commit is contained in:
parent
a4bd63df49
commit
28de7fdf86
|
@ -135,6 +135,23 @@ class BackupCommand extends CommandAbstract
|
|||
);
|
||||
|
||||
switch ($file_ext) {
|
||||
case 'tzst':
|
||||
$this->passThruProcess(
|
||||
$io,
|
||||
array_merge(
|
||||
[
|
||||
'tar',
|
||||
'-I',
|
||||
'zstd',
|
||||
'-cf',
|
||||
$tmpPath,
|
||||
],
|
||||
$files_to_backup
|
||||
),
|
||||
'/'
|
||||
);
|
||||
break;
|
||||
|
||||
case 'gz':
|
||||
case 'tgz':
|
||||
$this->passThruProcess(
|
||||
|
|
|
@ -43,6 +43,20 @@ class RestoreCommand extends CommandAbstract
|
|||
$file_ext = strtolower(pathinfo($path, PATHINFO_EXTENSION));
|
||||
|
||||
switch ($file_ext) {
|
||||
case 'tzst':
|
||||
$this->passThruProcess(
|
||||
$io,
|
||||
[
|
||||
'tar',
|
||||
'-I',
|
||||
'unzstd',
|
||||
'-xvf',
|
||||
$path,
|
||||
],
|
||||
'/'
|
||||
);
|
||||
break;
|
||||
|
||||
case 'gz':
|
||||
case 'tgz':
|
||||
$this->passThruProcess(
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
- gzip
|
||||
- zip
|
||||
- unzip
|
||||
- zstd
|
||||
|
||||
- name: Install Focal Packages (20.04)
|
||||
apt:
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
source /bd_build/buildconfig
|
||||
set -x
|
||||
|
||||
$minimal_apt_get_install zstd
|
Loading…
Reference in New Issue