python backup.py
Usage: backup.py [options]
Options:
-h, --help show this help message and exit
-i ID, --id=ID which id to backup, if none, backup all
-c CONFFILE, --conf=CONFFILE
configure file
-l, --list list all the configure
-d, --debug if open debug module
用法示例
$ python backup.py -i linux
[FILE-1]
FROM: /home/superman/cmdb
TO: /tmp/albert/20170507172644185
KEEP: 10
ZIP: 1
=> backup result: SUCCESS
=> tar result: SUCCESS
[FILE-2]
FROM: /home/superman/ops_backup
TO: /tmp/superman/20170507172644185
KEEP: 10
ZIP: 1
=> backup result: SUCCESS
=> tar result: SUCCESS
=> Delete: /tmp/superman/20170507160105311