2
0

tunasync.conf 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. [global]
  2. log_dir = "/var/log/tunasync"
  3. # mirror_root = /srv/mirror_disk
  4. mirror_root = "/mnt/sdb1/mirror"
  5. use_btrfs = false
  6. local_dir = "{mirror_root}/_working/{mirror_name}/"
  7. status_file = "/tmp/tunasync.json"
  8. # maximum numbers of running jobs
  9. concurrent = 2
  10. # interval in minutes
  11. interval = 1
  12. max_retry = 2
  13. ctrl_addr = "/tmp/tunasync.sock"
  14. [btrfs]
  15. service_dir = "{mirror_root}/_current/{mirror_name}"
  16. working_dir = "{mirror_root}/_working/{mirror_name}"
  17. gc_root = "{mirror_root}/_garbage/"
  18. gc_dir = "{mirror_root}/_garbage/_gc_{mirror_name}_{{timestamp}}"
  19. # [[mirrors]]
  20. # name = "archlinux"
  21. # provider = "rsync"
  22. # upstream = "rsync://mirror.us.leaseweb.net/archlinux/"
  23. # log_file = "/tmp/archlinux-{date}.log"
  24. # use_ipv6 = true
  25. [[mirrors]]
  26. name = "arch1"
  27. provider = "shell"
  28. command = "sleep 10"
  29. local_dir = "/mnt/sdb1/mirror/archlinux/current/"
  30. # log_file = "/dev/null"
  31. exec_post_sync = "/bin/bash -c 'date --utc \"+%s\" > ${TUNASYNC_WORKING_DIR}/.timestamp'"
  32. [[mirrors]]
  33. name = "arch2"
  34. provider = "shell"
  35. command = "sleep 20"
  36. local_dir = "/mnt/sdb1/mirror/archlinux/current/"
  37. # log_file = "/dev/null"
  38. [[mirrors]]
  39. name = "arch3"
  40. provider = "two-stage-rsync"
  41. stage1_profile = "debian"
  42. upstream = "/tmp/rsync_test/src/"
  43. local_dir = "/tmp/rsync_test/dst/"
  44. log_file = "/tmp/rsync_test/log"
  45. # log_file = "/dev/null"
  46. no_delay = true
  47. [[mirrors]]
  48. name = "arch4"
  49. provider = "shell"
  50. command = "./shell_provider.sh"
  51. upstream = "https://pypi.python.org/"
  52. # log_file = "/tmp/arch4-{date}.log"
  53. use_btrfs = false
  54. # set environment varialbes
  55. [mirrors.env]
  56. REPO = "/usr/local/bin/repo"
  57. [[mirrors]]
  58. name = "arch5"
  59. provider = "shell"
  60. command = "./shell_provider.sh"
  61. upstream = "https://pypi.python.org/"
  62. # log_file = "/tmp/arch4-{date}.log"
  63. use_btrfs = false
  64. [mirrors.env]
  65. REPO = "/usr/local/bin/repo2"
  66. # vim: ft=toml ts=2 sts=2 sw=2