Welcome! » Log In » Create A New Profile

"Found too many current_mirror incs!"

Posted by Ron Leach 
Ron Leach
"Found too many current_mirror incs!"
May 28, 2017 04:50PM
List, hello,

We have different machines for (i) our mail-server, and for (ii) a
backup of that mail server's mail storage. Under cron's control,
rdiff-backup uses a remote ssh login from the mail machine onto the
backup machine to make each backup of the mail store. We've just
replaced our mailstorage backup server with a new-build Debian system
equipped with bigger discs; the existing backup data has been copied
(rsync) into the same directory name but which is now mounted under
/srv. The mail system server remains as existing; the new backup
server now has a different IP address but still on the same local
subnet. rdiff-backup is version 1.2.8 on both machines.

But I must have done something wrong in the new set up. The first
attempt to check that mail backup would continue working failed with

Exception 'Found too many current_mirror incs!' raised of class '<type
'exceptions.AssertionError'>':

The rdiff-backup command (same as before but with different IP
address, and with '/srv' added at the destination because the backup
storage is mounted under /srv on the new machine) is:

rdiff-backup --print-statistics -v3 /Data101/vmail/
ron@192.168.0.201::/srv/Data/101vmail

The error report in full is:

Exception 'Found too many current_mirror incs!' raised of class '<type
'exceptions.AssertionError'>':
File "/usr/lib/python2.7/dist-packages/rdiff_backup/Main.py", line
304, in error_check_Main
try: Main(arglist)
File "/usr/lib/python2.7/dist-packages/rdiff_backup/Main.py", line
324, in Main
take_action(rps)
File "/usr/lib/python2.7/dist-packages/rdiff_backup/Main.py", line
280, in take_action
elif action == "backup": Backup(rps[0], rps[1])
File "/usr/lib/python2.7/dist-packages/rdiff_backup/Main.py", line
337, in Backup
backup_final_init(rpout)
File "/usr/lib/python2.7/dist-packages/rdiff_backup/Main.py", line
501, in backup_final_init
checkdest_if_necessary(rpout)
File "/usr/lib/python2.7/dist-packages/rdiff_backup/Main.py", line
916, in checkdest_if_necessary
need_check = checkdest_need_check(dest_rp)
File "/usr/lib/python2.7/dist-packages/rdiff_backup/Main.py", line
907, in checkdest_need_check
assert len(curmir_incs) == 2, "Found too many current_mirror incs!"

Traceback (most recent call last):
File "/usr/bin/rdiff-backup", line 30, in <module>
rdiff_backup.Main.error_check_Main(sys.argv[1:])
File "/usr/lib/python2.7/dist-packages/rdiff_backup/Main.py", line
304, in error_check_Main
try: Main(arglist)
File "/usr/lib/python2.7/dist-packages/rdiff_backup/Main.py", line
324, in Main
take_action(rps)
File "/usr/lib/python2.7/dist-packages/rdiff_backup/Main.py", line
280, in take_action
elif action == "backup": Backup(rps[0], rps[1])
File "/usr/lib/python2.7/dist-packages/rdiff_backup/Main.py", line
337, in Backup
backup_final_init(rpout)
File "/usr/lib/python2.7/dist-packages/rdiff_backup/Main.py", line
501, in backup_final_init
checkdest_if_necessary(rpout)
File "/usr/lib/python2.7/dist-packages/rdiff_backup/Main.py", line
916, in checkdest_if_necessary
need_check = checkdest_need_check(dest_rp)
File "/usr/lib/python2.7/dist-packages/rdiff_backup/Main.py", line
907, in checkdest_need_check
assert len(curmir_incs) == 2, "Found too many current_mirror incs!"
AssertionError: Found too many current_mirror incs!

Using straight ssh login to ron@192.168.0.201 enables
$ cd /srv/Data/101vmail
without error, and
$ ls
lists all the directories and files that should be there, plus the
radiff-backup-data directory. So the remote ssh login looks ok, and
the name of the destination directory look ok.

