|
|
|
@ -2,11 +2,12 @@ import json |
|
|
|
import os |
|
|
|
|
|
|
|
def main(): |
|
|
|
backup_path = '/Users/Jowe1999/Desktop/test' |
|
|
|
with open('config.json', 'r') as config_file: |
|
|
|
config = json.load(config_file) |
|
|
|
|
|
|
|
for host in config: |
|
|
|
backup_path = config['local']['path'] |
|
|
|
|
|
|
|
for host in config['remote']: |
|
|
|
print('conect to ' + host) |
|
|
|
for service in config[host]: |
|
|
|
backup_dir = '{}/{}'.format(backup_path, service).lower() |
|
|
|
|