├── .editorconfig ├── .github ├── config.yml ├── dependabot.yml ├── issue_template.md ├── pull_request_template.md ├── release-drafter.yml ├── stale.yml ├── support.yml └── workflows │ └── add-to-project.yml ├── .gitignore ├── .scrutinizer.yml ├── .travis.yml ├── CHANGELOG.md ├── CONTRIBUTING.md ├── LICENSE.md ├── README.md ├── UPGRADE_GUIDES.md ├── composer.json ├── issue_template.md └── src ├── BackupManagerServiceProvider.php ├── app └── Http │ └── Controllers │ └── BackupController.php ├── config └── backupmanager.php ├── resources ├── lang │ ├── ar │ │ └── backup.php │ ├── en │ │ └── backup.php │ ├── es │ │ └── backup.php │ ├── fa │ │ └── backup.php │ ├── fr │ │ └── backup.php │ ├── gr │ │ └── backup.php │ ├── id │ │ └── backup.php │ ├── it │ │ └── backup.php │ ├── nl │ │ └── backup.php │ ├── pt │ │ └── backup.php │ ├── pt_br │ │ └── backup.php │ ├── ro │ │ └── backup.php │ ├── ru │ │ └── backup.php │ ├── se │ │ └── backup.php │ ├── tr │ │ └── backup.php │ ├── uk │ │ └── backup.php │ └── zh │ │ └── backup.php └── views │ └── backup.blade.php └── routes └── backpack └── backupmanager.php /.editorconfig: -------------------------------------------------------------------------------- 1 | ; This file is for unifying the coding style for different editors and IDEs. 2 | ; More information at http://editorconfig.org 3 | 4 | root = true 5 | 6 | [*] 7 | charset = utf-8 8 | indent_size = 4 9 | indent_style = space 10 | end_of_line = lf 11 | insert_final_newline = true 12 | trim_trailing_whitespace = true 13 | 14 | [*.md] 15 | trim_trailing_whitespace = false 16 | -------------------------------------------------------------------------------- /.github/config.yml: -------------------------------------------------------------------------------- 1 | # Configuration for welcome - https://github.com/behaviorbot/welcome 2 | 3 | # Configuration for new-issue-welcome - https://github.com/behaviorbot/new-issue-welcome 4 | 5 | # Comment to be posted to on first time issues 6 | newIssueWelcomeComment: > 7 | Hello there! Thanks for opening your first issue on this repo! 8 | 9 | Just a heads-up: **Here at Backpack we use Github Issues only for tracking bugs**. Talk about new features is also acceptable. This helps _a lot_ in keeping our focus on improving Backpack. **If you issue is not a bug/feature, please help us out by closing the issue yourself and posting in the appropriate medium (see below)**. If you're not sure where it fits, it's ok, a community member will probably reply to help you with that. 10 | 11 | Backpack communication mediums: 12 | - Bug Reports, Feature Requests - Github Issues (here); 13 | - Quick help (_How do I do X_) - [Gitter Chatroom](gitter.im/BackpackForLaravel/Lobby); 14 | - Long questions (_I have done X and Y and it won't do Z wtf_) - [Stackoverflow](https://stackoverflow.com/questions/tagged/backpack-for-laravel), using the ```backpack-for-laravel``` tag; 15 | 16 | Please keep in mind Backpack offers no official / paid support. Whatever help you receive here, on Gitter, Slack or Stackoverflow is thanks to our awesome _awesome_ community members, who give up some of their time to help their peers. If you want to join our community, just start pitching in. We take pride in being a welcoming bunch. 17 | 18 | Thank you! 19 | 20 | -- 21 | Justin Case 22 | The Backpack Robot 23 | 24 | # Configuration for new-pr-welcome - https://github.com/behaviorbot/new-pr-welcome 25 | 26 | # Comment to be posted to on PRs from first time contributors in your repository 27 | newPRWelcomeComment: > 28 | BOOM! Your first PR with us, thank you so much! Someone will take a look at it shortly. 29 | 30 | Please keep in mind that: 31 | - **if this constitutes a breaking change, it might take quite a while for this to get merged**; we try to emulate the Laravel release cycle as much as possible, so developers can upgrade both software once; this means a new big release every ~6 months; 32 | - **even if it's a non-breaking change, it might take a few days/weeks for the PR to get merged**; unless it's a no-brainer, **we like to have some community feedback on new features, before we merge them**; this leads to higher-quality code, in the end; we learnt this the hard way :-) 33 | - **not all PRs get merged**; sometimes we just have to hold out new features, to keep the packages lean; sometimes we don't include features that only apply to niche use cases; 34 | - **we're not perfect**; if you think we're wrong, call us out on it; but in a kind way :-) we all make mistakes, best we learn from them and build better software together; 35 | 36 | Thank you! 37 | 38 | -- 39 | Justin Case 40 | The Backpack Robot 41 | 42 | # Configuration for first-pr-merge - https://github.com/behaviorbot/first-pr-merge 43 | 44 | # Comment to be posted to on pull requests merged by a first time user 45 | firstPRMergeComment: > 46 | WHOOP-WHOOP! Congrats, your first PR on this repo has officialy been merged. 47 | 48 | ![party](https://media1.giphy.com/media/3KC2jD2QcBOSc/giphy.gif "Party!!!") 49 | 50 | If you want to help out the community in other ways, you can: 51 | - **give your opinion on other Github Issues & PRs**; 52 | - **chat with others** in the [Gitter Chatroom](gitter.im/BackpackForLaravel/Lobby) (usually for quick help: _How do I do X_); 53 | - **answer Backpack questions on [Stackoverflow](https://stackoverflow.com/questions/tagged/backpack-for-laravel)**; you get points, people get help; you can subscribe to the ```backpack-for-laravel``` tag by [adding a new filter](https://stackexchange.com/filters/256210/my-filter-3); that will send you emails when new questions come up with our tag; 54 | 55 | Again. Thank you for the PR. You are a wonderful person. Keep 'em coming :-) 56 | Cheers! 57 | 58 | -- 59 | Justin Case 60 | The Backpack Robot 61 | 62 | P.S. **Help in the Backpack community is rewarded with free Backpack commercial licenses**. It's the least we can do. If you feel you've helped the community with PRs, help & other stuff, please [shoot Tabacitu an email](mailto:hello@tabacitu.ro) and ask him if you qualify for free licenses. You scratch my back, I scratch your back. Thank you! 63 | 64 | # It is recommend to include as many gifs and emojis as possible 65 | # 66 | # --------------------------------------------------------------------------------------------- 67 | # 68 | # Configuration for request-info - https://github.com/behaviorbot/request-info 69 | 70 | # *OPTIONAL* Comment to reply with 71 | # Can be either a string : 72 | requestInfoReplyComment: > 73 | Hi there! 74 | 75 | Could you please provide us with more info about this? Looks like you skipped the title/body. 76 | 77 | Thank you! 78 | 79 | -- 80 | Justin Case 81 | The Backpack Robot 82 | 83 | # Or an array: 84 | # requestInfoReplyComment: 85 | # - Ah no! young blade! That was a trifle short! 86 | # - Tell me more ! 87 | # - I am sure you can be more effusive 88 | 89 | 90 | # *OPTIONAL* default titles to check against for lack of descriptiveness 91 | # MUST BE ALL LOWERCASE 92 | requestInfoDefaultTitles: 93 | # - update readme.md 94 | - updates 95 | 96 | # *OPTIONAL* Label to be added to Issues and Pull Requests with insufficient information given 97 | requestInfoLabelToAdd: needs-more-info 98 | 99 | # *OPTIONAL* Only warn about insufficient information on these events type 100 | # Keys must be lowercase. Valid values are 'issue' and 'pullRequest' 101 | requestInfoOn: 102 | pullRequest: true 103 | issue: true 104 | 105 | # *OPTIONAL* Add a list of people whose Issues/PRs will not be commented on 106 | # keys must be GitHub usernames 107 | requestInfoUserstoExclude: 108 | - tabacitu 109 | 110 | # --------------------------------------------------------------------------------------------- 111 | # -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: composer 4 | directory: "/" 5 | schedule: 6 | interval: monthly 7 | open-pull-requests-limit: 10 8 | -------------------------------------------------------------------------------- /.github/issue_template.md: -------------------------------------------------------------------------------- 1 | # Bug report 2 | 3 | ### What I did: 4 | 5 | ### What I expected to happen: 6 | 7 | ### What happened: 8 | 9 | ### What I've already tried to fix it: 10 | 11 | ### Backpack, Laravel, PHP, DB version: 12 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | ## WHY 2 | 3 | ### BEFORE - What was wrong? What was happening before this PR? 4 | 5 | ?? 6 | 7 | ### AFTER - What is happening after this PR? 8 | 9 | ?? 10 | 11 | 12 | ## HOW 13 | 14 | ### How did you achieve that, in technical terms? 15 | 16 | ?? 17 | 18 | 19 | 20 | ### Is it a breaking change or non-breaking change? 21 | 22 | ?? 23 | 24 | 25 | ### How can we test the before & after? 26 | 27 | ?? 28 | -------------------------------------------------------------------------------- /.github/release-drafter.yml: -------------------------------------------------------------------------------- 1 | name: Release Drafter 2 | 3 | on: 4 | push: 5 | # branches to consider in the event; optional, defaults to all 6 | branches: 7 | - master 8 | 9 | jobs: 10 | update_release_draft: 11 | runs-on: ubuntu-latest 12 | steps: 13 | # Drafts your next Release notes as Pull Requests are merged into "master" 14 | - uses: release-drafter/release-drafter@v5 15 | env: 16 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 17 | 18 | name-template: 'v$NEXT_PATCH_VERSION 🌈' 19 | tag-template: 'v$NEXT_PATCH_VERSION' 20 | categories: 21 | - title: '🚀 Features' 22 | labels: 23 | - 'feature' 24 | - 'enhancement' 25 | - 'added' 26 | - title: '🐛 Bug Fixes' 27 | labels: 28 | - 'fix' 29 | - 'bugfix' 30 | - 'bug' 31 | - 'fixed' 32 | - title: '⚙️ Changes' 33 | labels: 34 | - 'changed' 35 | - 'dependencies' 36 | - title: '🧰 Removed' 37 | label: 'removed' 38 | change-template: '- $TITLE @$AUTHOR (#$NUMBER)' 39 | template: | 40 | ## Changes 41 | 42 | $CHANGES -------------------------------------------------------------------------------- /.github/stale.yml: -------------------------------------------------------------------------------- 1 | ##################################### 2 | # Github Stale Probot Configuration # 3 | # ################################### 4 | # https://probot.github.io/apps/stale/ 5 | 6 | # Number of days of inactivity before an issue becomes stale 7 | daysUntilStale: 60 8 | # Number of days of inactivity before a stale issue is closed 9 | daysUntilClose: 14 10 | # Issues with these labels will never be considered stale 11 | exemptLabels: 12 | - pinned 13 | - security 14 | - feature 15 | - urgent 16 | - ready 17 | - working on it 18 | - bug 19 | 20 | # Label to use when marking an issue as stale 21 | staleLabel: stale 22 | # Comment to post when marking an issue as stale. Set to `false` to disable 23 | markComment: > 24 | Hi there! 25 | 26 | 27 | **Is this still an issue?** No activity in 60 days. I'm going to mark it as stale for now, and close it in 14 days if no further activity occurs. I know you guys are all busy, but if this is important to you please reply or something, so I know not to close it. 28 | 29 | 30 | Thank you! 31 | 32 | 33 | -- 34 | 35 | Justin Case 36 | 37 | The Backpack Robot 38 | 39 | # Comment to post when closing a stale issue. Set to `false` to disable 40 | closeComment: true 41 | -------------------------------------------------------------------------------- /.github/support.yml: -------------------------------------------------------------------------------- 1 | # Configuration for support-requests - https://github.com/dessant/support-requests 2 | 3 | # Label used to mark issues as support requests 4 | supportLabel: Ask-It-On-Stack-Overflow 5 | # Comment to post on issues marked as support requests. Add a link 6 | # to a support page, or set to `false` to disable 7 | supportComment: > 8 | Oups! 9 | 10 | 11 | Looks like this is a support request, not a bug/feature. **Could you please [repost on StackOverflow](https://stackoverflow.com/questions/tagged/backpack-for-laravel), using the ```backpack-for-laravel``` tag**? 12 | 13 | 14 | Background: **Here at Backpack we use Github Issues only for tracking bugs and features**, not individual implementation issues. This helps _a lot_ in keeping our focus on improving Backpack. Thanks a lot for understanding! 15 | 16 | 17 | Here are all the Backpack communication mediums: 18 | - Long questions (_I have done X and Y and it won't do Z wtf_) - [Stackoverflow](https://stackoverflow.com/questions/tagged/backpack-for-laravel), using the ```backpack-for-laravel``` tag; this is recommended for most questions, since other developers can then find the answer on a simple Google search; also, people get points for answering - and who doesn't like StackOverflow points?! 19 | - Quick help (_How do I do X_) - [Gitter Chatroom](https://gitter.im/BackpackForLaravel/Lobby); 20 | - Bug Reports, Feature Requests - Github Issues (here); 21 | 22 | Please keep in mind Backpack offers no official / paid support. Whatever help you receive here, on Gitter, Slack or StackOverflow is thanks to our awesome _awesome_ community members, who give up some of their time to help their peers. If you want to join our community, just start pitching in. We take pride in being a welcoming bunch. 23 | 24 | 25 | Thank you! 26 | 27 | 28 | -- 29 | 30 | Justin Case 31 | 32 | The Backpack Robot 33 | 34 | 35 | PS. In case I mistakenly closed your issue, yell :-) I'm a robot, I make mistakes. 36 | 37 | # Whether to close issues marked as support requests 38 | close: true 39 | # Whether to lock issues marked as support requests 40 | lock: false 41 | -------------------------------------------------------------------------------- /.github/workflows/add-to-project.yml: -------------------------------------------------------------------------------- 1 | name: Add new bugs & PRs to This Week project 2 | 3 | on: 4 | issues: 5 | types: 6 | - opened 7 | - transferred 8 | pull_request: 9 | types: 10 | - opened 11 | 12 | jobs: 13 | add-to-project: 14 | name: Add new bugs and PRs to This Week project 15 | runs-on: ubuntu-latest 16 | steps: 17 | - uses: actions/add-to-project@main 18 | with: 19 | project-url: https://github.com/orgs/Laravel-Backpack/projects/13 20 | github-token: ${{ secrets.ADD_TO_PROJECT_PAT }} 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | vendor/ 2 | .idea 3 | *.iml 4 | /composer.lock 5 | -------------------------------------------------------------------------------- /.scrutinizer.yml: -------------------------------------------------------------------------------- 1 | filter: 2 | paths: 3 | - 'app/*' 4 | - 'src/*' 5 | excluded_paths: 6 | - 'bootstrap/*' 7 | - 'config/*' 8 | - 'public/*' 9 | - 'resources/*' 10 | - 'vendor/*' 11 | - 'views/*' 12 | tools: 13 | php_analyzer: true 14 | php_mess_detector: true 15 | php_changetracking: true 16 | php_code_sniffer: 17 | config: 18 | standard: PSR2 19 | php_loc: 20 | excluded_dirs: 21 | - vendor 22 | php_pdepend: 23 | excluded_dirs: 24 | - vendor 25 | - tests 26 | checks: 27 | php: 28 | code_rating: true 29 | duplication: true 30 | variable_existence: true 31 | useless_calls: true 32 | use_statement_alias_conflict: true 33 | unused_variables: true 34 | unused_properties: true 35 | unused_parameters: true 36 | unused_methods: true 37 | unreachable_code: true 38 | sql_injection_vulnerabilities: true 39 | security_vulnerabilities: true 40 | precedence_mistakes: true 41 | precedence_in_conditions: true 42 | parameter_non_unique: true 43 | no_property_on_interface: true 44 | no_non_implemented_abstract_methods: true 45 | deprecated_code_usage: true 46 | closure_use_not_conflicting: true 47 | closure_use_modifiable: true 48 | avoid_useless_overridden_methods: true 49 | avoid_conflicting_incrementers: true 50 | assignment_of_null_return: true 51 | verify_property_names: true 52 | verify_argument_usable_as_reference: true 53 | verify_access_scope_valid: true 54 | use_self_instead_of_fqcn: true 55 | too_many_arguments: true 56 | symfony_request_injection: true 57 | switch_fallthrough_commented: true 58 | spacing_of_function_arguments: true 59 | spacing_around_non_conditional_operators: true 60 | spacing_around_conditional_operators: true 61 | space_after_cast: true 62 | single_namespace_per_use: true 63 | simplify_boolean_return: true 64 | scope_indentation: 65 | spaces_per_level: '4' 66 | return_doc_comments: true 67 | require_scope_for_properties: true 68 | require_scope_for_methods: true 69 | require_php_tag_first: true 70 | require_braces_around_control_structures: true 71 | remove_trailing_whitespace: true 72 | remove_php_closing_tag: true 73 | remove_extra_empty_lines: true 74 | psr2_switch_declaration: true 75 | psr2_control_structure_declaration: true 76 | psr2_class_declaration: true 77 | property_assignments: true 78 | properties_in_camelcaps: true 79 | prefer_while_loop_over_for_loop: true 80 | phpunit_assertions: true 81 | php5_style_constructor: true 82 | parameters_in_camelcaps: true 83 | parameter_doc_comments: true 84 | return_doc_comment_if_not_inferrable: true 85 | param_doc_comment_if_not_inferrable: true 86 | overriding_private_members: true 87 | optional_parameters_at_the_end: true 88 | one_class_per_file: true 89 | non_commented_empty_catch_block: true 90 | no_unnecessary_if: true 91 | no_unnecessary_function_call_in_for_loop: true 92 | no_unnecessary_final_modifier: true 93 | no_underscore_prefix_in_properties: true 94 | no_underscore_prefix_in_methods: true 95 | no_trailing_whitespace: true 96 | no_space_inside_cast_operator: true 97 | no_space_before_semicolon: true 98 | no_space_around_object_operator: true 99 | no_goto: true 100 | no_global_keyword: true 101 | no_exit: true 102 | no_empty_statements: true 103 | no_else_if_statements: true 104 | no_duplicate_arguments: true 105 | no_debug_code: true 106 | no_commented_out_code: true 107 | newline_at_end_of_file: true 108 | naming_conventions: 109 | local_variable: '^[a-z][a-zA-Z0-9]*$' 110 | abstract_class_name: ^Abstract|Factory$ 111 | utility_class_name: 'Utils?$' 112 | constant_name: '^[A-Z][A-Z0-9]*(?:_[A-Z0-9]+)*$' 113 | property_name: '^[a-z][a-zA-Z0-9]*$' 114 | method_name: '^(?:[a-z]|__)[a-zA-Z0-9]*$' 115 | parameter_name: '^[a-z][a-zA-Z0-9]*$' 116 | interface_name: '^[A-Z][a-zA-Z0-9]*Interface$' 117 | type_name: '^[A-Z][a-zA-Z0-9]*$' 118 | exception_name: '^[A-Z][a-zA-Z0-9]*Exception$' 119 | isser_method_name: '^(?:is|has|should|may|supports|was)' 120 | lowercase_php_keywords: true 121 | more_specific_types_in_doc_comments: true 122 | missing_arguments: true 123 | method_calls_on_non_object: true 124 | line_length: 125 | max_length: '120' 126 | lowercase_basic_constants: true 127 | instanceof_class_exists: true 128 | function_in_camel_caps: true 129 | function_body_start_on_new_line: true 130 | fix_use_statements: 131 | remove_unused: true 132 | preserve_multiple: false 133 | preserve_blanklines: false 134 | order_alphabetically: true 135 | foreach_traversable: true 136 | foreach_usable_as_reference: true 137 | fix_php_opening_tag: true 138 | fix_line_ending: true 139 | fix_identation_4spaces: true 140 | fix_doc_comments: true 141 | ensure_lower_case_builtin_functions: true 142 | encourage_postdec_operator: true 143 | classes_in_camel_caps: true 144 | catch_class_exists: true 145 | blank_line_after_namespace_declaration: true 146 | avoid_usage_of_logical_operators: true 147 | avoid_unnecessary_concatenation: true 148 | avoid_tab_indentation: true 149 | avoid_superglobals: true 150 | avoid_perl_style_comments: true 151 | avoid_multiple_statements_on_same_line: true 152 | avoid_fixme_comments: true 153 | avoid_length_functions_in_loops: true 154 | avoid_entity_manager_injection: true 155 | avoid_duplicate_types: true 156 | avoid_corrupting_byteorder_marks: true 157 | argument_type_checks: true 158 | avoid_aliased_php_functions: true 159 | deadlock_detection_in_loops: true 160 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: php 2 | 3 | php: 4 | - 7.2.5 5 | - 7.3 6 | - 7.4 7 | - 8.0 8 | - nightly 9 | 10 | matrix: 11 | allow_failures: 12 | - php: 8.0 13 | - php: nightly 14 | 15 | sudo: false 16 | 17 | install: travis_retry composer install --no-interaction --prefer-source 18 | 19 | script: vendor/bin/phpunit --coverage-clover=coverage.clover 20 | 21 | after_script: 22 | - wget https://scrutinizer-ci.com/ocular.phar 23 | - php ocular.phar code-coverage:upload --format=php-clover coverage.clover 24 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All Notable changes to `backupmanager` will be documented in this file 4 | 5 | ---------- 6 | IMPORTANT 7 | ---------- 8 | 9 | We no longer use this file to track changes. Please see this repo's "Releases" tab, on Github: 10 | https://github.com/Laravel-Backpack/BackupManager/releases 11 | 12 | ---------- 13 | 14 | ## [3.0.0] - 2020-05-06 15 | 16 | ### Added 17 | - support for Backpack 4.1; 18 | 19 | ### Removed 20 | - support for Backpack 4.0 (just because icons are now ```la la-download``` instead of ```fa fa-download```); 21 | 22 | 23 | ---------- 24 | 25 | 26 | ## [2.0.5] - 2020-04-20 27 | 28 | ### Added 29 | - added names to routes @iMokhles (#80) 30 | 31 | 32 | ## [2.0.4] - 2020-03-05 33 | 34 | ### Fixed 35 | - Upgraded PHPUnit; 36 | 37 | 38 | ## [2.0.3] - 2020-01-14 39 | 40 | ### Added 41 | - Indonesian language file; 42 | 43 | 44 | ## [2.0.2] - 2019-12-19 45 | 46 | ### Added 47 | - Farsi (Persian) language file; 48 | 49 | 50 | ## [2.0.1] - 2019-11-17 51 | 52 | ### Fixed 53 | - merged #73 - notifications did not show; 54 | - merged #75 - properly log backup erors now; 55 | 56 | 57 | ## [2.0.0] - 2019-09-24 58 | 59 | ### Added 60 | - support for Backpack v4; 61 | 62 | ### Removed 63 | - support for Backpack v3; 64 | 65 | 66 | ----------- 67 | 68 | 69 | ## [1.4.10] - 2019-09-01 70 | 71 | ### Added 72 | - #70 - Russian language file; 73 | 74 | 75 | ## [1.4.9] - 2019-08-23 76 | 77 | ### Fixed 78 | - changed config file to fit latest spatie/laravel-backup config file model; 79 | 80 | 81 | ## [1.4.8] - 2019-04-23 82 | 83 | ### Fixed 84 | - merged #65 - using Artisan class instead of manually calling the same command line; this makes the AJAX wait for the answer, so the page reload will happen after the actual backup has been done; 85 | 86 | ## [1.4.7] - 2019-03-01 87 | 88 | - better messages 89 | 90 | ## [1.4.6] - 2019-03-01 91 | 92 | - added support for Base 1.1 and Laravel 5.8; 93 | - dropped support for everything else; 94 | 95 | ## [1.4.5] - 2018-11-22 96 | 97 | - added support for Base 1.0.x 98 | 99 | ## [1.4.4] - 2018-10-15 100 | 101 | ### Fixed 102 | - monitored backups now has the correct disk name; 103 | 104 | 105 | ## [1.4.3] - 2018-10-15 106 | 107 | ### Fixed 108 | - custom views folder is only loaded when it exists; this fixes the conflicts in the ```php artisan view:cache``` command; 109 | 110 | 111 | ## [1.4.2] - 2018-06-19 112 | 113 | ### Fixed 114 | - config file has ```backpack_flags``` as array; 115 | - config file has a ```temporary_directory``` defined; 116 | 117 | 118 | ## [1.4.0] - 2018-04-23 119 | 120 | ### Added 121 | - Backpack\Base 0.9.x requirement; 122 | 123 | ### Removed 124 | - support for Backpack\Base pre-0.9.0; 125 | - notifications from being triggered, when the Create Backup button is pressed; new config option ```backpack_flags``` can overwrite this behaviour; 126 | 127 | 128 | ## [1.3.2] - 2017-12-02 129 | 130 | ### Added 131 | - Turkish translation (thanks to [Yusuf Kaya](https://github.com/yusufkaya0)); 132 | 133 | 134 | ## [1.3.1] - 2017-12-02 135 | 136 | ### Fixed 137 | - working default configuration file for the new spatie/backup; 138 | 139 | 140 | ## [1.3.0] - 2017-12-02 141 | 142 | ### Fixed 143 | - upgraded to Spatie/Backup v5; breaking change: config file is now named ```config/backup.php```; 144 | 145 | 146 | ## [1.2.0] - 2017-08-30 147 | 148 | ### Fixed 149 | - upgraded to Spatie/Backup v4; breaking change: dump variables are now named inside an array in config/database.php; 150 | 151 | ### Added 152 | - package auto-discovery; 153 | 154 | 155 | ## [1.1.18] - 2017-07-06 156 | 157 | ### Added 158 | - overwritable routes file; 159 | 160 | 161 | ## [1.1.17] - 2017-07-05 162 | 163 | ### Added 164 | - Portugese translation (thanks to [Toni Almeida](https://github.com/promatik)); 165 | - Portugese (Brasilian) translation (thanks to [Guilherme Augusto Henschel](https://github.com/cenoura)); 166 | 167 | 168 | ## [1.1.16] - 2017-04-05 169 | 170 | ### Added 171 | - French translation; 172 | - Dutch translation (thanks to [Mark van Beek](https://github.com/chancezeus)); 173 | - fixed App namespace issue; 174 | 175 | ## [1.1.15] - 2017-01-21 176 | 177 | ### Added 178 | - Ability to publish views; 179 | - Ability to overwrite views the same way you overwrite views in CRUD; 180 | 181 | 182 | ## [1.1.14] - 2017-01-08 183 | 184 | ### Fixed 185 | - removed duplicate namespace in BackupController; 186 | 187 | 188 | 189 | ## [1.1.13] - 2016-12-22 190 | 191 | ### Fixed 192 | - delete route filename conflict - thanks to [Vincenzo Raco](https://github.com/vincenzoraco); 193 | 194 | 195 | ## [1.1.12] - 2016-12-13 196 | 197 | ### Added 198 | - Greek translation file, thanks to [Stamatis Katsaounis](https://github.com/skatsaounis); 199 | 200 | 201 | ## [1.1.11] - 2016-09-24 202 | 203 | ### Fixed 204 | - Routes now follow base prefix - thanks to [Twaambo Haamucenje](https://github.com/twoSeats); 205 | 206 | 207 | ## 1.1.10 - 2016-08-17 208 | 209 | ### Added 210 | - Spanish translation, thanks to [Rafael Ernesto Ferro González](https://github.com/rafix); 211 | 212 | 213 | ## 1.1.9 - 2016-07-30 214 | 215 | ### Added 216 | - Bogus unit tests. At least we'be able to use travis-ci for requirements errors, until full unit tests are done. 217 | 218 | 219 | ## 1.1.8 - 2016-07-25 220 | 221 | ### Fixed 222 | - Download button with subfolders. 223 | 224 | 225 | ## 1.1.7 - 2016-07-13 226 | 227 | ### Added 228 | - Showing files from multiple disks. 229 | - Can delete files from other disks, other than local (tested Dropbox). 230 | 231 | ### Fixed 232 | - Download link is no longer dependant on the suggested backups storage disk. 233 | - Hidden download link if not using the Local filesystem. 234 | 235 | ### Removed 236 | - Subfolder listing and downloading. 237 | 238 | ## 1.1.6 - 2016-06-03 239 | 240 | ### Fixed 241 | - Download and delete buttons now work too, for subfolders. 242 | 243 | 244 | ## 1.1.5 - 2016-06-03 245 | 246 | ### Fixed 247 | - Showing zip files from subfolders, too, since laravel-backup stores them that way. 248 | 249 | 250 | ## 1.1.4 - 2016-03-16 251 | 252 | ### Fixed 253 | - Added page title. 254 | 255 | ## 1.1.3 - 2016-03-16 256 | 257 | ### Fixed 258 | - Eliminated console logs from backup js. 259 | - Added screenshot in README. 260 | 261 | ## 1.1.2 - 2016-03-16 262 | 263 | ### Fixed 264 | - Made the backup button work. 265 | - Added another error type - the warning when something failed. 266 | - Logging the progress in the log files. 267 | - Showing the artisan command output in the ajax response. 268 | - Added the dump_command_path configuration. 269 | - Changed README to instruct on common misconfiguration issue. 270 | 271 | 272 | ## 1.1.1 - 2016-03-15 273 | 274 | ### Fixed 275 | - Correct name in readme. Confirming packagist hook. 276 | 277 | 278 | ## 1.1 - 2016-03-15 279 | 280 | ### Added 281 | - Updated to v3 of spatie's laravel-backup package. 282 | - Renamed everything to be part of Backpack instead of Dick. 283 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | Contributions are **welcome** and will be fully **credited**. 4 | 5 | We accept contributions via Pull Requests on [Github](https://github.com/laravel-backpack/backupmanager). 6 | 7 | 8 | ## Bug Fixing & Enhancements 9 | 10 | We use the Github issue tracker for that. Here's the procedure we've settled upon so 2 people don't work on the same thing: 11 | - you find something that needs doing (say: unit tests for a certain package); 12 | - you check if there is already an issue for it (if there isn't, add one); 13 | - in that issue: 14 | - say you're working on it and it will be done in x hours or y days; 15 | - in that issue, assign the "working on it" label 16 | - assign yourself to the issue; 17 | - then comment/reference the issue in your pull request; 18 | 19 | 20 | ## Pull Requests 21 | 22 | - **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - The easiest way to apply the conventions is to install [PHP Code Sniffer](http://pear.php.net/package/PHP_CodeSniffer). It's ok to push non-PSR-2 code, but know that [StyleCI](https://styleci.io/) will convert it after the merge. 23 | 24 | - **Document any change in behaviour** - Make sure the `README.md` is still up-to-date with your modifs. 25 | 26 | - **Consider our release cycle** - We try to follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public APIs is not an option. 27 | 28 | - **One pull request per feature** - If you want to do more than one thing, send multiple pull requests. 29 | 30 | - **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](http://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting. 31 | 32 | 33 | 34 | 35 | ## Running Tests 36 | 37 | The project does NOT have working tests right now, but it really should. If you want to help out, that's one of the most important things you can help with. 38 | 39 | ``` bash 40 | $ composer test 41 | ``` 42 | 43 | 44 | **Happy coding**! 45 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | # YUMMY License 2 | 3 | **YoU make Money, I make MoneY.** The license holder is allowed to use the software for free, as long as he doesn't make money by using it. 4 | 5 | Copyright (c) 2015-2017 Cristian Tabacitu 6 | 7 | ## FREE for non-commercial use, PAID for commercial use 8 | 9 | > Permission is hereby granted to any person obtaining a copy of this software 10 | > and associated documentation files (the "Software"), to use the Software. 11 | > This includes the rights to use, copy, modify and/or merge the Sofware 12 | > or copies of the Software, and to permit persons to whom the Software is 13 | > furnished to do so, subject to the following conditions: 14 | > 15 | > **1. Should the Sofware be used for non-commercial purposes (personal use, not-profits, 16 | > testing, education), no financial reward is expected and the above rights are given FREE OF CHARGE.** 17 | > 18 | > **2. Should the Software be used for commercial purposes (the user of this Sofware, 19 | > its employer, employees or clients make money by using this Software), the user is 20 | > required to purchase a "Single Domain License" on [backpackforlaravel.com](https://backpackforlaravel.com), for each 21 | > domain name this sofware will be used on, before its usage in production. 22 | > Failure to do so will constitute as illegal commercial use.** 23 | > 24 | > **3. This license does not include the rights to publish or sublicense 25 | > this Sofware, its copies or any derivations, with or without the purpose of commercial profit. 26 | > For inclusion in commercial packages or SaaS products, an "Unlimited License" is required, which can be purchased on [backpackforlaravel.com](https://backpackforlaravel.com). For inclusion in free open-source packages, express permission is needed from .** 27 | > 28 | > **4. The above copyright notice and this permission notice shall be included in 29 | > all copies or substantial portions of the Software.** 30 | > 31 | > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 32 | > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 33 | > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 34 | > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 35 | > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 36 | > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 37 | > THE SOFTWARE. 38 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Backpack\BackupManager 2 | 3 | [![Latest Version on Packagist](https://img.shields.io/packagist/v/backpack/backupmanager.svg?style=flat-square)](https://packagist.org/packages/backpack/backupmanager) 4 | [![Software License](https://img.shields.io/badge/license-dual-blue?style=flat-square)](LICENSE.md) 5 | [![Build Status](https://img.shields.io/travis/laravel-backpack/backupmanager/master.svg?style=flat-square)](https://travis-ci.org/laravel-backpack/backupmanager) 6 | [![Coverage Status](https://img.shields.io/scrutinizer/coverage/g/laravel-backpack/backupmanager.svg?style=flat-square)](https://scrutinizer-ci.com/g/laravel-backpack/backupmanager/code-structure) 7 | [![Quality Score](https://img.shields.io/scrutinizer/g/laravel-backpack/backupmanager.svg?style=flat-square)](https://scrutinizer-ci.com/g/laravel-backpack/backupmanager) 8 | [![Style CI](https://styleci.io/repos/53956594/shield)](https://styleci.io/repos/53956594) 9 | [![Total Downloads](https://img.shields.io/packagist/dt/backpack/backupmanager.svg?style=flat-square)](https://packagist.org/packages/backpack/backupmanager) 10 | 11 | An admin interface for [spatie/laravel-backup](https://github.com/spatie/laravel-backup). Allows the admin to easily manage backups (download and delete). Used in the Backpack package, on Laravel 5.2+ to 9. 12 | 13 | 14 | > ### Security updates and breaking changes 15 | > Please **[subscribe to the Backpack Newsletter](http://backpackforlaravel.com/newsletter)** so you can find out about any security updates, breaking changes or major features. We send an email 2 times/year, max. 16 | 17 | ![Backpack\BackupManager screenshot](https://user-images.githubusercontent.com/1032474/161931994-dc044bb2-a459-4863-9262-ed91f3e5e35b.gif) 18 | 19 | 20 | ## Install 21 | 22 | 1) In your terminal: 23 | 24 | ``` bash 25 | # Install the package 26 | composer require backpack/backupmanager 27 | 28 | # Publish the backup and backupmanager configs and lang files: 29 | php artisan vendor:publish --provider="Backpack\BackupManager\BackupManagerServiceProvider" --tag=backup-config --tag=lang 30 | 31 | # [optional] Add a menu item for it 32 | # For Backpack v6 33 | php artisan backpack:add-menu-content "" 34 | # For Backpack v5 or v4 35 | php artisan backpack:add-sidebar-content "" 36 | ``` 37 | 38 | 2) [optional] Instruct Laravel to run the backups automatically in your console kernel: 39 | 40 | ```php 41 | // app/Console/Kernel.php 42 | 43 | protected function schedule(Schedule $schedule) 44 | { 45 | // if you are not using notifications you should add the `--disable-notifications` flag to this commands 46 | $schedule->command('backup:clean')->daily()->at('04:00'); 47 | $schedule->command('backup:run')->daily()->at('05:00'); 48 | } 49 | ``` 50 | 51 | 3) Check that it works 52 | 53 | If the "unknown error" yellow bubble is thrown and you see the "_Backup failed because The dump process failed with exitcode 127 : Command not found._" error in the log file, either mysqldump / pg_dump is not installed or you need to specify its location. You can do that in your `config/database.php` file, where you define your database credentials, by adding the dump variables. Here's an example: 54 | 55 | ```php 56 | 'mysql' => [ 57 | 'driver' => 'mysql', 58 | 'host' => env('DB_HOST', 'localhost'), 59 | 'database' => env('DB_DATABASE', 'forge'), 60 | 'username' => env('DB_USERNAME', 'forge'), 61 | 'password' => env('DB_PASSWORD', ''), 62 | 'charset' => 'utf8', 63 | 'collation' => 'utf8_unicode_ci', 64 | 'prefix' => '', 65 | 'strict' => false, 66 | 'engine' => null, 67 | 'dump' => [ 68 | 69 | 'dump_binary_path' => '/path/to/directory/', // only the path, without `mysqldump` or `pg_dump` 70 | // 'dump_binary_path' => '/Applications/MAMP/Library/bin/', // works for MAMP on Mac OS 71 | // 'dump_binary_path' => '/opt/homebrew/bin/', // works for Laravel Valet on Mac OS 72 | 'use_single_transaction', 73 | 'timeout' => 60 * 5, // 5 minute timeout 74 | // 'exclude_tables' => ['table1', 'table2'], 75 | // 'add_extra_option' => '--optionname=optionvalue', 76 | ] 77 | ], 78 | ``` 79 | 80 | ## Usage 81 | 82 | This should be a point-and-click interface where you can create and download backups at any time. 83 | 84 | Try at **your-project-domain/admin/backup** 85 | 86 | ## Configuration & Troubleshooting 87 | 88 | For additional configuration (eg. notifications): 89 | - publish the spatie backup file `php artisan vendor:publish --provider="Spatie\Backup\BackupServiceProvider" --tag="backup-config"` 90 | - see the [spatie/laravel-backup documentation](https://spatie.be/docs/laravel-backup/v8/installation-and-setup) on how to configure your backup system in `config/backup.php`; **it is higly recommended that you at least [configure the notifications](https://spatie.be/docs/laravel-backup/v8/sending-notifications/overview)**; 91 | - see `config/backpack/backupmanager.php` for configurating how the backup is run from the interface; by default, it does `backup:run --disable-notifications`, but after you've configured notifications, you can remove that flag (or add others); 92 | 93 | **[TIP]** When you modify your options in `config/backup.php` or `config/backpack/backupmanager.php`, please run manually `php artisan backup:run` to make sure it's still working after your changes. **NOTE**: `php artisan optimize:clear` and/or `php artisan config:clear` might be needed before the `backup:run` command. 94 | 95 | ## Upgrading 96 | 97 | Please see the [upgrade guides](UPGRADE_GUIDES.md) to get: 98 | - from v3 to v4 (new!) 99 | - from v2 to v3 100 | - from 1.2.x to 1.3.x 101 | - from 1.1.x to 1.2.x 102 | 103 | ## Change log 104 | 105 | Please see the [releases page](https://github.com/Laravel-Backpack/BackupManager/releases/) for more information what has changed recently. 106 | 107 | ## Testing 108 | 109 | ``` bash 110 | $ composer test 111 | ``` 112 | 113 | ## Contributing 114 | 115 | Please see [CONTRIBUTING](CONTRIBUTING.md) for details. 116 | 117 | ## Overwriting Functionality 118 | 119 | If you need to modify how this works in a project: 120 | - create a ```routes/backpack/backupmanager.php``` file; the package will see that, and load _your_ routes file, instead of the one in the package; 121 | - create controllers/models that extend the ones in the package, and use those in your new routes file; 122 | - modify anything you'd like in the new controllers/models; 123 | 124 | ## Security 125 | 126 | If you discover any security related issues, please email tabacitu@backpackforlaravel.com instead of using the issue tracker. 127 | 128 | Please **[subscribe to the Backpack Newsletter](http://backpackforlaravel.com/newsletter)** so you can find out about any security updates, breaking changes or major features. We send an email every 1-2 months. 129 | 130 | ## Credits 131 | 132 | - [Cristian Tabacitu](https://github.com/tabacitu) 133 | - [All Contributors](../../contributors) 134 | 135 | ## License 136 | 137 | The MIT License (MIT). Please see License File for more information. 138 | 139 | ## Hire us 140 | 141 | We've spend more than 10.000 hours creating, polishing and maintaining administration panels on Laravel. We've developed e-Commerce, e-Learning, ERPs, social networks, payment gateways and much more. We've worked on admin panels _so much_, that we've created one of the most popular software in its niche - just from making public what was repetitive in our projects. 142 | 143 | If you are looking for a developer/team to help you build an admin panel on Laravel, look no further. You'll have a difficult time finding someone with more experience & enthusiasm for this. This is _what we do_. [Contact us - let's see if we can work together](https://backpackforlaravel.com/need-freelancer-or-development-team). 144 | -------------------------------------------------------------------------------- /UPGRADE_GUIDES.md: -------------------------------------------------------------------------------- 1 | # Upgrade Guides 2 | 3 | ## Upgrading from 3.x to 4.x 4 | 5 | Change your required version to `"backpack/backupmanager": "^4.0"` and run `composer update backpack/backupmanager`. 6 | 7 | We removed the overrides of spatie config from our package publishing process, from now on you can do the regular spatie backup configuration in `config/backup.php` and the customized backpack configuration in `config/backpack/backupmanager`. 8 | 9 | **1)** Publish the new config file `php artisan vendor:publish --provider="Backpack\BackupManager\BackupManagerServiceProvider" --tag="backup-config"`. This will generate the `config/backpack/backupmanager.php` file. By default backpack uses `--disable-notifications` flag, remove it if you are using notifications. 10 | 11 | **2)** If you have configured `backpack_flags` in `config/backup` you should now move them to the new config, under the key: `artisan_command_on_button_click`. 12 | 13 | ```php 14 | // This command will be run when user click on the "Create a new backup" button 15 | // You can add flags to this like --only-db --only-files --only-to-disk=name-of-disk --disable-notifications 16 | // Details here: https://spatie.be/docs/laravel-backup/v8/taking-backups/overview 17 | 'artisan_command_on_button_click' => 'backup:run --disable-notifications', 18 | ``` 19 | 20 | **3)** If you didn't do anymore configs you can now safely remove the `config/backup.php` file and there is no need to re-publish the spatie config, **jump to step 5**. 21 | 22 | **4)** If you are customizing other options in `config/backup.php` file make sure that your changes are compatible with the new config (it should be), otherwise save your config file in some other place, force publish the v8 spatie configuration file with `php artisan vendor:publish --force --provider="Spatie\Backup\BackupServiceProvider" --tag="backup-config"` and then re-configure what you need. 23 | 24 | **5)** You may need to clear the cache with `php artisan optimize:clear` and/or `php artisan config:clear`. 25 | 26 | **6)** Manually run from console the `backup:run` command to make sure it's working, use `backup:run --disable-notifications` if you are not using notifications. 27 | 28 | **7)** If you are **scheduling your backup jobs** make sure to also use the apropriate synthax in the commands. In previous backup versions the notification exceptions would **not be reported** and your scripts would run fine even if an exception was thrown. Now **they report**, so to avoid the exceptions halting your scripts in the notification part, **you need to explicitly tell the backup script that you don't want notifications** if you didn't configure them: 29 | 30 | ```php 31 | // app/Console/Kernel.php 32 | 33 | protected function schedule(Schedule $schedule) 34 | { 35 | // this would work previously even if you didn't configured notifications, 36 | // it would throw an exception but it was not reported, so script is not halted. 37 | $schedule->command('backup:clean')->daily()->at('04:00'); 38 | 39 | // now if you don't use notifications you should explicitly tell that to backup 40 | // otherwise the same exception will be thrown, but this time reported, 41 | // halting the script execution. 42 | $schedule->command('backup:clean --disable-notifications')->daily()->at('04:00'); 43 | } 44 | ``` 45 | 46 | ## Upgrading from 2.x to 3.x 47 | 48 | Change your required version to ```"backpack/backupmanager": "^3.0",``` and run ```composer update```. There are no breaking changes just icons that are show using ```la la-icon``` instead of ```fa fa-icon```. 49 | 50 | 51 | ## Upgrading from 1.2.x to 1.3.x 52 | 53 | 1) change your required version to ```"backpack/backupmanager": "^1.3",``` and run ```composer update```; 54 | 2) delete the old config file (too many changes, including namechange): ```rm config/laravel-backup.php``` 55 | 3) republish the config files: ```php artisan vendor:publish --provider="Backpack\BackupManager\BackupManagerServiceProvider"``` 56 | 4) change your db configuration in ```config/database.php``` to use the new dump configuration (all options in one array; the example below is for MAMP on MacOS): 57 | 58 | ```php 59 | 'dump' => [ 60 | 'dump_binary_path' => '/Applications/MAMP/Library/bin/', // only the path, so without `mysqldump` or `pg_dump` 61 | 'use_single_transaction', 62 | 'timeout' => 60 * 5, // 5 minute timeout 63 | // 'exclude_tables' => ['table1', 'table2'], 64 | // 'add_extra_option' => '--optionname=optionvalue', 65 | ] 66 | ``` 67 | 5) Create a backup in the interface to test it works. If it doesn't try ```php artisan backup:run``` to see what the problem is. 68 | 69 | 70 | ## Upgrading from 1.1.x to 1.2.x 71 | 72 | 1) change your required version to ```"backpack/backupmanager": "^1.2",```; 73 | 2) the only breaking change is that the ```config/database.php``` dump variables are now inside an array. Please see the step 8 above, copy-paste the ```dump``` array from there and customize; 74 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "backpack/backupmanager", 3 | "description": "Admin interface for managing backups in Backpack, on Laravel 5.2+", 4 | "keywords": [ 5 | "dick", 6 | "backpack", 7 | "updivision", 8 | "backup", 9 | "backupmanager", 10 | "tabacitu", 11 | "laravel" 12 | ], 13 | "homepage": "https://github.com/laravel-backpack/BackupManager", 14 | "license": "proprietary", 15 | "authors": [ 16 | { 17 | "name": "Cristian Tabacitu", 18 | "email": "tabacitu@backpackforlaravel.com", 19 | "homepage": "https://backpackforlaravel.com", 20 | "role": "Chief Architect & Web Developer" 21 | } 22 | ], 23 | "minimum-stability": "dev", 24 | "prefer-stable": true, 25 | "require": { 26 | "backpack/crud": "^6.0", 27 | "spatie/laravel-backup": "^8.0|^9.0" 28 | }, 29 | "require-dev": { 30 | "scrutinizer/ocular": "~1.7|~1.1" 31 | }, 32 | "autoload": { 33 | "psr-4": { 34 | "Backpack\\BackupManager\\": "src" 35 | } 36 | }, 37 | "extra": { 38 | "laravel": { 39 | "providers": [ 40 | "Backpack\\BackupManager\\BackupManagerServiceProvider" 41 | ] 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /issue_template.md: -------------------------------------------------------------------------------- 1 | # Bug report 2 | 3 | ### What I did: 4 | 5 | ### What I expected to happen: 6 | 7 | ### What happened: 8 | 9 | ### What I've already tried to fix it: 10 | 11 | ### Backpack, Laravel, PHP, DB version: 12 | -------------------------------------------------------------------------------- /src/BackupManagerServiceProvider.php: -------------------------------------------------------------------------------- 1 | loadViewsFrom($customViewsFolder, 'backupmanager'); 37 | } 38 | // - then the stock views that come with the package, in case a published view might be missing 39 | $this->loadViewsFrom(realpath(__DIR__.'/resources/views'), 'backupmanager'); 40 | 41 | // publish config file 42 | $this->publishes([__DIR__.'/config/backupmanager.php' => config_path('backpack/backupmanager.php')], 'backup-config'); 43 | 44 | // publish lang files 45 | $this->publishes([__DIR__.'/resources/lang' => app()->langPath().'/vendor/backpack'], 'lang'); 46 | // publish the views 47 | $this->publishes([__DIR__.'/resources/views' => resource_path('views/vendor/backpack/backupmanager')], 'views'); 48 | } 49 | 50 | /** 51 | * Define the routes for the application. 52 | * 53 | * @param \Illuminate\Routing\Router $router 54 | * 55 | * @return void 56 | */ 57 | public function setupRoutes(Router $router) 58 | { 59 | // by default, use the routes file provided in vendor 60 | $routeFilePathInUse = __DIR__.$this->routeFilePath; 61 | 62 | // but if there's a file with the same name in routes/backpack, use that one 63 | if (file_exists(base_path().$this->routeFilePath)) { 64 | $routeFilePathInUse = base_path().$this->routeFilePath; 65 | } 66 | 67 | $this->loadRoutesFrom($routeFilePathInUse); 68 | } 69 | 70 | /** 71 | * Register any package services. 72 | * 73 | * @return void 74 | */ 75 | public function register() 76 | { 77 | $this->setupRoutes($this->app->router); 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /src/app/Http/Controllers/BackupController.php: -------------------------------------------------------------------------------- 1 | data['backups'] = []; 25 | 26 | foreach (config('backup.backup.destination.disks') as $diskName) { 27 | $disk = Storage::disk($diskName); 28 | $files = $disk->allFiles(); 29 | 30 | // make an array of backup files, with their filesize and creation date 31 | foreach ($files as $file) { 32 | // remove diskname from filename 33 | $fileName = str_replace('backups/', '', $file); 34 | $downloadLink = route('backup.download', ['file_name' => $fileName, 'disk' => $diskName]); 35 | $deleteLink = route('backup.destroy', ['file_name' => $fileName, 'disk' => $diskName]); 36 | 37 | // only take the zip files into account 38 | if (substr($file, -4) == '.zip' && $disk->exists($file)) { 39 | $this->data['backups'][] = (object) [ 40 | 'filePath' => $file, 41 | 'fileName' => $fileName, 42 | 'fileSize' => round((int) $disk->size($file) / 1048576, 2), 43 | 'lastModified' => Carbon::createFromTimeStamp($disk->lastModified($file), config('app.timezone'))->isoFormat('DD MMMM YYYY, HH:mm'), 44 | 'diskName' => $diskName, 45 | 'downloadLink' => is_a($disk->getAdapter(), LocalFilesystemAdapter::class, true) ? $downloadLink : null, 46 | 'deleteLink' => $deleteLink, 47 | ]; 48 | } 49 | } 50 | } 51 | 52 | // reverse the backups, so the newest one would be on top 53 | $this->data['backups'] = array_reverse($this->data['backups']); 54 | $this->data['title'] = trans('backpack::backup.backups'); 55 | 56 | return view('backupmanager::backup', $this->data); 57 | } 58 | 59 | public function create() 60 | { 61 | $command = config('backpack.backupmanager.artisan_command_on_button_click') ?? 'backup:run'; 62 | 63 | try { 64 | foreach (config('backpack.backupmanager.ini_settings', []) as $setting => $value) { 65 | ini_set($setting, $value); 66 | } 67 | 68 | Log::info('Backpack\BackupManager -- Called backup:run from admin interface'); 69 | 70 | Artisan::call($command); 71 | 72 | $output = Artisan::output(); 73 | if (strpos($output, 'Backup failed because')) { 74 | preg_match('/Backup failed because(.*?)$/ms', $output, $match); 75 | $message = "Backpack\BackupManager -- backup process failed because ".($match[1] ?? ''); 76 | Log::error($message.PHP_EOL.$output); 77 | 78 | return response($message, 500); 79 | } 80 | } catch (Exception $e) { 81 | Log::error($e); 82 | 83 | return response($e->getMessage(), 500); 84 | } 85 | 86 | return true; 87 | } 88 | 89 | /** 90 | * Downloads a backup zip file. 91 | */ 92 | public function download() 93 | { 94 | $diskName = Request::input('disk'); 95 | $fileName = Request::input('file_name'); 96 | $disk = Storage::disk($diskName); 97 | 98 | if (!$this->isBackupDisk($diskName)) { 99 | abort(500, trans('backpack::backup.unknown_disk')); 100 | } 101 | 102 | if (!is_a($disk->getAdapter(), LocalFilesystemAdapter::class, true)) { 103 | abort(404, trans('backpack::backup.only_local_downloads_supported')); 104 | } 105 | 106 | if (!$disk->exists($fileName)) { 107 | abort(404, trans('backpack::backup.backup_doesnt_exist')); 108 | } 109 | 110 | return $disk->download($fileName); 111 | } 112 | 113 | /** 114 | * Deletes a backup file. 115 | */ 116 | public function delete() 117 | { 118 | $diskName = Request::input('disk'); 119 | $fileName = Request::input('file_name'); 120 | 121 | if (!$this->isBackupDisk($diskName)) { 122 | return response(trans('backpack::backup.unknown_disk'), 500); 123 | } 124 | 125 | $disk = Storage::disk($diskName); 126 | 127 | if (!$disk->exists($fileName)) { 128 | return response(trans('backpack::backup.backup_doesnt_exist'), 404); 129 | } 130 | 131 | return $disk->delete($fileName); 132 | } 133 | 134 | /** 135 | * Check if disk is a backup disk. 136 | * 137 | * @param string $diskName 138 | * 139 | * @return bool 140 | */ 141 | private function isBackupDisk(string $diskName) 142 | { 143 | return in_array($diskName, config('backup.backup.destination.disks')); 144 | } 145 | } 146 | -------------------------------------------------------------------------------- /src/config/backupmanager.php: -------------------------------------------------------------------------------- 1 | 'backup:run --disable-notifications', 8 | 9 | // here you can configure your php settings that will apply before starting the backup operation 10 | // one of the things that Backpack does by default is increasing the `max_execution_time` for 11 | // php scripts, as listing all files for backup could take some time to execute. 12 | 'ini_settings' => [ 13 | 'max_execution_time' => 600, 14 | ], 15 | ]; 16 | -------------------------------------------------------------------------------- /src/resources/lang/ar/backup.php: -------------------------------------------------------------------------------- 1 | 'نسخة احتياطية', 16 | 'create_a_new_backup' => 'إنشاء نسخة احتياطية جديدة', 17 | 'existing_backups' => 'النسخ الاحتياطية الموجودة', 18 | 'date' => 'التاريخ', 19 | 'file_size' => 'حجم الملف', 20 | 'actions' => 'اجراءات', 21 | 'download' => 'تحميل', 22 | 'delete' => 'حذف', 23 | 'delete_confirm' => 'هل انت متأكد من حذف النسخة الاحتياطية؟', 24 | 'delete_confirmation_title' => 'تم بالنجاح', 25 | 'delete_confirmation_message' => 'تم حذف ملف النسخة الاحتياطية', 26 | 'delete_error_title' => 'هناك خطأ', 27 | 'delete_error_message' => 'ملف النسخة الاحتياطية لم يتم حذفه.', 28 | 'delete_cancel_title' => 'كل شيئ على مايرام.', 29 | 'delete_cancel_message' => 'ملف النسخة الاحتياطية لم يتم حذفه.', 30 | 'create_confirmation_title' => 'تم عمل النسخ الاحتياطية بالنجاح', 31 | 'create_confirmation_message' => 'سيتم اعادة اعادة تحميل الصفحة خلال 3 ثواني.', 32 | 'create_error_title' => 'هناك خطأ في النسخة الاحتياطية', 33 | 'create_error_message' => 'لا يمكن إنشاء ملف النسخة الاحتياطية.', 34 | 'create_warning_title' => 'هناك خطأ غير معروف', 35 | 'create_warning_message' => 'ربما لم يتم إنشاء النسخة الاحتياطية. يرجى التحقق من ملفات السجل للحصول على التفاصيل.', 36 | 'location' => 'الموقع', 37 | 'no_disks_configured' => 'لايوجد أقراص تم تحددها في ملف config/backup.php', 38 | 'backup_doesnt_exist' => 'ملف النسخ الاحتياطي غير موجود.', 39 | 'only_local_downloads_supported' => 'لايمكن تحميل النسخة الاحتياطية الا من القرص المحلي.', 40 | ]; 41 | -------------------------------------------------------------------------------- /src/resources/lang/en/backup.php: -------------------------------------------------------------------------------- 1 | 'Backup', 16 | 'backups' => 'Backups', 17 | 'create_a_new_backup' => 'Create a new backup', 18 | 'existing_backups' => 'Existing backups', 19 | 'date' => 'Date', 20 | 'file_size' => 'File size', 21 | 'actions' => 'Actions', 22 | 'download' => 'Download', 23 | 'delete' => 'Delete', 24 | 'delete_confirm' => 'Are you sure you want to delete this backup file?', 25 | 'delete_confirmation_title' => 'Done', 26 | 'delete_confirmation_message' => 'The backup file was deleted.', 27 | 'delete_error_title' => 'Error', 28 | 'delete_error_message' => 'The backup file has NOT been deleted.', 29 | 'delete_cancel_title' => "It's ok", 30 | 'delete_cancel_message' => 'The backup file has NOT been deleted.', 31 | 'create_confirmation_title' => 'Backup process started.', 32 | 'create_error_title' => 'Backup error', 33 | 'create_error_message' => 'The backup file could NOT be created.', 34 | 'create_warning_title' => 'Unknown error', 35 | 'create_warning_message' => 'Your backup may NOT have been created. Please check log files for details.', 36 | 'location' => 'Location', 37 | 'no_disks_configured' => 'No backup disks configured in config/backup.php', 38 | 'backup_doesnt_exist' => "The backup file doesn't exist.", 39 | 'only_local_downloads_supported' => 'Only downloads from the Local filesystem are supported.', 40 | 'unknown_disk' => 'Unknown disk.', 41 | 'create_started_message' => 'Please wait a few minutes for it to complete.', 42 | 'create_completed_title' => 'Your backup is complete.', 43 | 'download_confirmation_title' => 'Download process started.', 44 | 'download_error_title' => 'Download error', 45 | ]; 46 | -------------------------------------------------------------------------------- /src/resources/lang/es/backup.php: -------------------------------------------------------------------------------- 1 | 'Copia de seguridad', 16 | 'backups' => 'Copias de seguridad', 17 | 'create_a_new_backup' => 'Crear una copia de seguridad', 18 | 'existing_backups' => 'Copias de seguridad existentes', 19 | 'date' => 'Fecha', 20 | 'file_size' => 'Tamaño del fichero', 21 | 'actions' => 'Acciones', 22 | 'download' => 'Descargar', 23 | 'delete' => 'Eliminar', 24 | 'delete_confirm' => '¿Estás seguro que quieres borrar esta copia de seguridad?', 25 | 'delete_confirmation_title' => 'Confirmado', 26 | 'delete_confirmation_message' => 'La copia de seguridad fue eliminada.', 27 | 'delete_error_title' => 'Ups, ha ocurrido un error', 28 | 'delete_error_message' => 'La copia de seguridad NO se pudo eliminar.', 29 | 'delete_cancel_title' => 'La operación ha sido cancelada', 30 | 'delete_cancel_message' => 'La copia de seguridad NO se pudo eliminar.', 31 | 'create_confirmation_title' => 'Se ha completado la copia de seguridad', 32 | 'create_confirmation_message' => 'Recargando la página en 3 segundos.', 33 | 'create_error_title' => 'Error al realizar la copia de seguridad', 34 | 'create_error_message' => 'La copia de seguridad NO se pudo crear.', 35 | 'create_warning_title' => 'Estamos presentando problemas', 36 | 'create_warning_message' => 'La copia de seguridad puede que no se haya realizado. Por favor verifica los logs para más detalles.', 37 | 'location' => 'Ubicación', 38 | 'no_disks_configured' => 'No existe ningún disco configurado config/backup.php', 39 | 'backup_doesnt_exist' => 'La copia de seguridad no existe.', 40 | 'only_local_downloads_supported' => 'Solo se permiten descargas del sistema de archivos local.', 41 | ]; 42 | -------------------------------------------------------------------------------- /src/resources/lang/fa/backup.php: -------------------------------------------------------------------------------- 1 | 'پشتیبان', 16 | 'create_a_new_backup' => 'ایجاد پشتیبان جدید', 17 | 'existing_backups' => 'پشتیبان‌های موجود', 18 | 'date' => 'تاریخ', 19 | 'file_size' => 'سایز پرونده', 20 | 'actions' => 'عملیات', 21 | 'download' => 'بارگیری', 22 | 'delete' => 'حذف', 23 | 'delete_confirm' => 'آیا شما از حذف این پرونده پشتیبان اطمینان دارید؟', 24 | 'delete_confirmation_title' => 'انجام شد', 25 | 'delete_confirmation_message' => 'پرونده پشتیبان با موفقیت حذف شد.', 26 | 'delete_error_title' => 'خطا', 27 | 'delete_error_message' => 'پرونده پشتیبان حذف نشده است.', 28 | 'delete_cancel_title' => 'مشکلی نیست', 29 | 'delete_cancel_message' => 'پرونده پشتیبان حذف نشده است.', 30 | 'create_confirmation_title' => 'فرآیند پشتیبان‌گیری شروع شد.', 31 | 'create_confirmation_message' => 'لطفا چند دقیقه صبر کنید تا کامل شود ، سپس صفحه را تازه کنید.', 32 | 'create_error_title' => 'خطا پشتیبان', 33 | 'create_error_message' => 'فایل پشتیبان نمی‌تواند ساخته شود.', 34 | 'create_warning_title' => 'خطای نا مشخص', 35 | 'create_warning_message' => 'نسخه پشتیبان شما ممکن است ایجاد نشده باشد. لطفاً پرونده ها را برای جزئیات بیشتر بررسی کنید.', 36 | 'location' => 'محل', 37 | 'no_disks_configured' => 'دیسک پشتیبانی در config/backup.php تنظیم نشده است.', 38 | 'backup_doesnt_exist' => 'پرونده پشتیبان وجود ندارد.', 39 | 'only_local_downloads_supported' => 'تنها دانلود از سیستم‌فایل محلی پشتیبانی می‌شود', 40 | ]; 41 | -------------------------------------------------------------------------------- /src/resources/lang/fr/backup.php: -------------------------------------------------------------------------------- 1 | 'Sauvegarde', 16 | 'backups' => 'Sauvegardes', 17 | 'create_a_new_backup' => 'Créer une nouvelle sauvegarde', 18 | 'existing_backups' => 'Sauvegardes existantes', 19 | 'date' => 'Date', 20 | 'file_size' => 'Taille de fichier', 21 | 'actions' => 'Actions', 22 | 'download' => 'Télécharger', 23 | 'delete' => 'Supprimer', 24 | 'delete_confirm' => 'Etes-vous certain de vouloir supprimer ce fichier ?', 25 | 'delete_confirmation_title' => 'Fait', 26 | 'delete_confirmation_message' => 'Le fichier de sauvegarde a été supprimmé.', 27 | 'delete_error_title' => 'Erreur', 28 | 'delete_error_message' => 'Le fichier de sauvegarde n\'a PAS été supprimmé.', 29 | 'delete_cancel_title' => "C'est ok", 30 | 'delete_cancel_message' => 'Le fichier de sauvegarde n\'a PAS été supprimmé.', 31 | 'create_confirmation_title' => 'Sauvegarde terminée', 32 | 'create_confirmation_message' => 'Rechargement de cette page dans 3 secondes.', 33 | 'create_error_title' => 'Erreur de sauvegarde', 34 | 'create_error_message' => 'Le fichier de sauvegarde n\'a PAS pu être créer.', 35 | 'create_warning_title' => 'Erreur inconnue', 36 | 'create_warning_message' => 'Votre fichier de sauvegarde n\'a sans doute pas pu être créé. Regardez les logs pour plus de details.', 37 | 'location' => 'Emplacement', 38 | 'no_disks_configured' => 'Aucun "backup disks" de configuré dans config/backup.php', 39 | 'backup_doesnt_exist' => "Le fichier de sauvegarde n'existe pas.", 40 | 'only_local_downloads_supported' => 'Seuls les téléchargments à partir du système de fichier local sont supportés.', 41 | ]; 42 | -------------------------------------------------------------------------------- /src/resources/lang/gr/backup.php: -------------------------------------------------------------------------------- 1 | 'Αντίγραφο ασφαλείας', 16 | 'backups' => 'Αντίγραφα ασφαλείας', // Added plural 17 | 'create_a_new_backup' => 'Δημιουργία νέου αντιγράφου ασφαλείας', 18 | 'existing_backups' => 'Υπάρχοντα αντίγραφα ασφαλείας', 19 | 'date' => 'Ημερομηνία', 20 | 'file_size' => 'Μέγεθος Αρχείου', 21 | 'actions' => 'Ενέργειες', 22 | 'download' => 'Λήψη', 23 | 'delete' => 'Διαγραφή', 24 | 'delete_confirm' => 'Είστε σίγουρος/η πως θέλετε να διαγράψετε αυτό το αντίγραφο ασφαλείας?', 25 | 'delete_confirmation_title' => 'Η ενέργεια πραγματοποιήθηκε', 26 | 'delete_confirmation_message' => 'Το αντίγραφο ασφαλείας διαγράφηκε.', 27 | 'delete_error_title' => 'Σφάλμα', 28 | 'delete_error_message' => 'Το αντίγραφο ασφαλείας ΔΕΝ έχει διαγραφεί.', 29 | 'delete_cancel_title' => 'Να πραγματοποιηθεί η διαγραφή', 30 | 'delete_cancel_message' => 'Το αντίγραφο ασφαλείας ΔΕΝ έχει διαγραφεί.', 31 | 'create_confirmation_title' => 'Η δημιουργία αντιγράφου ασφαλείας έχει ολοκληρωθεί', 32 | 'create_confirmation_message' => 'Επαναφόρτωση της σελίδας σε 3 δευτερόλεπτα.', 33 | 'create_error_title' => 'Σφάλμα αντιγράφου ασφαλείας', 34 | 'create_error_message' => 'Το αντίγραφο ασφαλείας ΔΕΝ μπόρεσε να δημιουργηθεί.', 35 | 'create_warning_title' => 'Άγνωστο σφάλμα', 36 | 'create_warning_message' => 'Το αντίγραφο ασφαλείας μπορεί να μην έχει δημιουργηθεί. Παρακαλώ ελέγξτε τα αρχεία καταγραφής για λεπτομέρειες.', 37 | 'location' => 'Τοποθεσία', 38 | 'no_disks_configured' => 'Δεν έχει οριστεί κανένας δίσκος για αντίγραφα ασφαλείας στο config/backup.php', 39 | 'backup_doesnt_exist' => 'Το αντίγραφο ασφαλείας δεν υφίσταται.', 40 | 'only_local_downloads_supported' => 'Υποστηρίζονται λήψεις μόνο από το τοπικό σύστημα αρχείων.', 41 | ]; 42 | -------------------------------------------------------------------------------- /src/resources/lang/id/backup.php: -------------------------------------------------------------------------------- 1 | 'Cadangkan', 16 | 'create_a_new_backup' => 'Buat cadangan baru', 17 | 'existing_backups' => 'Backup yang ada', 18 | 'date' => 'Tanggal', 19 | 'file_size' => 'Ukuran file', 20 | 'actions' => 'Aksi', 21 | 'download' => 'Unduh', 22 | 'delete' => 'Hapus', 23 | 'delete_confirm' => 'Anda yakin ingin menghapus file cadangan ini?', 24 | 'delete_confirmation_title' => 'Selesai', 25 | 'delete_confirmation_message' => 'File cadangan telah dihapus.', 26 | 'delete_error_title' => 'Terjadi kesalahan', 27 | 'delete_error_message' => 'File cadangan TIDAK dihapus.', 28 | 'delete_cancel_title' => 'Tidak apa-apa', 29 | 'delete_cancel_message' => 'File cadangan TIDAK dihapus.', 30 | 'create_confirmation_title' => 'Proses pencadangan dimulai', 31 | 'create_confirmation_message' => 'Harap tunggu beberapa menit hingga selesai, lalu segarkan laman.', 32 | 'create_error_title' => 'Kesalahan cadangan', 33 | 'create_error_message' => 'File cadangan TIDAK dapat dibuat.', 34 | 'create_warning_title' => 'Kesalahan yang tidak diketahui', 35 | 'create_warning_message' => 'Cadangan Anda TIDAK dapat dibuat. Silakan periksa file log untuk detailnya.', 36 | 'location' => 'Lokasi', 37 | 'no_disks_configured' => 'Tidak ada disk cadangan yang dikonfigurasi di config/backup.php', 38 | 'backup_doesnt_exist' => 'File cadangan tidak ada.', 39 | 'only_local_downloads_supported' => 'Hanya unduhan dari sistem file Lokal yang didukung.', 40 | ]; 41 | -------------------------------------------------------------------------------- /src/resources/lang/it/backup.php: -------------------------------------------------------------------------------- 1 | 'Backup', 16 | 'backups' => 'Backups', 17 | 'create_a_new_backup' => 'Crea un nuovo backup', 18 | 'existing_backups' => 'Backups esistenti', 19 | 'date' => 'Data', 20 | 'file_size' => 'Dimensione file', 21 | 'actions' => 'Azioni', 22 | 'download' => 'Download', 23 | 'delete' => 'Elimina', 24 | 'delete_confirm' => 'Sei sicuro di voler eliminare questo file di backup?', 25 | 'delete_confirmation_title' => 'Fatto', 26 | 'delete_confirmation_message' => 'Il file di backup è stato eliminato.', 27 | 'delete_error_title' => 'Errore', 28 | 'delete_error_message' => 'Il file di backup NON è stato eliminato.', 29 | 'delete_cancel_title' => 'Tutto a posto', 30 | 'delete_cancel_message' => 'Il file di backup NON è stato eliminato.', 31 | 'create_confirmation_title' => 'Processo di backup avviato.', 32 | 'create_error_title' => 'Errore backup', 33 | 'create_error_message' => 'Non è stato possibile creare il file di backup.', 34 | 'create_warning_title' => 'Errore sconosciuto', 35 | 'create_warning_message' => 'Il backup potrebbe NON essere stato creato. Per favore controlla i log file per dettagli.', 36 | 'location' => 'Posizione', 37 | 'no_disks_configured' => 'Nessun disco per il backup configurato in config/backup.php', 38 | 'backup_doesnt_exist' => 'Il file di backup non esiste.', 39 | 'only_local_downloads_supported' => 'Sono supportati solo i download dal file system locale.', 40 | 'unknown_disk' => 'Disco sconosciuto.', 41 | 'create_started_message' => 'Per favore attendi alcuni minuti per il completamento.', 42 | 'create_completed_title' => 'Il backup è completato.', 43 | 'download_confirmation_title' => 'Processo di download avviato.', 44 | 'download_error_title' => 'Errore download', 45 | ]; 46 | -------------------------------------------------------------------------------- /src/resources/lang/nl/backup.php: -------------------------------------------------------------------------------- 1 | 'Backup', 16 | 'create_a_new_backup' => 'Maak een nieuwe backup', 17 | 'existing_backups' => 'Bestaande backups', 18 | 'date' => 'Datum', 19 | 'file_size' => 'Bestandsgrootte', 20 | 'actions' => 'Acties', 21 | 'download' => 'Download', 22 | 'delete' => 'Verwijder', 23 | 'delete_confirm' => 'Weet je zeker dat je dit backup bestand wilt verwijderen?', 24 | 'delete_confirmation_title' => 'Klaar', 25 | 'delete_confirmation_message' => 'Het backup bestand is verwijderd.', 26 | 'delete_error_title' => 'Fout', 27 | 'delete_error_message' => 'Het backup bestand is NIET verwijderd.', 28 | 'delete_cancel_title' => 'Alles veilig', 29 | 'delete_cancel_message' => 'Het backup bestand is NIET verwijderd.', 30 | 'create_confirmation_title' => 'Backup voltooid', 31 | 'create_confirmation_message' => 'De pagina wordt opnieuw geladen in 3 seconden.', 32 | 'create_error_title' => 'Backup fout', 33 | 'create_error_message' => 'Het backup bestand kon NIET worden gemaakt.', 34 | 'create_warning_title' => 'Onbekende fout', 35 | 'create_warning_message' => 'Het kan zijn dat je backup niet gemaakt is. Controleer de log bestanden voor meer informatie.', 36 | 'location' => 'Locatie', 37 | 'no_disks_configured' => 'Geen backup locaties geconfigureerd in config/wbackup.php', 38 | 'backup_doesnt_exist' => 'Het backup bestand bestaat niet.', 39 | 'only_local_downloads_supported' => 'Enkel downloads van het lokale bestandssysteem worden ondersteund.', 40 | ]; 41 | -------------------------------------------------------------------------------- /src/resources/lang/pt/backup.php: -------------------------------------------------------------------------------- 1 | 'Backup', 16 | 'backups' => 'Backups', 17 | 'create_a_new_backup' => 'Criar um novo backup', 18 | 'existing_backups' => 'Backups existentes', 19 | 'date' => 'Data', 20 | 'file_size' => 'Tamanho do ficheiro', 21 | 'actions' => 'Ações', 22 | 'download' => 'Transferir', 23 | 'delete' => 'Apagar', 24 | 'delete_confirm' => 'Tem a certeza que quer apagar este backup?', 25 | 'delete_confirmation_title' => 'Concluído', 26 | 'delete_confirmation_message' => 'O backup foi apagado.', 27 | 'delete_error_title' => 'Erro', 28 | 'delete_error_message' => 'O backup NÃO foi apagado.', 29 | 'delete_cancel_title' => 'Está tudo bem!', 30 | 'delete_cancel_message' => 'O backup NÃO foi apagado.', 31 | 'create_confirmation_title' => 'Backup iniciado.', 32 | 'create_error_title' => 'Erro ao fazer o backup', 33 | 'create_error_message' => 'O backup não foi criado.', 34 | 'create_warning_title' => 'Erro desconhecido', 35 | 'create_warning_message' => 'O backup pode NÃO ter sido criado. Por favor verifique o registo para obter mais detalhes.', 36 | 'location' => 'Localização', 37 | 'no_disks_configured' => 'Não foi configurado nenhum disco de backups em config/backup.php', 38 | 'backup_doesnt_exist' => 'O backup não existe', 39 | 'only_local_downloads_supported' => 'Apenas são permitidas transferências do sistema de ficheiros local.', 40 | 'unknown_disk' => 'Disco de backup desconhecido.', 41 | 'create_started_message' => 'Por favor aguarde alguns minutos pela conclusão do backup.', 42 | 'create_completed_title' => 'O backup está concluído.', 43 | 'download_confirmation_title' => 'Download iniciado.', 44 | 'download_error_title' => 'Erro ao fazer o download', 45 | ]; 46 | -------------------------------------------------------------------------------- /src/resources/lang/pt_br/backup.php: -------------------------------------------------------------------------------- 1 | 'Backup', 16 | 'backups' => 'Backups', 17 | 'create_a_new_backup' => 'Criar um novo backup', 18 | 'existing_backups' => 'Backups existentes', 19 | 'date' => 'Data', 20 | 'file_size' => 'Tamanho do Arquivo', 21 | 'actions' => 'Ações', 22 | 'download' => 'Baixar', 23 | 'delete' => 'Excluir', 24 | 'delete_confirm' => 'Tem certeza que deseja excluir este backup?', 25 | 'delete_confirmation_title' => 'Pronto', 26 | 'delete_confirmation_message' => 'Backup excluído com sucesso.', 27 | 'delete_error_title' => 'Erro', 28 | 'delete_error_message' => 'Não foi possível excluir o backup.', 29 | 'delete_cancel_title' => 'Sem problema', 30 | 'delete_cancel_message' => 'O backup não foi excluído.', 31 | 'create_confirmation_title' => 'Backup iniciado.', 32 | 'create_error_title' => 'Erro de backup', 33 | 'create_error_message' => 'Não foi possível criar o Backup.', 34 | 'create_warning_title' => 'Erro desconhecido', 35 | 'create_warning_message' => 'O backup solicitado pode não ter sido criado. Por favor, verifique o arquivo de log para mais informações.', 36 | 'location' => 'Localização', 37 | 'no_disks_configured' => 'Não existe configuração de local de backup no arquivo config/backup.php', 38 | 'backup_doesnt_exist' => 'O arquivo de backup não existe.', 39 | 'only_local_downloads_supported' => 'Somente são suportados downloads do sistema de arquivos local.', 40 | 'unknown_disk' => 'Disco de backup desconhecido.', 41 | 'create_started_message' => 'Por favor aguarde alguns minutos pela conclusão do backup.', 42 | 'create_completed_title' => 'O backup está concluído.', 43 | 'download_confirmation_title' => 'Download iniciado.', 44 | 'download_error_title' => 'Erro ao fazer o download', 45 | ]; 46 | -------------------------------------------------------------------------------- /src/resources/lang/ro/backup.php: -------------------------------------------------------------------------------- 1 | 'Copie de siguranță', 16 | 'backups' => 'Copii de siguranță', 17 | 'create_a_new_backup' => 'Creează o nouă copie de siguranță', 18 | 'existing_backups' => 'Copii existente', 19 | 'date' => 'Data', 20 | 'file_size' => 'Mărimea fișierului', 21 | 'actions' => 'Acțiuni', 22 | 'download' => 'Descarcă', 23 | 'delete' => 'Șterge', 24 | 'delete_confirm' => 'Ești sigur că vrei să ștergi copia de siguranță?', 25 | 'delete_confirmation_title' => 'Operațiune reușită', 26 | 'delete_confirmation_message' => 'Copia de siguranță a fost ștearsă.', 27 | 'delete_error_title' => 'Eroare', 28 | 'delete_error_message' => 'Copia de siguranță NU a fost ștearsă.', 29 | 'delete_cancel_title' => 'Este în regulă', 30 | 'delete_cancel_message' => 'Copia de siguranță NU a fost ștearsă.', 31 | 'create_confirmation_title' => 'Am început procesul de creare copie de siguranță', 32 | 'create_confirmation_message' => 'Vă rugăm așteptați câteva minute, apoi reîncărcați pagina.', 33 | 'create_error_title' => 'Eroare', 34 | 'create_error_message' => 'Copia de siguranță NU a putut fi creată.', 35 | 'create_warning_title' => 'Eroare necunoscută', 36 | 'create_warning_message' => 'Copia de siguranță e posibil să NU fi fost creată. Verificați fișierele de log pentru detalii.', 37 | 'location' => 'Locație', 38 | 'no_disks_configured' => 'Nu există niciun disc in config/backups.php', 39 | 'backup_doesnt_exist' => 'Fișierul de backup nu există.', 40 | 'only_local_downloads_supported' => 'Doar descarcările din sistemul de fișiere local sunt suportate.', 41 | ]; 42 | -------------------------------------------------------------------------------- /src/resources/lang/ru/backup.php: -------------------------------------------------------------------------------- 1 | 'Резервирование', 16 | 'create_a_new_backup' => 'Создать новую копию', 17 | 'existing_backups' => 'Существующие копии', 18 | 'date' => 'Дата', 19 | 'file_size' => 'Размер файла', 20 | 'actions' => 'Действия', 21 | 'download' => 'Выгрузить', 22 | 'delete' => 'Удалить', 23 | 'delete_confirm' => 'Удалить эту резервную копию?', 24 | 'delete_confirmation_title' => 'Успешно', 25 | 'delete_confirmation_message' => 'Резервная копия удалена.', 26 | 'delete_error_title' => 'Ошибка', 27 | 'delete_error_message' => 'Резервная копия не удалена.', 28 | 'delete_cancel_title' => 'Без ошибок', 29 | 'delete_cancel_message' => 'Резервная копия не удалена.', 30 | 'create_confirmation_title' => 'Процесс резервирования запущен', 31 | 'create_confirmation_message' => 'Пожалуйста, подождите несколько минут до его завершения, затем обновите страницу.', 32 | 'create_error_title' => 'Ошибка резервирования', 33 | 'create_error_message' => 'Не удалось создать резервную копию.', 34 | 'create_warning_title' => 'Неизвестная ошибка', 35 | 'create_warning_message' => 'Возможно резервная копия не создана. Пожалуйста, проверьте лог-файлы для подтверждения.', 36 | 'location' => 'Назначение', 37 | 'no_disks_configured' => 'Настройте диск в конфигурационном файле config/backup.php', 38 | 'backup_doesnt_exist' => 'Резервная копия не существует.', 39 | 'only_local_downloads_supported' => 'Выгрузка поддерживается только для локальных файловых систем.', 40 | ]; 41 | -------------------------------------------------------------------------------- /src/resources/lang/se/backup.php: -------------------------------------------------------------------------------- 1 | 'Säkerhetskopiering', 16 | 'backups' => 'Säkerhetskopieringor', 17 | 'create_a_new_backup' => 'Skapa en ny säkerhetskopia', 18 | 'existing_backups' => 'Befintliga säkerhetskopior', 19 | 'date' => 'Datum', 20 | 'file_size' => 'Filstorlek', 21 | 'actions' => 'Åtgärder', 22 | 'download' => 'Ladda ner', 23 | 'delete' => 'Radera', 24 | 'delete_confirm' => 'Är du säker på att du vill ta bort denna säkerhetskopia?', 25 | 'delete_confirmation_title' => 'Klar', 26 | 'delete_confirmation_message' => 'Säkerhetskopieringsfilen togs bort.', 27 | 'delete_error_title' => 'Fel', 28 | 'delete_error_message' => 'Säkerhetskopieringsfilen har INTE tagits bort.', 29 | 'delete_cancel_title' => 'Det är okej', 30 | 'delete_cancel_message' => 'Säkerhetskopieringsfilen har INTE tagits bort.', 31 | 'create_confirmation_title' => 'Säkerhetskopiering har påbörjats.', 32 | 'create_error_title' => 'Säkerhetskopieringsfel', 33 | 'create_error_message' => 'Säkerhetskopieringsfilen kunde INTE skapas.', 34 | 'create_warning_title' => 'Okänt fel', 35 | 'create_warning_message' => 'Din säkerhetskopia kanske INTE har skapats. Kontrollera loggfilerna för detaljer.', 36 | 'location' => 'Plats', 37 | 'no_disks_configured' => 'Inga backup-diskar konfigurerade i config/backup.php', 38 | 'backup_doesnt_exist' => 'Säkerhetskopieringsfilen finns inte.', 39 | 'only_local_downloads_supported' => 'Endast nedladdningar från det lokala filsystemet stöds.', 40 | 'unknown_disk' => 'Okänd disk.', 41 | 'create_started_message' => 'Vänta några minuter tills det är klart.', 42 | 'create_completed_title' => 'Din säkerhetskopiering är klar.', 43 | 'download_confirmation_title' => 'Nedladdningsprocessen har påbörjats.', 44 | 'download_error_title' => 'Nedladdningsfel', 45 | ]; 46 | -------------------------------------------------------------------------------- /src/resources/lang/tr/backup.php: -------------------------------------------------------------------------------- 1 | 'Yedekler', 16 | 'create_a_new_backup' => 'Yeni bir yedek oluştur', 17 | 'existing_backups' => 'Yedekleme mevcut', 18 | 'date' => 'Tarih', 19 | 'file_size' => 'Dosya Boyutu', 20 | 'actions' => 'Olaylar', 21 | 'download' => 'İndir', 22 | 'delete' => 'Sil', 23 | 'delete_confirm' => 'Bu yedek dosyasını silmek istediğinize emin misiniz?', 24 | 'delete_confirmation_title' => 'Tamam', 25 | 'delete_confirmation_message' => 'Yedek dosyası silindi.', 26 | 'delete_error_title' => 'Hata', 27 | 'delete_error_message' => 'Yedek dosyası silinemedi.', 28 | 'delete_cancel_title' => 'İşlem Sonucu', 29 | 'delete_cancel_message' => 'Yedek dosyası silinemedi.', 30 | 'create_confirmation_title' => 'Yedekleme tamamlandı', 31 | 'create_confirmation_message' => 'Sayfa 3 saniye içerisinde yenilenecektir.', 32 | 'create_error_title' => 'Yedekleme hatası', 33 | 'create_error_message' => 'Yedek dosyası oluşturulamadı.', 34 | 'create_warning_title' => 'Bilinmeyen hata', 35 | 'create_warning_message' => 'Yedekleme işlemi oluşturulmamış olabilir. Lütfen log dosyasını inceleyiniz .', 36 | 'location' => 'Konum', 37 | 'no_disks_configured' => 'Yedekleme disk ismi config/backup.php dosyasında tanımlanmamış', 38 | 'backup_doesnt_exist' => 'Yedek dosyası mevcut değil.', 39 | 'only_local_downloads_supported' => 'İndirme işlemi sadece local sunucuda bulunan dosyalar için geçerlidir.', 40 | ]; 41 | -------------------------------------------------------------------------------- /src/resources/lang/uk/backup.php: -------------------------------------------------------------------------------- 1 | 13 | | 14 | */ 15 | 16 | 'backup' => 'Резервне копіювання', 17 | 'create_a_new_backup' => 'Створити нову резервну копію', 18 | 'existing_backups' => 'Існуючі резервні копії', 19 | 'date' => 'Дата', 20 | 'file_size' => 'Розмір файлу', 21 | 'actions' => 'Дії', 22 | 'download' => 'Завантажити', 23 | 'delete' => 'Видалити', 24 | 'delete_confirm' => 'Ви впевнені, що хочете видалити цей файл резервної копії?', 25 | 'delete_confirmation_title' => 'Готово', 26 | 'delete_confirmation_message' => 'Файл резервної копії видалено.', 27 | 'delete_error_title' => 'Помилка', 28 | 'delete_error_message' => 'Файл резервної копії НЕ видалявся.', 29 | 'delete_cancel_title' => 'Все добре', 30 | 'delete_cancel_message' => 'Файл резервної копії НЕ видалявся.', 31 | 'create_confirmation_title' => 'Розпочато процес резервного копіювання', 32 | 'create_confirmation_message' => 'Зачекайте кілька хвилин, поки він завершиться, а потім оновіть сторінку.', 33 | 'create_error_title' => 'Помилка резервного копіювання', 34 | 'create_error_message' => 'Файл резервної копії НЕ вдалося створити.', 35 | 'create_warning_title' => 'Невідома помилка', 36 | 'create_warning_message' => 'Можливо, ваша резервна копія НЕ була створена. Будь ласка, перевірте файли журналу для деталей.', 37 | 'location' => 'Розташування', 38 | 'no_disks_configured' => 'Резервні диски не налаштовано у config/backup.php', 39 | 'backup_doesnt_exist' => 'Файл резервної копії не існує.', 40 | 'only_local_downloads_supported' => 'Завантаження підтримуються лише з локальної файлової системи.', 41 | ]; 42 | -------------------------------------------------------------------------------- /src/resources/lang/zh/backup.php: -------------------------------------------------------------------------------- 1 | '備份', 16 | 'create_a_new_backup' => '建立新備份', 17 | 'existing_backups' => '存在的備份', 18 | 'date' => '日期', 19 | 'file_size' => '檔案大小', 20 | 'actions' => '執行', 21 | 'download' => '下載', 22 | 'delete' => '刪除', 23 | 'delete_confirm' => '你確定要刪除這個備份檔案?', 24 | 'delete_confirmation_title' => '完成', 25 | 'delete_confirmation_message' => '此備份已刪除', 26 | 'delete_error_title' => '錯誤', 27 | 'delete_error_message' => '此備份未被刪除', 28 | 'delete_cancel_title' => '沒問題', 29 | 'delete_cancel_message' => '此備份未被刪除', 30 | 'create_confirmation_title' => '備份完畢', 31 | 'create_confirmation_message' => '此頁面 3 秒後重新整理', 32 | 'create_error_title' => '備份錯誤', 33 | 'create_error_message' => '此備份無法被建立', 34 | 'create_warning_title' => '未知錯誤', 35 | 'create_warning_message' => '你的備份不允許建立,更多細節請查看 log 檔案', 36 | 'location' => '所在位置', 37 | 'no_disks_configured' => '在 config/backup.php 沒有備份 disks 設定', 38 | 'backup_doesnt_exist' => '此備份檔案不存在', 39 | 'only_local_downloads_supported' => '僅支援本地檔案系統才可以下載', 40 | ]; 41 | -------------------------------------------------------------------------------- /src/resources/views/backup.blade.php: -------------------------------------------------------------------------------- 1 | @extends(backpack_view('blank')) 2 | 3 | @php 4 | $breadcrumbs = [ 5 | trans('backpack::crud.admin') => backpack_url('dashboard'), 6 | trans('backpack::backup.backups') => false, 7 | ]; 8 | @endphp 9 | 10 | @section('header') 11 |
12 |

