Configuration

GoBackup will read config from follow paths:

  • ~/.gobackup/gobackup.yml
  • /etc/gobackup.yml

You must use YAML format.

Full config struct

  1. # root
  2. models:
  3. # special a model name
  4. model_name1:
  5. # config compress
  6. compress_with:
  7. # compress type
  8. type: tgz
  9. # storage
  10. store_with:
  11. # storage type
  12. type: ftp
  13. # other config for this storage type
  14. host: ftp.your-host.com
  15. username: ...
  16. password: ...
  17. # database source support multiple instance
  18. databases:
  19. # special a database name
  20. my_app1:
  21. # database type
  22. type: mysql
  23. # other config for this database type
  24. host: localhost
  25. database: my_app_production
  26. username: root
  27. my_app_redis1:
  28. type: redis
  29. host: localhost
  30. port: 6379
  31. mode: sync
  32. my_app_redis2:
  33. type: redis
  34. host: localhost
  35. port: 6380
  36. mode: sync
  37. # archive config
  38. archive:
  39. # archive multiple files / directoies
  40. includes:
  41. - /home/git/.ssh/
  42. - /etc/mysql/my.conf
  43. - /etc/nginx/nginx.conf
  44. - /etc/nginx/conf.d
  45. - /etc/redis/redis.conf
  46. - /etc/logrotate.d/
  47. # path will exclude
  48. excludes:
  49. - /home/ubuntu/.ssh/known_hosts
  50. - /etc/logrotate.d/syslog
  51. # another model
  52. my_app2:
  53. compress_with:
  54. type: tgz
  55. store_with:
  56. type: local
  57. path: /data/backups/my_app2
  58. databases:
  59. ...