backy/docs/content/cli/_index.md

146 lines
3.6 KiB
Markdown
Raw Normal View History

---
title: CLI
weight: 4
---
This page lists documentation for the CLI.
## Backy
```
Backy is a command-line application useful for configuring backups, or any commands run in sequence.
Usage:
backy [command]
Available Commands:
backup Runs commands defined in config file.
completion Generate the autocompletion script for the specified shell
cron Starts a scheduler that runs lists defined in config file.
exec Runs commands defined in config file in order given.
help Help about any command
2023-09-09 04:42:13 +00:00
list Lists commands, lists, or hosts defined in config file.
version Prints the version and exits
Flags:
-f, --config string config file to read from
-h, --help help for backy
-v, --verbose Sets verbose level
Use "backy [command] --help" for more information about a command.
```
# Subcommands
## backup
```
Backup executes commands defined in config file.
Use the --lists or -l flag to execute the specified lists. If not flag is not given, all lists will be executed.
Usage:
backy backup [--lists=list1,list2,... | -l list1, list2,...] [flags]
Flags:
-h, --help help for backup
-l, --lists strings Accepts comma-separated names of command lists to execute.
Global Flags:
-f, --config string config file to read from
-v, --verbose Sets verbose level
```
## cron
```
Cron starts a scheduler that executes command lists at the time defined in config file.
Usage:
backy cron [flags]
Flags:
-h, --help help for cron
Global Flags:
-f, --config string config file to read from
-v, --verbose Sets verbose level
```
## exec
```
Exec executes commands defined in config file in order given.
Usage:
backy exec command ... [flags]
2025-01-04 05:30:07 +00:00
backy exec [command]
Available Commands:
host Runs command defined in config file on the hosts in order specified.
Flags:
-h, --help help for exec
2025-01-04 05:30:07 +00:00
Global Flags:
-f, --config string config file to read from
-v, --verbose Sets verbose level
Use "backy exec [command] --help" for more information about a command.
```
### exec host
```
Host executes specified commands on the hosts defined in config file.
Use the --commands or -c flag to choose the commands.
Usage:
backy exec host [--commands=command1,command2, ... | -c command1,command2, ...] [--hosts=host1,hosts2, ... | -m host1,host2, ...] [flags]
Flags:
-c, --commands strings Accepts comma-separated names of commands.
-h, --help help for host
-m, --hosts strings Accepts comma-separated names of hosts.
Global Flags:
-f, --config string config file to read from
-v, --verbose Sets verbose level
```
## version
```
Prints the version and exits. No arguments just prints the version number only.
Usage:
backy version [flags]
Flags:
-h, --help help for version
2023-09-09 04:42:13 +00:00
-n, --num Output the version number only.
-V, --vpre Output the version with v prefixed.
Global Flags:
-f, --config string config file to read from
-v, --verbose Sets verbose level
```
2023-09-09 04:42:13 +00:00
## list
```
Backup lists commands or groups defined in config file.
Use the --lists or -l flag to list the specified lists. If not flag is not given, all lists will be executed.
Usage:
backy list [--list=list1,list2,... | -l list1, list2,...] [ -cmd cmd1 cmd2 cmd3...] [flags]
Flags:
2024-11-20 04:49:11 +00:00
-c, --cmds strings Accepts comma-separated names of commands to list.
2023-09-09 04:42:13 +00:00
-h, --help help for list
-l, --lists strings Accepts comma-separated names of command lists to list.
Global Flags:
-f, --config string config file to read from
-v, --verbose Sets verbose level
```