Skip to content

Commit 11df72b

Browse files
authored
Merge pull request #617 from kojoty/pju-fixes
#615 fix: compress all files from directory with json chunks of DB
2 parents baa3005 + 0bb0d65 commit 11df72b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

okapi/services/replicate/ReplicateCommon.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -597,8 +597,11 @@ public static function generate_fulldump()
597597

598598
$dumpfile_tarname = "okapi-dump.tar";
599599
$dumpfilename = $dumpfile_tarname.($use_bzip2 ? ".bz2" : ".gz");
600+
601+
# First create empty archive; next add to them the rest of files - then tar not return any warning
600602
self::execute(
601-
"tar --directory $dir -c".($use_bzip2 ? "j" : "z")."f $dir/$dumpfilename index.json ".implode(" ", $json_files),
603+
"touch $dir/$dumpfilename; ".
604+
"tar --directory $dir -c".($use_bzip2 ? "j" : "z")."f $dir/$dumpfilename --exclude=$dumpfilename .",
602605
$shell_output
603606
);
604607

0 commit comments

Comments
 (0)