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
Gavin D'souza
ae8201cc1c
fix: Just copy the contents of the files instead of parsing it
2020-08-26 12:08:51 +05:30
Gavin D'souza
cbaa795c20
fix(backups): Allow naming conf file via BackupGenerator
2020-08-26 11:57:03 +05:30
mergify[bot]
7ce4013068
fix: if db_type is not defined then set default to 'mariadb' (bp #11346 ) ( #11349 )
...
(cherry picked from commit 927cd03341c33ffb82e5db373066a7ba239c1491)
Co-authored-by: Saurabh <saurabh@erpnext.com>
2020-08-25 13:05:49 +05:30
Gavin D'souza
022b6e356b
fix: Create backups folder if doesn't exist
...
Backups fail silently if the default `backups` folder doesn't exist
under private
2020-08-19 15:11:39 +05:30
Gavin D'souza
c2ea55b0c0
style: Black
2020-08-14 17:22:48 +05:30
Gavin D'souza
8d745a97ed
fix: Get latest available backup obeying older_than
2020-08-07 21:54:50 +05:30