I've noticed that the backup files get exponentially larger as time passes on daily backups unless all caches are cleared on a site. Recently I found that a moderately sized website with ~500 nodes had a backup file as large as 530MB. After I cleared all caches, the backup saved was 14MB.
Is there something we can do to avoid this?
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | backup_migrate-exclude_cache_tables-2831297-5.patch | 880 bytes | szeidler |
Comments
Comment #2
szeidler commentedYou should exclude the cache data with selecting all cache-related tables. That can be done when you add a new/edit an existing settings profile at /admin/config/development/backup_migrate/settings. And then exclude the cache table data in the select field called Exclude data from these tables
.
When you use that settings profile for your exports, you don't need to flush the caches in the production system anymore and your backups should be drastically smaller.
Comment #3
ronan commentedThis should be the default (as it was in previous versions) updating issue to reflect that.
Comment #4
couturier commentedUpdating the version.
Comment #5
szeidler commentedThe patch excludes the default cache tables by default and use them also as default excluding tables when creating a new profile.
Comment #6
imyaro commentedProbably we should also include table "cache" ?
Also I don't see "cache_block" in the list.
Comment #7
szeidler commentedDo you find those tables in Drupal8? I cannot see them in my installation.
Comment #8
nancydruI would exclude everything identified thusly (7.x):
Comment #9
szeidler commentedIt's a good idea, but I cannot find a way to clearly identify the cache table names. I stuck in
but cannot extract the necessary CacheBackend information out of it. (Also not all `cache_*` tables were present in that loop.)
Comment #10
Alex Andrascu commentedI've managed to identify the following tables that shouldn't export any data.
If anyone knows different please feed back.
Longer term we'll probably need a more elegant solution to this issue but for now we'll have to go with it.
Comment #12
Alex Andrascu commentedSlightly modified version of patch in #5 pushed to dev.
Comment #13
Alex Andrascu commentedComment #14
Alex Andrascu commentedComment #16
dercheffeWould like to reopen this issue to add the tables "cache_page" and "cachetags" for excluding by default. what do you think about?
Comment #17
couturier commented@dercheffe Since this patch has been committed last year, I'm not sure the procedure. Can someone advise as to whether we should open a new issue for this?
Comment #18
anybody@dercheffe I created a follow-up: #3548593: Add a setting to *dynamically* exclude data from cache tables and other unwanted sources