b483487090a96fc4ee228b256b388706.yaml.php 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. <?php
  2. return [
  3. '@class' => 'Grav\\Common\\File\\CompiledYamlFile',
  4. 'filename' => '/var/www/html/system/blueprints/config/backups.yaml',
  5. 'modified' => 1591823779,
  6. 'data' => [
  7. 'title' => 'PLUGIN_ADMIN.BACKUPS',
  8. 'form' => [
  9. 'validation' => 'loose',
  10. 'fields' => [
  11. 'history_title' => [
  12. 'type' => 'section',
  13. 'title' => 'PLUGIN_ADMIN.BACKUPS_HISTORY',
  14. 'underline' => true
  15. ],
  16. 'history' => [
  17. 'type' => 'backupshistory'
  18. ],
  19. 'config_title' => [
  20. 'type' => 'section',
  21. 'title' => 'PLUGIN_ADMIN.BACKUPS_PURGE_CONFIG',
  22. 'underline' => true
  23. ],
  24. 'purge.trigger' => [
  25. 'type' => 'select',
  26. 'label' => 'PLUGIN_ADMIN.BACKUPS_STORAGE_PURGE_TRIGGER',
  27. 'size' => 'medium',
  28. 'default' => 'space',
  29. 'options' => [
  30. 'space' => 'Maximum Backup Space',
  31. 'number' => 'Maximum Number of Backups',
  32. 'time' => 'maximum Retention Time'
  33. ],
  34. 'validate' => [
  35. 'required' => true
  36. ]
  37. ],
  38. 'purge.max_backups_count' => [
  39. 'type' => 'number',
  40. 'label' => 'PLUGIN_ADMIN.BACKUPS_MAX_COUNT',
  41. 'default' => 25,
  42. 'size' => 'x-small',
  43. 'help' => 'PLUGIN_ADMIN.BACKUPS_MAX_COUNT',
  44. 'validate' => [
  45. 'min' => 0,
  46. 'type' => 'number',
  47. 'required' => true,
  48. 'message' => 'Must be a number 0 or greater'
  49. ]
  50. ],
  51. 'purge.max_backups_space' => [
  52. 'type' => 'number',
  53. 'label' => 'PLUGIN_ADMIN.BACKUPS_MAX_SPACE',
  54. 'append' => 'in GB',
  55. 'size' => 'x-small',
  56. 'default' => 5,
  57. 'validate' => [
  58. 'min' => 1,
  59. 'type' => 'number',
  60. 'required' => true,
  61. 'message' => 'Space must be 1GB or greater'
  62. ]
  63. ],
  64. 'purge.max_backups_time' => [
  65. 'type' => 'number',
  66. 'label' => 'PLUGIN_ADMIN.BACKUPS_MAX_RETENTION_TIME',
  67. 'append' => 'PLUGIN_ADMIN.BACKUPS_MAX_RETENTION_TIME_APPEND',
  68. 'size' => 'x-small',
  69. 'default' => 365,
  70. 'validate' => [
  71. 'min' => 7,
  72. 'type' => 'number',
  73. 'required' => true,
  74. 'message' => 'Rentenion days must be 7 or greater'
  75. ]
  76. ],
  77. 'profiles_title' => [
  78. 'type' => 'section',
  79. 'title' => 'PLUGIN_ADMIN.BACKUPS_PROFILES',
  80. 'underline' => true
  81. ],
  82. 'profiles' => [
  83. 'type' => 'list',
  84. 'style' => 'vertical',
  85. 'label' => NULL,
  86. 'classes' => 'backups-list compact',
  87. 'sort' => false,
  88. 'fields' => [
  89. '.name' => [
  90. 'type' => 'text',
  91. 'label' => 'PLUGIN_ADMIN.NAME',
  92. 'placeholder' => 'PLUGIN_ADMIN.BACKUPS_PROFILE_NAME',
  93. 'validate' => [
  94. 'max' => 20,
  95. 'message' => 'Name must be less than 20 characters',
  96. 'required' => true
  97. ]
  98. ],
  99. '.root' => [
  100. 'type' => 'text',
  101. 'label' => 'PLUGIN_ADMIN.BACKUPS_PROFILE_ROOT_FOLDER',
  102. 'help' => 'PLUGIN_ADMIN.BACKUPS_PROFILE_ROOT_FOLDER_HELP',
  103. 'placeholder' => '/',
  104. 'default' => '/',
  105. 'validate' => [
  106. 'required' => true
  107. ]
  108. ],
  109. '.exclude_paths' => [
  110. 'type' => 'textarea',
  111. 'label' => 'PLUGIN_ADMIN.BACKUPS_PROFILE_EXCLUDE_PATHS',
  112. 'rows' => 5,
  113. 'placeholder' => '/backup /cache /images /logs /tmp',
  114. 'help' => 'PLUGIN_ADMIN.BACKUPS_PROFILE_EXCLUDE_PATHS_HELP'
  115. ],
  116. '.exclude_files' => [
  117. 'type' => 'textarea',
  118. 'label' => 'PLUGIN_ADMIN.BACKUPS_PROFILE_EXCLUDE_FILES',
  119. 'rows' => 5,
  120. 'placeholder' => '.DS_Store .git .svn .hg .idea .vscode node_modules',
  121. 'help' => 'PLUGIN_ADMIN.BACKUPS_PROFILE_EXCLUDE_FILES_HELP'
  122. ],
  123. '.schedule' => [
  124. 'type' => 'toggle',
  125. 'label' => 'PLUGIN_ADMIN.BACKUPS_PROFILE_SCHEDULE',
  126. 'highlight' => 1,
  127. 'default' => 1,
  128. 'options' => [
  129. 1 => 'PLUGIN_ADMIN.YES',
  130. 0 => 'PLUGIN_ADMIN.NO'
  131. ],
  132. 'validate' => [
  133. 'type' => 'bool'
  134. ]
  135. ],
  136. '.schedule_at' => [
  137. 'type' => 'cron',
  138. 'label' => 'PLUGIN_ADMIN.BACKUPS_PROFILE_SCHEDULE_AT',
  139. 'default' => '* 3 * * *',
  140. 'validate' => [
  141. 'required' => true
  142. ]
  143. ]
  144. ]
  145. ]
  146. ]
  147. ]
  148. ]
  149. ];