{{ trans('backpack::backup.backups') }}

13 |
14 | @endsection 15 | 16 | @section('content') 17 | {{-- Default box --}} 18 | 23 | 24 |
25 |
26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | @foreach ($backups as $key => $backup) 38 | 39 | 40 | 41 | 42 | 43 | 53 | 54 | @endforeach 55 | 56 |
#{{ trans('backpack::backup.location') }}{{ trans('backpack::backup.date') }}{{ trans('backpack::backup.file_size') }}{{ trans('backpack::backup.actions') }}
{{ $key + 1 }}{{ $backup->diskName }}{{ $backup->lastModified }}{{ $backup->fileSize }} MB 44 | @if ($backup->downloadLink) 45 | 46 | {{ trans('backpack::backup.download') }} 47 | 48 | @endif 49 | 50 | {{ trans('backpack::backup.delete') }} 51 | 52 |
57 |
58 |
59 | @endsection 60 | 61 | @section('after_styles') 62 | 83 | @endsection 84 | 85 | @section('after_scripts') 86 | 198 | @endsection 199 | -------------------------------------------------------------------------------- /src/routes/backpack/backupmanager.php: -------------------------------------------------------------------------------- 1 | 'Backpack\BackupManager\app\Http\Controllers', 15 | 'prefix' => config('backpack.base.route_prefix', 'admin'), 16 | 'middleware' => ['web', config('backpack.base.middleware_key', 'admin')], 17 | ], function () { 18 | Route::get('backup', 'BackupController@index')->name('backup.index'); 19 | Route::put('backup/create', 'BackupController@create')->name('backup.store'); 20 | Route::get('backup/download/', 'BackupController@download')->name('backup.download'); 21 | Route::delete('backup/delete/', 'BackupController@delete')->name('backup.destroy'); 22 | }); 23 | --------------------------------------------------------------------------------