Using a check-destination-directory command from the mail server

# rdiff-backup --check-destination-dir
ron@192.168.0.201::/srv/Data/101vmail

results in the same error report as above.

I am not sure what to check to find what might be causing this. Has
anybody else seen this error before?

Honestly, any ideas would be really welcome.

regards, Ron

_______________________________________________
rdiff-backup-users mailing list at rdiff-backup-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki
This message was imported via the External PhorumMail Module
Ron Leach
Re: "Found too many current_mirror incs!"
May 28, 2017 04:50PM
On 02/05/2017 16:25, Ron Leach wrote:
> We've just
> replaced our mailstorage backup server with a new-build Debian system
> equipped with bigger discs; the existing backup data has been copied
> (rsync) into the same directory name but which is now mounted under
> /srv. The mail system server remains as existing; the new backup
> server now has a different IP address but still on the same local
> subnet. rdiff-backup is version 1.2.8 on both machines.
>

Just to add, if I may, that the previous backup server had employed
rdiff-backup 1.2.5.

regards, Ron


_______________________________________________
rdiff-backup-users mailing list at rdiff-backup-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki
This message was imported via the External PhorumMail Module
Ron Leach
Re: "Found too many current_mirror incs!"
May 28, 2017 04:50PM
On 02/05/2017 18:06, Yves Bellefeuille wrote:
>> But I must have done something wrong in the new set up. The first
>> attempt to check that mail backup would continue working failed with
>>
>> Exception 'Found too many current_mirror incs!' raised of class
>> '<type 'exceptions.AssertionError'>':
>
> Does this thread help?
>
> https://lists.nongnu.org/archive/html/rdiff-backup-users/2003-11/msg00035.html
>
Yves, thank you, yes, very helpful. I hadn't thought to search for
the error.

In that thread, Ben Escoto had said:

>> The current_mirror.* files are just 0 length regular files that
>> rdiff-backup touches so later version know when the last backup was.
>> I call them "increment files" because their filenames have that form,
>> and that is how the computer thinks of them.
>>
>> So you can have as many old increments.<time>.dir files as you want,
>> but there should only be 1 "current_mirror.<time>.data|snapshot" file,
>> because the current mirror should only have one time.
>>

I have 3 'current_mirror.*' files which indicates a fault (Ben earlier
mentioned that 1 file is normal, 2 files mean the last backup went
wrong, and 3 files is just bad).

But renaming one or another - so that it wasn't a current_mirror.*
file - resulted in this error:

Server5:/home/ron# rdiff-backup --check-destination-dir
--print-statistics -v3 ron@192.168.0.201::/srv/Data/101vmail
Fatal Error: Destination dir /srv/Data/101vmail does not need checking
Server5:/home/ron# Fatal Error: Lost connection to the remote system

I had to ^C to get a prompt back.

I was very surprised, because I thought that --check-dest... would
regress if the check failed, and *not* error if the check passed. To
crash is worrying.

I searched for this new error and, in this archive,

http://www.backupcentral.com/forum/17/213517

Dominic announces what I imagine is an early version of his regress
script which overcomes this second error.

