mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
core: update backup filename format
This commit is contained in:
1 parent
7218390c3b
commit
c28f2b3437
2 files changed
+2
-2
No files matched your search
@@ -130,7 +130,7 @@ if (argv.args[0] === 'backup') {
|
||||
exec('mongodump', [url, `--out=${dir}/dump`], { stdio: 'inherit' });
|
||||
const env = `${os.homedir()}/.hydro/env`;
|
||||
if (fs.existsSync(env)) fs.copySync(env, `${dir}/env`);
|
||||
const target = `${process.cwd()}/backup-${new Date().toISOString()}.zip`;
|
||||
const target = `${process.cwd()}/backup-${new Date().toISOString().replace(':', '-').split(':')[0]}.zip`;
|
||||
exec('zip', ['-r', target, 'dump'], { cwd: dir, stdio: 'inherit' });
|
||||
if (!argv.options.dbOnly) {
|
||||
exec('zip', ['-r', target, 'file'], { cwd: '/data', stdio: 'inherit' });
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hydrooj",
|
||||
"version": "3.9.4",
|
||||
"version": "3.9.5",
|
||||
"bin": "bin/hydrooj.js",
|
||||
"main": "src/loader",
|
||||
"module": "src/loader",
|
||||
|
||||
Reference in new issue
Block a user