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

Found too many current_mirror incs doesn't say where #37

Closed
WolfgangFahl opened this issue Nov 16, 2018 · 2 comments · Fixed by #159
Closed

Found too many current_mirror incs doesn't say where #37

WolfgangFahl opened this issue Nov 16, 2018 · 2 comments · Fixed by #159
Assignees
Labels
Milestone

Comments

@WolfgangFahl
Copy link

When displaying this error message the path to the culprit directory should be included.

@WolfgangFahl
Copy link
Author

WolfgangFahl commented Nov 16, 2018

This script is a workaround. It finds directories with multiple current_mirror entries. The ones with more than two are the culprit.

#!/bin/bash
# https://stackoverflow.com/questions/9157138/recursively-counting-files-in-a-linux-directory

#
# get the current mirrors
# param 1: filter
#
get_current_mirrors() {
  local l_filter="$1"
  for f in $(find . -name current_m* ) ; do 
    d=$(dirname $f)
    b=$(basename $f)
    case $l_filter in
      "dir") echo $d;;
      "file") echo $f;;
      *) echo $f
    esac
  done
}

#get_current_mirrors 
#get_current_mirrors file
get_current_mirrors dir | sort | uniq --count --repeated

@ericzolf ericzolf added bug need review check if the bug is still valid labels Aug 11, 2019
@ericzolf
Copy link
Member

Adding % Globals.rbdir.get_safepath() to assert len(curmir_incs) == 2, "Found too many current_mirror incs!" in src/rdiff_backup/Main.py line 1100 will fix the issue. I'll do it once #60 is closed.

@ericzolf ericzolf removed the need review check if the bug is still valid label Oct 26, 2019
@ericzolf ericzolf self-assigned this Oct 26, 2019
@ericzolf ericzolf added this to the 2.0.0 milestone Oct 26, 2019
@ericzolf ericzolf changed the title Found too many current_mirror incs! Found too many current_mirror incs doesn't say where Oct 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants