@@ 15-44 (lines=30) @@ | ||
12 | /** |
|
13 | * @method \Nexus\Dumper\DumperFacade getFacade() |
|
14 | */ |
|
15 | class ClearCommand extends AbstractCommand |
|
16 | { |
|
17 | protected function configure() |
|
18 | { |
|
19 | $this |
|
20 | ->setName('dumper:clear') |
|
21 | ->setDescription('Clear one volume') |
|
22 | ->addArgument('volume', InputArgument::REQUIRED, 'The volume to dump') |
|
23 | ->addArgument('path', InputArgument::OPTIONAL, 'The path inside the volume to dump', '/data') |
|
24 | ->addArgument('version', InputArgument::OPTIONAL, 'The version for naming of your restore', 'master'); |
|
25 | } |
|
26 | ||
27 | /** |
|
28 | * @param \Symfony\Component\Console\Input\InputInterface $input |
|
29 | * @param \Symfony\Component\Console\Output\OutputInterface $output |
|
30 | * |
|
31 | * @return int|null|void |
|
32 | * @throws \Core\Locator\Dynamic\ServiceNotParseable |
|
33 | * @throws \Xervice\Config\Exception\ConfigNotFound |
|
34 | */ |
|
35 | protected function execute(InputInterface $input, OutputInterface $output) |
|
36 | { |
|
37 | $this->getFacade()->dumpToLocal( |
|
38 | $input->getArgument('volume'), |
|
39 | $input->getArgument('path'), |
|
40 | $input->getArgument('version') |
|
41 | ); |
|
42 | } |
|
43 | ||
44 | } |
@@ 15-44 (lines=30) @@ | ||
12 | /** |
|
13 | * @method \Nexus\Dumper\DumperFacade getFacade() |
|
14 | */ |
|
15 | class DumpLocalCommand extends AbstractCommand |
|
16 | { |
|
17 | protected function configure() |
|
18 | { |
|
19 | $this |
|
20 | ->setName('dumper:dump:local') |
|
21 | ->setDescription('Dump one volume') |
|
22 | ->addArgument('volume', InputArgument::REQUIRED, 'The volume to dump') |
|
23 | ->addArgument('path', InputArgument::OPTIONAL, 'The path inside the volume to dump', '/data') |
|
24 | ->addArgument('version', InputArgument::OPTIONAL, 'The version for naming of your restore', 'master'); |
|
25 | } |
|
26 | ||
27 | /** |
|
28 | * @param \Symfony\Component\Console\Input\InputInterface $input |
|
29 | * @param \Symfony\Component\Console\Output\OutputInterface $output |
|
30 | * |
|
31 | * @return int|null|void |
|
32 | * @throws \Core\Locator\Dynamic\ServiceNotParseable |
|
33 | * @throws \Xervice\Config\Exception\ConfigNotFound |
|
34 | */ |
|
35 | protected function execute(InputInterface $input, OutputInterface $output) |
|
36 | { |
|
37 | $this->getFacade()->dumpToLocal( |
|
38 | $input->getArgument('volume'), |
|
39 | $input->getArgument('path'), |
|
40 | $input->getArgument('version') |
|
41 | ); |
|
42 | } |
|
43 | ||
44 | } |
@@ 15-43 (lines=29) @@ | ||
12 | /** |
|
13 | * @method \Nexus\Dumper\DumperFacade getFacade() |
|
14 | */ |
|
15 | class DumpSshCommand extends AbstractCommand |
|
16 | { |
|
17 | protected function configure() |
|
18 | { |
|
19 | $this |
|
20 | ->setName('dumper:dump:ssh') |
|
21 | ->setDescription('Dump one volume to ssh') |
|
22 | ->addArgument('volume', InputArgument::REQUIRED, 'The volume to dump') |
|
23 | ->addArgument('path', InputArgument::OPTIONAL, 'The path inside the volume to dump', '/data') |
|
24 | ->addArgument('version', InputArgument::OPTIONAL, 'The version for naming of your restore', 'master'); |
|
25 | } |
|
26 | ||
27 | /** |
|
28 | * @param \Symfony\Component\Console\Input\InputInterface $input |
|
29 | * @param \Symfony\Component\Console\Output\OutputInterface $output |
|
30 | * |
|
31 | * @return int|null|void |
|
32 | * @throws \Xervice\Config\Exception\ConfigNotFound |
|
33 | */ |
|
34 | protected function execute(InputInterface $input, OutputInterface $output) |
|
35 | { |
|
36 | $this->getFacade()->dumpToSsh( |
|
37 | $input->getArgument('volume'), |
|
38 | $input->getArgument('path'), |
|
39 | $input->getArgument('version') |
|
40 | ); |
|
41 | } |
|
42 | ||
43 | } |
@@ 15-44 (lines=30) @@ | ||
12 | /** |
|
13 | * @method \Nexus\Dumper\DumperFacade getFacade() |
|
14 | */ |
|
15 | class RestoreLocalCommand extends AbstractCommand |
|
16 | { |
|
17 | protected function configure() |
|
18 | { |
|
19 | $this |
|
20 | ->setName('dumper:restore:local') |
|
21 | ->setDescription('Restore one volume') |
|
22 | ->addArgument('volume', InputArgument::REQUIRED, 'The volume to restore') |
|
23 | ->addArgument('path', InputArgument::OPTIONAL, 'The path inside the volume to dump', '/data') |
|
24 | ->addArgument('version', InputArgument::OPTIONAL, 'The version for naming of your restore', 'master'); |
|
25 | } |
|
26 | ||
27 | /** |
|
28 | * @param \Symfony\Component\Console\Input\InputInterface $input |
|
29 | * @param \Symfony\Component\Console\Output\OutputInterface $output |
|
30 | * |
|
31 | * @return int|null|void |
|
32 | * @throws \Core\Locator\Dynamic\ServiceNotParseable |
|
33 | * @throws \Xervice\Config\Exception\ConfigNotFound |
|
34 | */ |
|
35 | protected function execute(InputInterface $input, OutputInterface $output) |
|
36 | { |
|
37 | $this->getFacade()->restoreToLocal( |
|
38 | $input->getArgument('volume'), |
|
39 | $input->getArgument('path'), |
|
40 | $input->getArgument('version') |
|
41 | ); |
|
42 | } |
|
43 | ||
44 | } |
@@ 15-44 (lines=30) @@ | ||
12 | /** |
|
13 | * @method \Nexus\Dumper\DumperFacade getFacade() |
|
14 | */ |
|
15 | class RestoreSshCommand extends AbstractCommand |
|
16 | { |
|
17 | protected function configure() |
|
18 | { |
|
19 | $this |
|
20 | ->setName('dumper:restore:ssh') |
|
21 | ->setDescription('Restore one volume to ssh') |
|
22 | ->addArgument('volume', InputArgument::REQUIRED, 'The volume to restore') |
|
23 | ->addArgument('path', InputArgument::OPTIONAL, 'The path inside the volume to dump', '/data') |
|
24 | ->addArgument('version', InputArgument::OPTIONAL, 'The version for naming of your restore', 'master'); |
|
25 | } |
|
26 | ||
27 | /** |
|
28 | * @param \Symfony\Component\Console\Input\InputInterface $input |
|
29 | * @param \Symfony\Component\Console\Output\OutputInterface $output |
|
30 | * |
|
31 | * @return int|null|void |
|
32 | * @throws \Core\Locator\Dynamic\ServiceNotParseable |
|
33 | * @throws \Xervice\Config\Exception\ConfigNotFound |
|
34 | */ |
|
35 | protected function execute(InputInterface $input, OutputInterface $output) |
|
36 | { |
|
37 | $this->getFacade()->restoreToSsh( |
|
38 | $input->getArgument('volume'), |
|
39 | $input->getArgument('path'), |
|
40 | $input->getArgument('version') |
|
41 | ); |
|
42 | } |
|
43 | ||
44 | } |