Commit graph

112 commits

Author SHA1 Message Date
Sagar Vora
0f95c2716d fix: incorrect function name in call 2022-02-17 10:50:31 +05:30
Sagar Vora
de22bd6297 fix: improved validation 2022-02-17 10:35:15 +05:30
Anurag0911
8b7629c064
feat: Encrypted Backups (#14513)
* feat: backup-encryption

* fix: Using encryption key and Minor changes.

* fix: Sider.

* fix: Closing curly brace does not appear on the same line as the subsequent block.

* fix: Review Suggestions.

* fix: Minor changes.

* chore: Icon

* fix: Icon and Privileges Changes.
2021-11-09 13:58:57 +05:30
Gavin D'souza
3734b63c17 fix: Do partial backups instead of full in trim-database 2021-09-15 16:08:55 +05:30
Gavin D'souza
3446026555 chore: Update header: license.txt => LICENSE
The license.txt file has been replaced with LICENSE for quite a while
now. INAL but it didn't seem accurate to say "hey, checkout license.txt
although there's no such file". Apart from this, there were
inconsistencies in the headers altogether...this change brings
consistency.
2021-09-03 12:02:59 +05:30
Gavin D'souza
43cde90109 fix(backups): Allow individual backups of all tables
Due to previous logic, only tables under DocType table were allowed to
take partial backups. This change allows backup to be taken for
deprecated doctypes too.
2021-07-30 12:28:27 +05:30
Ankush Menat
4754ab71d1
perf(minor): remove unnecessary comprehensions
- remove several unnecessary comprehensions from functions that accept a generator.
- Using `[x for x in iter]` causes a list to be built first then passed to the outer function.
- `any` and `all` can take generator instead. This makes memory usage O(1) and actually makes these functions short-circuiting. E.g. if the first condition fails then `all` will immediately return false instead of evaluating all the entries.
- `sum`, `min`, `max` => memory usage become O(1)
- `list`, `set`, `.join()` => roughly halves memory usage, as list is not required to be built.
- lastly, it's two fewer characters to read/think about.
2021-05-12 20:38:18 +05:30
Sagar Vora
ab3be339fd fix: remove unsused variables 2021-04-22 12:56:21 +05:30
Sagar Vora
9d3be5160f perf: low priority for backup processes 2021-04-22 12:45:46 +05:30
walstanb
c6497abcd1 fix: minor changes 2021-04-09 13:06:58 +05:30
Sagar Vora
08d8e67946 fix(backups): ensure delete_temp_backups always respects config 2021-04-06 14:56:28 +05:30
Suraj Shetty
60aae80f39
chore: Update develop with Version 13 (#12803) 2021-04-05 14:10:37 +05:30
Gavin D'souza
39da1e0363 fix: Raise error if executable not found in PATH 2020-11-17 18:44:34 +05:30
Gavin D'souza
2fd5a82bbd fix: Add header content in database backups 2020-11-13 19:43:07 +05:30
Gavin D'souza
14fe6ccfa3 fix: Add is_partial check in bench restore 2020-11-13 19:42:38 +05:30
Gavin D'souza
34af8cb326 fix: Show partial backups when flag set
* in fetch_latest_backups whitelisted API
* BackupGenerator.get_recent_backup
2020-11-10 13:12:22 +05:30
Gavin D'souza
a073a59544 fix: Add partial slug only for database file 2020-11-10 12:04:22 +05:30
Gavin D'souza
b4e17b9f95 fix: Give more information about file to match verbosity 2020-11-10 10:52:10 +05:30
Gavin D'souza
853acf6dd0 fix: Add "partial" tag in the backup file following site name to
indicate its nature
2020-11-10 10:51:23 +05:30
Gavin D'souza
368a031da3 fix: Update postgres exlcude table data 2020-10-09 12:19:57 +05:30
Gavin D'souza
44a09191b3 fix: Use public schema for postgres site
tx @surajshetty3416
2020-10-08 19:29:20 +05:30
Gavin D'souza
ff1f1e755d fix: Dynamic summary spacing 2020-10-08 15:45:15 +05:30
Gavin D'souza
26387401b3 test: Added tests for bench backup skip tables
* Added utils for coloured outputs
* Fixed bug during last branch update
2020-10-07 21:10:30 +05:30
Gavin D'souza
7d638d298c chore: remove old comment that lied 2020-10-07 14:33:02 +05:30
Gavin D'souza
7519ba5e1c fix: Backup tables correctly ? 2020-10-07 14:32:40 +05:30
Gavin D'souza
bde7adeb2f style: Black + flake8 2020-10-07 14:06:28 +05:30
Gavin D'souza
5a0948092c Merge branch 'develop' of github.com:frappe/frappe into skip-backup-tables 2020-10-07 14:02:05 +05:30
Gavin D'souza
45ec8ed485 fix: Sider 2020-09-28 19:18:14 +05:30
Gavin D'souza
95ab58fa3d chore: Optimized imports 2020-09-28 19:13:57 +05:30
Gavin D'souza
26be4a2604 fix: Verbosity. Show Backup summary, always 2020-09-28 19:12:19 +05:30
Gavin D'souza
be2d41915a fix: Make dirs if dont exist 2020-09-25 15:24:03 +05:30
Gavin D'souza
a098cd0055 fix: Folder creation failures, click.(s)echo 2020-09-25 14:07:14 +05:30
Gavin D'souza
bb2a1910e8 fix: Handle excludes or includes explicitly
* Take backup only if doctype exists
* Show mysql command only if verbose is passed
2020-09-24 11:34:43 +05:30
Gavin D'souza
6cb6a18b48 feat: Ability to exclude/include certain doctypes from conf or via CLI 2020-09-23 13:18:04 +05:30
Gavin D'souza
305af578cf Merge branch 'develop' of github.com:frappe/frappe into skip-backup-tables 2020-09-22 11:04:13 +05:30
Gavin D'souza
ab3b574e53 Merge branch 'develop' of github.com:frappe/frappe into compress-files 2020-09-21 11:11:52 +05:30
Gavin D'souza
bbdb05378b fix: Deprecate site_config_backup_path in favour of backup_path_conf 2020-09-15 17:30:26 +05:30
Afshan
5377d65cad fix: removed print statements 2020-09-15 16:40:24 +05:30
Afshan
772153da11 fix: setting "self.setting site_config_backup_path" 2020-09-15 16:20:58 +05:30
Gavin D'souza
2a7a3ec6ee feat: Allow setting folder for where all backups can be set
Passing --backup-path {folder_name} to backup will set where the backup
files will be saved
2020-09-07 18:55:11 +05:30
Gavin D'souza
2339165d75 fix: Add command options and description 2020-09-01 20:51:13 +05:30
Gavin D'souza
bf6baff2e4 fix: Pass conf path via backup command 2020-09-01 20:16:07 +05:30
Gavin D'souza
4792556cc5 fix: Sider 2020-09-01 16:12:26 +05:30
Gavin D'souza
ec9559bf33 Merge branch 'develop' of github.com:frappe/frappe into compress-files 2020-09-01 16:01:24 +05:30
Gavin D'souza
b5252d11b9 feat: Compress private and public files during backup 2020-09-01 15:58:58 +05:30
mergify[bot]
c8016584b0
Merge pull request #11358 from gavindsouza/consistency-is-key
fix(backups): Allow naming conf file via BackupGenerator
2020-09-01 09:52:52 +00:00
mergify[bot]
16e3cb9f9e
Merge pull request #11314 from gavindsouza/safe-take-backups
fix: Create backups folder if doesn't exist
2020-08-31 10:48:24 +00:00
gavin
e860ac1108
fix: Don't raise FileExistsError if directory already exists
Co-authored-by: Aditya Hase <aditya@adityahase.com>
2020-08-31 15:14:20 +05:30
Gavin D'souza
afe5959963 fix: Unbreaking change for kwarg backup_path_conf 2020-08-31 14:30:33 +05:30
Gavin D'souza
bf11c70b46 Merge branch 'develop' of github.com:frappe/frappe into skip-backup-tables 2020-08-28 12:19:31 +05:30