用于文件备份的后台插件。
backwork-backup-files的Python项目详细描述
后台备份文件
添加对^{
要求
这个插件是在^{
安装
您可以使用pip
安装此插件:
$ pip install backwork-backup-files
使用
安装插件后,您将能够使用backup files
和restore files
命令
在backwork
:
后台备份文件
$ backwork backup files -h
usage: backwork backup files [-h] -f FILE
Back up one or more files. It uses `tar -cz` which gzips the output. You can
use any of the arguments supported by `tar`. Add a list of files and
directories you want backed up as the last thing in the line. Use `tar --help`for more information.
optional arguments:
-h, --help show this help message and exit
-o FILE, --output FILE output gzipped file path
您可以传递通常与tar
:
$ backwork backup files -o foo.tgz --verbose /tmp /var/log
如--help
消息所示,有一个必需的参数
必须在备份过程中使用。
-o FILE
或--output FILE
将把tar
的输出保存到
文件。
后台还原文件
usage: backwork restore files [-h] input Restore one or more files from a .tar.gz file. It uses `tar xvzf`. You can use any of the arguments supported by `tar`. Use `tar --help`for more information. positional arguments: input .tar.gz file to restore from optional arguments: -h, --help show this help message and exit
重要信息:与-h
参数冲突,因为它是保留的
以获取帮助/用法消息。使用--dereference
跟踪符号链接。
构建和发布
特拉维斯将为你发布版本。若要生成,请将标记推送到回购:
git tag -a v0.1.2 -m 'v0.1.2'
git push --tags