benten restore

目的

  • リポジトリからローカルストレージへとデータを復帰させます (登録名を指定)。

Warning

事前にログイン認証を行う必要があります。

利用例

  • Help
$ benten.py restore -h
usage: benten restore [-h] [--current_directory [CURRENT_DIRECTORY]]
                      [--disable_hash] [--flag_veto_init]
                      register_basename

positional arguments:
  register_basename     register_basename

optional arguments:
  -h, --help            show this help message and exit
  --current_directory [CURRENT_DIRECTORY], -c [CURRENT_DIRECTORY]
                        current directory
  --disable_hash        disable hash check for downloaded file
  --flag_veto_init, -v  flag to veto init_index
  • Restore例
$ benten.py restore test
### benten restore ###
[LocalStorage::authorize] access_token = b2f1db85266043759ced20a1b5053fb9
==> downloaded with file = /disk/data1/test.json
==> check consitency with hash = 4cdb2c555c08a9d787a2e61103dff0f8
==> downloaded with file = /disk/data11/test.system.json
==> check consitency with hash = 49b71db137ce7da3b8ce26f62f643722
==> restore completed for register_name=/SPring-8/BL14B2/test/test
{
    "register_name":"/SPring-8/BL14B2/test/test",
    "file_list_restored":[
        {
            "size":44,
            "name":"/SPring-8/BL14B2/test/test.json",
            "time":"2018-08-15 18:14:05",
            "hash":"4cdb2c555c08a9d787a2e61103dff0f8",
            "uuid_name":"f711865e-e391-48a3-8a3d-6ce497137ce8",
            "register_name":"/SPring-8/BL14B2/test/test"
        },
        {
            "size":425,
            "name":"/SPring-8/BL14B2/test/test.system.json",
            "time":"2019-03-09 21:18:35",
            "hash":"49b71db137ce7da3b8ce26f62f643722",
            "uuid_name":"eca2bee5-9440-4469-b8cf-e96b61e3640f",
            "register_name":"/SPring-8/BL14B2/test/test"
        }
    ]
}