| Author: | Written by Tobias Rueetschi, Adfinis SyGroup AG. |
|---|---|
| Date: | May 2018 |
| Copyright: | Copyright 2018 Adfinis SyGroup AG License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. |
| Version: | ${BACKUPCTL_VERSION} |
| Manual section: | 8 |
| Manual group: | System Manager's Manual |
backupctl COMMAND [OPTIONS]
backupctl log
backupctl [--help]
Tool to manage zfs volumes and create new dirvish vault configurations. This tool depends on a already present zfs pool, normally called backup. This tool (which is pronounced "backup cuddle") should be run with root privileges, if not possible, at least zfs fuse access as user is needed (to create new or remove existing zfs datasets and set quotas). This is more tricky and may not be tested as well as zfs with the kernel module.
All subcommands that modify zfs volumes and dirvish configurations.
Create a new customer zfs volume or a new dirvish vault inside a customer.
Resize an existing customer zfs volume or dirvish vault inside a customer. Shrinking is supported too, but if there is more data in the vault than the size you're trying to shrink to an error will occur. To unset a quota, set the parameter size to "none".
Remove an existing customer zfs volume or dirvish vault inside a customer. If removing a customer, all dirvish vaults inside this customer will be removed too.
Show the history of generating, resizing and removing customers and servers.
| -v, --vault | Specify the hostname of the dirvish vault name. |
| --dirvish-client | |
| Specify a client ip or fqdn to back up. Needed if different from option client. | |
| -h, --help | Show this help message and exit. |
| -n, --name | Customer name. Used as a logical group of dirvish vaults. |
| -s, --size | Quota of a customer or a server. Size can be written human readable as MB, GB and so on. |
The storage used in a vault is substracted from the quota of the customer. The quota of the customer should be equal or bigger than the one of the vault/server, if this isn't the case, then the quota of the customer can't be used in the full size. A quota must be defined for a customer. It may be defined for a vault/server. The summary of all quotas of vaults inside a customer can be bigger than the quota of the customer.
As an example, if the ZFS pool is 50 GB, there is one customer with 40 GB, and there are three vaults/servers with each 20 GB, each vault/server can use up to 20 GB, if all three vaults/servers are not more than 40 GB.
NAME USED AVAIL REFER
backup 35G 50G 205K
backup/customer1 35G 40G 273K
backup/customer1/www1.example.com 10G 20G 10G
backup/customer1/www2.example.com 10G 20G 10G
backup/customer1/www3.example.com 15G 20G 15GCreate a new customer with a quota of 10G.
backupctl new -n customer1 -s 10G
Resize the quota of an existing customer to 20G.
backupctl resize -n customer1 -s 20G
Remove a customer with all his servers. All data will be lost.
backupctl remove -n customer1
Create a new server/vault www.example.com for customer1 with no special quota (it will inherit the quota of the customer).
backupctl new -n customer1 -v www.example.com
Create a new server/vault www.example.com for customer1 with a quota of 10G. Data inside this server will also count on the customer level).
backupctl new -n customer1 -v www.example.com -s 10G
Create a new server/vault www.example.com which isn't directly accessible, so a special dirvish client is needed, in this case the server is reachable with the ip address 192.0.2.100.
backupctl new -n customer1 -v www.example.com -s 10G --dirvish-client 192.0.2.100
Resize the quota of the server/vault www.example.com of customer1 to the size of 20G.
backupctl resize -n customer1 -v www.example.com -s 20G
Remove the server/vault www.example.com of customer1, this will delete all the backups and also the dirvish configuration for this server.
backupctl remove -n customer1 -v www.example.com
The following exit values are returned:
Successful completion.
An error occurred.
No command was given.
System-wide configuration file.
User specific configuration file. Will overwrite the configuration options of the system-wide configuration file.
Local configuration file. Will overwrite the configuration options of any previous configuration file.
backupctl history database. This is an sqlite3 database.
backupctl.ini(5), backupctl configuration filedirvish(8), dirvish backup utility