From fb90d635897e5be2894e5bc158b5c35c7f7e2415 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Fri, 26 Jul 2019 09:35:22 -0700 Subject: [PATCH] shell: Added minor changes to `fs.meta.save` * added an option to set the output file name * added an option to see verbose output, default to non-verbose mode related to: https://github.com/chrislusf/seaweedfs/issues/1019 --- weed/shell/command_fs_meta_save.go | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/weed/shell/command_fs_meta_save.go b/weed/shell/command_fs_meta_save.go index 6ca395fae..e710fe297 100644 --- a/weed/shell/command_fs_meta_save.go +++ b/weed/shell/command_fs_meta_save.go @@ -2,6 +2,7 @@ package shell import ( "context" + "flag" "fmt" "io" "os" @@ -27,10 +28,11 @@ func (c *commandFsMetaSave) Name() string { func (c *commandFsMetaSave) Help() string { return `save all directory and file meta data to a local file for metadata backup. - fs.meta.save / # save from the root - fs.meta.save /path/to/save # save from the directory /path/to/save - fs.meta.save . # save from current directory - fs.meta.save # save from current directory + fs.meta.save / # save from the root + fs.meta.save -v -o t.meta / # save from the root, output to t.meta file. + fs.meta.save /path/to/save # save from the directory /path/to/save + fs.meta.save . # save from current directory + fs.meta.save # save from current directory The meta data will be saved into a local --