mysync/example/sync_config.py

28 rindas
952 B
Python

import os
import sys
backup = False
hosts = ['ahorn', 'erle', 'linde']
__basepath__ = '/usr/data'
entries = (
('dirk@%s:/usr/data', __basepath__, ['lost+found']),
('dirk@%s:/usr/data', __basepath__, ['lost+found', 'dirk/Audio', 'dirk/bin', 'dirk/Downloads', 'dirk/gnome-boxes', 'dirk/media_images', 'dirk/Videos']),
('dirk@%s:/home', '/home', None),
)
for host in hosts:
for remote, local, skip in entries:
name = os.path.basename(local)
if skip is not None:
if len(skip) > 1:
name += '_short'
setattr(sys.modules[__name__], host + '_' + name + '_skip', skip)
setattr(sys.modules[__name__], host + '_' + name + '_remotepath', remote % host)
setattr(sys.modules[__name__], host + '_' + name + '_localpath', local)
mount_mockery_audio_remotepath = 'root@mount-mockery.de:/data/audio'
mount_mockery_audio_localpath = os.path.join(__basepath__, 'dirk', 'Audio')