But I am unsure whether to run it here because - really - I don't know
which of these current_mirror.* files I can, safely, remove. (And I
need to remove one to get to the 'doesn't need checking' state.)
Because the backups are incremental, I don't want to cause an
intermediate diff item to be deleted as a result of my deleting a
current_mirror.* file. (This is the same dilemma that the OP in the
thread you posted also faced - but the thread doesn't say what he
finally decided.)

regards, and thanks - again - for posting that link,

Ron

_______________________________________________
rdiff-backup-users mailing list at rdiff-backup-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki
This message was imported via the External PhorumMail Module
Dominic Raferd
Re: "Found too many current_mirror incs!"
May 28, 2017 04:50PM
>
> ​...​
>
> I searched for this new error and, in this archive,
>
> http://www.backupcentral.com/forum/17/213517
>
> Dominic announces what I imagine is an early version of his regress script
> which overcomes this second error.
>
> But I am unsure whether to run it here because - really - I don't know
> which of these current_mirror.* files I can, safely, remove. (And I need
> to remove one to get to the 'doesn't need checking' state.) Because the
> backups are incremental, I don't want to cause an intermediate diff item to
> be deleted as a result of my deleting a current_mirror.* file. (This is
> the same dilemma that the OP in the thread you posted also faced - but the
> thread doesn't say what he finally decided.)


I suggest you take a backup of the existing broken repository and then try
on it the latest version of my script which can be obtained from
http://www.timedicer.co.uk/programs/help/rdiff-backup-regress.sh.php.
Obviously it comes without any guarantees.​

Dominic
_______________________________________________
rdiff-backup-users mailing list at rdiff-backup-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki
This message was imported via the External PhorumMail Module
Ron Leach
Re: "Found too many current_mirror incs!"
May 28, 2017 04:50PM
On 02/05/2017 23:42, Dominic Raferd wrote:
>
>
> I suggest you take a backup of the existing broken repository and then try
> on it the latest version of my script

Dominic, thank you for this suggestion. And thank you for the script,
by the way, which I've used a few times before (on a different backup).

I can try it anyway, but do you expect whether I will need to reduce
the number of current_mirror.* files first, to get to the 'no check
needed' state, before your script will run? Right now, rdiff-backup
stops with its 'too many increments' faults.

In the meantime, I'll be copying the 101vmail directory onto a
relatively large usb stick.

regards, Ron


_______________________________________________
rdiff-backup-users mailing list at rdiff-backup-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki
This message was imported via the External PhorumMail Module
Dominic Raferd
Re: "Found too many current_mirror incs!"
May 28, 2017 04:50PM
On 3 May 2017 at 08:37, Ron Leach <ronleach@tesco.net> wrote:

> On 02/05/2017 23:42, Dominic Raferd wrote:
>
>>
>>
>> I suggest you take a backup of the existing broken repository and then try
>> on it the latest version of my script
>>
>
> Dominic, thank you for this suggestion. And thank you for the script, by
> the way, which I've used a few times before (on a different backup).
>
​My pleasure, thank you​


>
> I can try it anyway, but do you expect whether I will need to reduce the
> number of current_mirror.* files first, to get to the 'no check needed'
> state, before your script will run? Right now, rdiff-backup stops with its
> 'too many increments' faults.

​The script expects to find either 1 or 2 'current_mirror' files and will
abort otherwise. If you reduce the number of current_mirror files to 2 you
can just run rdiff-backup --check-destination-dir and bypass my script.
However I don't know whether you will end up with a consistent archive or
not. After successful completion (if you see this) I suggest running
several verifications (rdiff-backup --verify-at-time), starting with 'now'
and then trying earlier dates.
_______________________________________________
rdiff-backup-users mailing list at rdiff-backup-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki
This message was imported via the External PhorumMail Module
Ron Leach
Re: "Found too many current_mirror incs!"
May 28, 2017 04:50PM
On 02/05/2017 23:42, Dominic Raferd wrote:

>
> I suggest you take a backup of the existing broken repository and then try
> on it the latest version of my script which can be obtained from
> http://www.timedicer.co.uk/programs/help/rdiff-backup-regress.sh.php.


Dominic, I fetched the latest script from your site, thank you.
Having backed up the destination directory, and removed an old
current_mirror.* file, I ran your script to take away the latest
increment. But the script aborted saying it could not find the
destination. So I tried with rdiff-backup --check-dest... using the
same destination and that did find the destination (but aborted saying
'no need to check').

Here's a transaction sequence:

Server5:/home/ron# ./rdiff-backup-regress.sh -n 1
ron@192.168.0.201::/srv/Data/101vmail

rdiff-backup-regress.sh v1.0 [25 Aug 2016] by Dominic (-h for help)
=======================

Cannot find directory "ron@192.168.0.201::/srv/Data/101vmail", aborting...
Server5:/home/ron# rdiff-backup --check-destination-dir -v3
ron@192.168.0.201::/srv/Data/101vmail
Fatal Error: Destination dir /srv/Data/101vmail does not need checking
Server5:/home/ron# Fatal Error: Lost connection to the remote system
^C
Server5:/home/ron# ./rdiff-backup-regress.sh -n 1
ron@192.168.0.201::/srv/Data/101vmail

rdiff-backup-regress.sh v1.0 [25 Aug 2016] by Dominic (-h for help)
=======================

Cannot find directory "ron@192.168.0.201::/srv/Data/101vmail", aborting...
Server5:/home/ron#


SSH from machine ...101 to ...201 works with user certificates - and I
tested that again to make sure there was no remote login problem. I'd
taken the script's command format from the example on the script
webpage, substituting '1' for the '2' in the example (as you can see).
I have also used the script in the past (very likely an earlier
version), and all our backups are onto other machines, and all have
used the user@host::/destination/path type of construction. I'm
assuming the script should be run from the machine that initiates the
backup - is that correct? Or should I be doing this differently?

regards, Ron


_______________________________________________
rdiff-backup-users mailing list at rdiff-backup-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki
This message was imported via the External PhorumMail Module
Dominic Raferd
Re: "Found too many current_mirror incs!"
May 28, 2017 04:50PM
On 3 May 2017 at 22:28, Ron Leach <ronleach@tesco.net> wrote:

> On 02/05/2017 23:42, Dominic Raferd wrote:
>
>
>> I suggest you take a backup of the existing broken repository and then try
>> on it the latest version of my script which can be obtained from
>> http://www.timedicer.co.uk/programs/help/rdiff-backup-regress.sh.php.
>>
>
>
> Dominic, I fetched the latest script from your site, thank you. Having
> backed up the destination directory, and removed an old current_mirror.*
> file, I ran your script to take away the latest increment. But the script
> aborted saying it could not find the destination. So I tried with
> rdiff-backup --check-dest... using the same destination and that did find
> the destination (but aborted saying 'no need to check').
>
> Here's a transaction sequence:
>
> Server5:/home/ron#
> ​​
> ./rdiff-backup-regress.sh -n 1 ron@192.168.0.201::/srv/Data/101vmail
>
> rdiff-backup-regress.sh v1.0 [25 Aug 2016] by Dominic (-h for help)
> =======================
>
> Cannot find directory "ron@192.168.0.201::/srv/Data/101vmail", aborting...
> Server5:/home/ron# rdiff-backup --check-destination-dir -v3
> ron@192.168.0.201::/srv/Data/101vmail
> Fatal Error: Destination dir /srv/Data/101vmail does not need checking
> Server5:/home/ron# Fatal Error: Lost connection to the remote system
> ^C
> Server5:/home/ron# ./rdiff-backup-regress.sh -n 1 ron@192.168.0.201:
> :/srv/Data/101vmail
>
> rdiff-backup-regress.sh v1.0 [25 Aug 2016] by Dominic (-h for help)
> =======================
>
> Cannot find directory "ron@192.168.0.201::/srv/Data/101vmail", aborting...
> Server5:/home/ron#
>
>
> SSH from machine ...101 to ...201 works with user certificates - and I
> tested that again to make sure there was no remote login problem. I'd
> taken the script's command format from the example on the script webpage,
> substituting '1' for the '2' in the example (as you can see). I have also
> used the script in the past (very likely an earlier version), and all our
> backups are onto other machines, and all have used the user@host::/destination/path
> type of construction. I'm assuming the script should be run from the
> machine that initiates the backup - is that correct? Or should I be doing
> this differently?


​The script needs to run locally on the machine that hosts the repository,
sorry - I will update the help info to clarify this. So you need to do
something along these lines:

# log in to hosting server
ssh root@192.168.0.201
# obtain script locally (on server)
wget -O rdiff-backup-regress.sh
http://www.timedicer.co.uk/programs/rdiff-backup-regress.sh
# make it executable
chmod +x ./rdiff-backup-regress.sh
# run it
​./rdiff-backup-regress.sh /srv/Data/101vmail
_______________________________________________
rdiff-backup-users mailing list at rdiff-backup-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki
This message was imported via the External PhorumMail Module
Ron Leach
Re: "Found too many current_mirror incs!"
May 28, 2017 04:50PM
On 04/05/2017 06:39, Dominic Raferd wrote:
> On 3 May 2017 at 22:28, Ron Leach<ronleach@tesco.net> wrote:
>

>> I'm assuming the script should be run from the
>> machine that initiates the backup - is that correct? Or should I be doing
>> this differently?
>
>
> ​The script needs to run locally on the machine that hosts the repository,

Thanks, I've done that and I think there must be, after all that, a
somewhat more-serious problem. The regress started then aborted saying

Error 1 occurred when attempting to regress archive...
ls: cannot access
/srv/Data/101vmail/rdiff-backup-data/mirror_metadata.2017-04-30T19:45:01+01:00.snapshot.gz:
No such file or directory
Ended Thu May 4 08:15:45 BST 2017
ron@Server6:~$

Using mc I checked for the file. It is missing. There's a ..diff.gz
of that time, but no ..snapshot.gz .

For now, and for safety, I've renamed that particular backup archive
as 101vmail.prior, and initiated a completely new backup of our
existing mail store, which is proceeding now; I expect it will take a
little while. ...201 that I am backing up to is a new build, and I
still have the previous machine, which used a different address,
192.168.0.200, offline. The (original) 101vmail archive is still
there on that offline machine and I am able to replace the
possibly-now-incomplete 101vmail.prior on our current backup machine.
I probably will, in case that long archival history is damaged. I'd
prefer, as well, to revert to increments on that because,
operationally, it is a little easier to retrieve historic email from a
current and continuous archive.

Footnote: Returning to the script, for a moment, I've been puzzling
how I had not previously run into the 'run on backup machine' rule -
as I mentioned, I'd used the script a few times before, and all our
backups are onto other physical machines. I've realised the
difference. This particular backup sequence is the *only* instance
that employs user@host::/destination/path; all the others use nfs to
reach the other machines. And because the nfs destination behaves as a
local destination on the machine that initiates the backup, so the
regress script always runs 'locally' in the other instances I've used it.

Dominic, thank you very much for the insights and the script,

regards, Ron

_______________________________________________
rdiff-backup-users mailing list at rdiff-backup-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki
This message was imported via the External PhorumMail Module
Dominic Raferd
Re: "Found too many current_mirror incs!"
May 28, 2017 04:50PM
On 4 May 2017 at 09:44, Ron Leach <ronleach@tesco.net> wrote:
>
>
> Thanks, I've done that and I think there must be, after all that, a
> somewhat more-serious problem. The regress started then aborted saying
>
> Error 1 occurred when attempting to regress archive...
> ls: cannot access /srv/Data/101vmail/rdiff-backu
> p-data/mirror_metadata.2017-04-30T19:45:01+01:00.snapshot.gz: No such
> file or directory
> Ended Thu May 4 08:15:45 BST 2017
> ​...​
>
> Dominic, thank you very much for the insights and the script,


​Sorry you haven't been successful. For future reference I think it is good
practice where possible to verify a repository and take a backup of it
before any operation that might change it​. Full verifications of every
past backup session before each new session are impractical for most of us
however. I use my timedicer-bloat, timedicer-verify and timedicer-mirror
scripts for these verification and backup operations.
_______________________________________________
rdiff-backup-users mailing list at rdiff-backup-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki
This message was imported via the External PhorumMail Module
Sorry, only registered users may post in this forum.

Click here to login