skeleton
This commit is contained in:
commit
10aaa9009f
|
@ -0,0 +1,5 @@
|
||||||
|
.DS_Store
|
||||||
|
__pycache__
|
||||||
|
resticbackup.egg-info/
|
||||||
|
testenv/
|
||||||
|
test_data/
|
|
@ -0,0 +1,34 @@
|
||||||
|
|
||||||
|
def load_configs():
|
||||||
|
# load configs from /etc/resticbackup.d/
|
||||||
|
# we have special handling for /etc/resticbackup.d/main.json
|
||||||
|
# return (main_config, dict(config_name=>config))
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
def cmd_backup(args, parser):
|
||||||
|
config, backup_configs = load_configs()
|
||||||
|
|
||||||
|
try:
|
||||||
|
backup_config = backup_configs[args.name]
|
||||||
|
except KeyError:
|
||||||
|
parser.error("invalid backup name: '{}'".format(args.name))
|
||||||
|
|
||||||
|
# perform pre-exec
|
||||||
|
|
||||||
|
# perform backup
|
||||||
|
|
||||||
|
# perform post-exec
|
||||||
|
|
||||||
|
|
||||||
|
def cmd_restore(args, parser):
|
||||||
|
pass # TODO
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
print("welcome 2 resticbackup")
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main()
|
|
@ -0,0 +1,20 @@
|
||||||
|
from setuptools import setup
|
||||||
|
|
||||||
|
|
||||||
|
__version__ = "0.0.0"
|
||||||
|
|
||||||
|
|
||||||
|
setup(name='resticbackup',
|
||||||
|
version=__version__,
|
||||||
|
description='Wrapper around restic for automated backups',
|
||||||
|
url='',
|
||||||
|
author='dpedu',
|
||||||
|
author_email='dave@davepedu.com',
|
||||||
|
packages=['resticbackup'],
|
||||||
|
install_requires=[],
|
||||||
|
entry_points={
|
||||||
|
"console_scripts": [
|
||||||
|
"resticbackup = resticbackup.cli:main",
|
||||||
|
]
|
||||||
|
},
|
||||||
|
zip_safe=False)
|
Loading…
Reference in New Issue