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

Allow --files-cache=size #5831

Merged
merged 1 commit into from
Jul 3, 2021
Merged

Allow --files-cache=size #5831

merged 1 commit into from
Jul 3, 2021

Conversation

Swanand01
Copy link
Contributor

@Swanand01 Swanand01 commented Jun 11, 2021

I have changed the VALID_MODES in the FilesCacheMode function in parseformat.py and added 's' for size only mode.

Fixes #5686.

@ThomasWaldmann
Copy link
Member

ThomasWaldmann commented Jun 14, 2021

OK, change looks good!

How did you test it?

Update: I looked around in the code. Looks like this is really the only change needed. Didn't do practical tests.

@codecov-commenter
Copy link

codecov-commenter commented Jun 14, 2021

Codecov Report

Merging #5831 (db153ee) into master (cb0db33) will decrease coverage by 0.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5831      +/-   ##
==========================================
- Coverage   83.56%   83.51%   -0.06%     
==========================================
  Files          38       38              
  Lines       10237    10237              
  Branches     1695     1695              
==========================================
- Hits         8555     8549       -6     
- Misses       1187     1190       +3     
- Partials      495      498       +3     
Impacted Files Coverage Δ
src/borg/helpers/parseformat.py 90.13% <100.00%> (ø)
src/borg/archive.py 82.58% <0.00%> (-0.46%) ⬇️
src/borg/remote.py 79.71% <0.00%> (+0.15%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 97fa80d...db153ee. Read the comment docs.

@ThomasWaldmann
Copy link
Member

@Swanand01 did you see my question / can you do some manual tests?

@Swanand01
Copy link
Contributor Author

@Swanand01 did you see my question / can you do some manual tests?

Very sorry I missed your previous message. I don't actually know how to perform tests, could you please suggest what is to be done?

@ThomasWaldmann
Copy link
Member

  • do a backup with default options
  • touch a input file, see how it is detected as M due to its mtime change in the next backup
  • touch input file again, see how it is not detected as M (but U like unchanged) if you run next backup with --files-cache=size

@Swanand01
Copy link
Contributor Author

Exception: Could not find OpenSSL lib/headers, please set BORG_OPENSSL_PREFIX

I am getting this error while installing from setup.py. I am on a windows based machine

@ThomasWaldmann
Copy link
Member

@Swanand01 borg does not work on native windows, you can try cygwin or WSL or Linux, BSD, macOS.

Usually there is some package containing the openssl header files, called libssl-dev or so.

@ThomasWaldmann ThomasWaldmann merged commit 1d1bbfc into borgbackup:master Jul 3, 2021
@ThomasWaldmann
Copy link
Member

I merged this now without waiting for the practical test.

--files-cache=s is not used by default and also not advisable for most use cases.

Somebody brave enough to think that s is enough will test this. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow --files-cache=size
3 participants