Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Best practices to exclude cache folders to speed up backup #1594

Open
sojusnik opened this issue Dec 24, 2023 · 7 comments
Open

Best practices to exclude cache folders to speed up backup #1594

sojusnik opened this issue Dec 24, 2023 · 7 comments
Labels
Documentation Feature requests a new feature GOOD FIRST ISSUE Used by 24pullrequests.com to suggest issues HELP-WANTED Used by 24pullrequests.com to suggest issues Low relevant, but not urgent

Comments

@sojusnik
Copy link

sojusnik commented Dec 24, 2023

Hey folks!

Going through the log, I've noticed that a lot of small files within cache folders significantly slow down the backup process and in addition to that it actually makes no sense to back them up anyway.

So I wonder what's the best way to exclude such folders elegantly by using excluding patterns?

Adding them manually would be too cumbersome, since only some apps have only one dedicated cache folder, some have several, but in Firefox each site has its own cache folder. See several examples:

~/.config/BraveSoftware/Brave-Browser/ShaderCache
~/.config/BraveSoftware/Brave-Browser/GrShaderCache
~/.config/BraveSoftware/Brave-Browser/GraphiteDawnCache
~/.config/BraveSoftware/Brave-Browser/component_crx_cache
~/.config/BraveSoftware/Brave-Browser/extensions_crx_cache
~/.config/BraveSoftware/Brave-Browser/Guest Profile/GPUCache
~/.config/BraveSoftware/Brave-Browser/Default/GPUCache
~/.config/BraveSoftware/Brave-Browser/Default/DawnCache
~/.config/BraveSoftware/Brave-Browser/Default/optimization_guide_hint_cache_store
~/.config/BraveSoftware/Brave-Browser/Default/Shared Dictionary/cache
~/.config/BraveSoftware/Brave-Browser/Default/Service Worker/CacheStorage
~/.config/BraveSoftware/Brave-Browser/Default/Service Worker/ScriptCache

~/.mozilla/firefox/oyoajxci.default/storage/default/https+++www.reddit.com/cache

~/.var/app/com.discordapp.Discord/cache
~/.var/app/com.discordapp.Discord/config/discord/Cache
~/.var/app/com.discordapp.Discord/config/discord/Code Cache/
~/.var/app/com.discordapp.Discord/config/discord/DawnCache/
~/.var/app/com.discordapp.Discord/config/discord/GPUCache/

~/.var/app/org.signal.Signal/cache
~/.var/app/org.signal.Signal/config/Signal/DawnCache/index
~/.var/app/org.signal.Signal/config/Signal/GPUCache/index

~/.var/app/org.telegram.desktop/cache
~/.var/app/org.telegram.desktop/data/TelegramDesktop/tdata/user_data/media_cache

The solution could be added to the FAQ section, since every BiT user would profit from it.

@emtiu
Copy link
Member

emtiu commented Dec 24, 2023

Hi, thank you for bringing this up! I noticed the same when using BackInTime myself.

I'm afraid there is no easy way that works for all users. Excluding all folders named cache or Cache is a start, but you already discovered: It's different for most applications.

So maybr the FAQ could just include a hint to check the logs and find folders to exclude, like you did.

@buhtz
Copy link
Member

buhtz commented Dec 27, 2023

Have you seen this "Add" button and the "Exclude patttern" dialog?
grafik

Do you have an idea or suggestion how we could improve the situation for our users?

@buhtz buhtz added Feedback needs user response, may be closed after timeout without a response Low relevant, but not urgent labels Dec 27, 2023
@buhtz buhtz added this to the 1.4.2 (upcoming release) milestone Dec 27, 2023
@sojusnik
Copy link
Author

@buhtz

Sure, my question was more about proper exclude patterns for cache folders in general.

At the moment I decided to play it save and use the following

.var/app/**/[Cc]ache/*
.var/app/**/media_cache/*
.mozilla/firefox/**/cache/*
.config/BraveSoftware/Brave-Browser/Default/Service Worker/CacheStorage/*

for the above mentioned folders.

@aryoda
Copy link
Contributor

aryoda commented Dec 27, 2023

So maybe the FAQ could just include a hint to check the logs and find folders to exclude, like you did.

Definitely!

And we could also add two buttons to link to the FAQ for

  • "Best practices": How to check the logs to find "exclude candidates"
  • Exclude pattern syntax: Here with "pattern" I mean the regular language syntax
  • Optional "Application exclude patterns" with hints to candidate folders to exclude for common apps (possibly maintained by our community in the future)

@aryoda aryoda added Documentation Feature requests a new feature labels Dec 27, 2023
@sojusnik
Copy link
Author

So maybe the FAQ could just include a hint to check the logs and find folders to exclude, like you did.

Definitely!

And we could also add two buttons to link to the FAQ for

* "Best practices": How to check the logs to find "exclude candidates"

* `Exclude pattern syntax`: Here with "pattern" I mean the regular language syntax

* Optional "Application exclude patterns" with hints to candidate folders to exclude for common apps (possibly maintained by our community in the future)

Those are excellent points!

One thing that we might have to decide is whether to recommend using * after / or not, f.i.

.var/app/**/[Cc]ache/*

will back up the folder itself, but not its content, while

.var/app/**/[Cc]ache/

won't even back up the folder.

So I wonder which approach should we recommend in the FAQ?

For rsync pattern matching rules see here or here.

@aryoda
Copy link
Contributor

aryoda commented Dec 27, 2023

Related to #1555 (mentions how to exclude Mozilla and Discord lock files)

@buhtz buhtz added GOOD FIRST ISSUE Used by 24pullrequests.com to suggest issues HELP-WANTED Used by 24pullrequests.com to suggest issues labels Jan 9, 2024
@buhtz
Copy link
Member

buhtz commented Jan 16, 2024

What need to be done?

Add an entry into the FAQ.md how to solve the problem.

@buhtz buhtz removed the Feedback needs user response, may be closed after timeout without a response label Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Feature requests a new feature GOOD FIRST ISSUE Used by 24pullrequests.com to suggest issues HELP-WANTED Used by 24pullrequests.com to suggest issues Low relevant, but not urgent
Projects
None yet
Development

No branches or pull requests

4 participants