Tool to sync or backup data
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

sync_config.py 984B

12345678910111213141516171819202122232425
  1. import os
  2. import sys
  3. backup = False
  4. hosts = ['ahorn', 'erle', 'linde']
  5. __basepath__ = '/user_data'
  6. entries = (
  7. ('dirk@%s:/user_data/bin', os.path.join(__basepath__, 'bin'), None),
  8. ('dirk@%s:/user_data/data', os.path.join(__basepath__, 'data'), None),
  9. ('dirk@%s:/user_data/static_data', os.path.join(__basepath__, 'static_data'), ['Audio', 'timeshift', 'lost+found']),
  10. ('dirk@%s:/home', '/home', None),
  11. )
  12. for host in hosts:
  13. for remote, local, skip in entries:
  14. setattr(sys.modules[__name__], host + '_' + os.path.basename(local) + '_remotepath', remote % host)
  15. setattr(sys.modules[__name__], host + '_' + os.path.basename(local) + '_localpath', local)
  16. if skip is not None:
  17. setattr(sys.modules[__name__], host + '_' + os.path.basename(local) + '_skip', skip)
  18. mount_mockery_audio_remotepath = 'root@mount-mockery.de:/data/audio/items'
  19. mount_mockery_audio_localpath = os.path.join(__basepath__, 'static_data', 'dirk', 'Audio')