Hi,

I had the same problem...

Only restore old database directory /var/lib/cyrus and file /usr/lib/cyrus/cyrus-db-types.active

#cat /usr/lib/cyrus/cyrus-db-types.active
ANNOTATION skiplist
DBENGINE BerkeleyDB4.7
DUPLICATE berkeley-nosync
MBOX skiplist
PTS berkeley
QUOTA quotalegacy
SEEN skiplist
SUBS flat
TLS berkeley-nosync

I try running upgrade-db with set -x and I think the error could have been the next:

db4.7_recover: Build signature doesn't match environment

Attach a full output in upgrade-db.txt

Thank, Agustín.





El 09/05/13 15:59, Ondřej Surý escribió:
On Thu, May 9, 2013 at 4:18 AM, Ben Hutchings<b...@decadent.org.uk>  wrote:
On Mon, 2013-05-06 at 07:23 +0200, Ondřej Surý wrote:
I still miss the answer for:

Could you check the permissions on /var/lib/cyrus and it's contents?
This is from the full system backup that ran just before the upgrade:

[...]

I see nothing wrong in here.

And could it be that you ran out of free space in /tmp?
It's a tmpfs which appears to to have a capacity of 2G (there is 4G of
swap, barely used).  I don't know how much free space it had during the
upgrade, of course.
That might be the reason. Your deliver databases very quite big, maybe
I just should stay on the same filesystem for the migration.

I have tested the migration script throughly, but there still might be
some corner cases unhandled.
Well, note that migration was triggered by running the init script
'status' action (which is itself a bug - only 'start' should do that)
while the upgraded package was in the unpacked state.  Are you sure that
doesn't make a difference?
Could you please fill a separate bug report (I am sitting at the
Windows machine right now, which makes me pretty useless).

Well, it would help me to understand what has happened if I could test
with real data. So, yes, it would be nice to lay my hands on full
backup.
[...]

I'm afraid these databases seem to include private information that I am
not prepared to disclose.
I understand.

How about I try restoring the system backup on some other machine and
re-run the upgrade with 'set -x' added to upgrade-db?
That would be great. I just need to know what has happened to fix it :(.

O.
--
Ondřej Surý<ond...@sury.org>

--
To unsubscribe, send mail to 706862-unsubscr...@bugs.debian.org.



--
Piense antes de imprimir. Ahorrar papel es cuidar el medio ambiente.





--
Piense antes de imprimir. Ahorrar papel es cuidar el medio ambiente.

+ export PATH=/sbin:/usr/sbin:/bin:/usr/bin
+ LC_ALL=C gawk /^configdirectory:[[:blank:]]/ { print $2 }
+ CONFIG_DIR=/var/lib/cyrus
+ date +%Y%m%d-%H%M%S
+ BACKUP_DIR=/var/backup/cyrus-imapd/20130510-120831
+ mkdir -p /var/backup/cyrus-imapd/20130510-120831
+ upgradealldb /usr/lib/cyrus/cyrus-db-types.txt 
/usr/lib/cyrus/cyrus-db-types.active
+ OLD_LIST=/usr/lib/cyrus/cyrus-db-types.active
+ NEW_LIST=/usr/lib/cyrus/cyrus-db-types.txt
+ DO_UPGRADE_BDB=
+ sed -e s/BerkeleyDB//
+ LC_ALL=C gawk /^DBENGINE[[:blank:]]/ { print $2 } 
/usr/lib/cyrus/cyrus-db-types.active
+ OLD_DBVERSION=4.7
+ sed -e s/BerkeleyDB//
+ LC_ALL=C gawk /^DBENGINE[[:blank:]]/ { print $2 } 
/usr/lib/cyrus/cyrus-db-types.txt
+ NEW_DBVERSION=5.1
+ [ 4.7 != 5.1 ]
+ DO_UPGRADE_BDB=yes
+ DB_UTIL_NOT_FOUND=
+ [ ! -x /usr/bin/db4.7_recover ]
+ [ ! -x /usr/bin/db5.1_upgrade ]
+ [ -n  ]
+ BERKELEY_DB_FOUND=
+ read -r OLD_DBKEY OLD_DBVALUE
+ cat /usr/lib/cyrus/cyrus-db-types.active
+ LC_ALL=C gawk /^ANNOTATION[[:blank:]]/ { print $2 } 
/usr/lib/cyrus/cyrus-db-types.txt
+ NEW_DBVALUE=skiplist
+ [ -z skiplist ]
+ DO_UPGRADE_DB=
+ [ skiplist != skiplist ]
+ DBFILE=
+ DBFILE=annotations.db
+ [ -n  ]
+ [ -f /var/lib/cyrus/annotations.db ]
+ [ -n  -o -n yes ]
+ backupdb annotations.db skiplist 4.7
+ cp -a /var/lib/cyrus/annotations.db /var/backup/cyrus-imapd/20130510-120831
+ [ -n yes ]
+ [ -n  ]
+ read -r OLD_DBKEY OLD_DBVALUE
+ LC_ALL=C gawk /^DBENGINE[[:blank:]]/ { print $2 } 
/usr/lib/cyrus/cyrus-db-types.txt
+ NEW_DBVALUE=BerkeleyDB5.1
+ [ -z BerkeleyDB5.1 ]
+ DO_UPGRADE_DB=
+ [ BerkeleyDB5.1 != BerkeleyDB4.7 ]
+ DO_UPGRADE_DB=yes
+ DBFILE=
+ continue
+ read -r OLD_DBKEY OLD_DBVALUE
+ LC_ALL=C gawk /^DUPLICATE[[:blank:]]/ { print $2 } 
/usr/lib/cyrus/cyrus-db-types.txt
+ NEW_DBVALUE=skiplist
+ [ -z skiplist ]
+ DO_UPGRADE_DB=
+ [ skiplist != berkeley-nosync ]
+ DO_UPGRADE_DB=yes
+ DBFILE=
+ DBFILE=deliver.db
+ [ -n yes ]
+ [ -f /var/lib/cyrus/deliver.db ]
+ [ -n yes -o -n yes ]
+ backupdb deliver.db berkeley-nosync 4.7
+ cp -a /var/lib/cyrus/deliver.db /var/backup/cyrus-imapd/20130510-120831
+ [ ! -d /var/backup/cyrus-imapd/20130510-120831/db -a -d /var/lib/cyrus/db ]
+ mkdir -p /var/backup/cyrus-imapd/20130510-120831/db
+ su cyrus -c db4.7_recover -h /var/lib/cyrus/db
db4.7_recover: Build signature doesn't match environment
+ read log_file
+ su cyrus -c db4.7_archive -h /var/lib/cyrus/db -l
+ cp -a /var/lib/cyrus/db/log.0000001908 
/var/backup/cyrus-imapd/20130510-120831/db
+ read log_file
+ [ -n yes ]
+ BERKELEY_DB_FOUND=yes
+ upgradebdb deliver.db 5.1
+ su cyrus -c db5.1_upgrade -h /var/lib/cyrus/db /var/lib/cyrus/deliver.db
+ [ -n yes ]
+ upgradedb deliver.db berkeley-nosync skiplist
+ mktemp /tmp/deliver.db.XXXXXXXX
+ TMPFILE=/tmp/deliver.db.DMrKtbTb
+ /usr/sbin/cvt_cyrusdb /var/lib/cyrus/deliver.db berkeley-nosync 
/tmp/deliver.db.DMrKtbTb skiplist
Converting from /var/lib/cyrus/deliver.db (berkeley-nosync) to 
/tmp/deliver.db.DMrKtbTb (skiplist)
+ rm -f /var/lib/cyrus/deliver.db
+ mv /tmp/deliver.db.DMrKtbTb /var/lib/cyrus/deliver.db
+ chown cyrus:mail /var/lib/cyrus/deliver.db
+ read -r OLD_DBKEY OLD_DBVALUE
+ LC_ALL=C gawk /^MBOX[[:blank:]]/ { print $2 } 
/usr/lib/cyrus/cyrus-db-types.txt
+ NEW_DBVALUE=skiplist
+ [ -z skiplist ]
+ DO_UPGRADE_DB=
+ [ skiplist != skiplist ]
+ DBFILE=
+ DBFILE=mailboxes.db
+ [ -n  ]
+ [ -f /var/lib/cyrus/mailboxes.db ]
+ [ -n  -o -n yes ]
+ backupdb mailboxes.db skiplist 4.7
+ cp -a /var/lib/cyrus/mailboxes.db /var/backup/cyrus-imapd/20130510-120831
+ [ -n yes ]
+ [ -n  ]
+ read -r OLD_DBKEY OLD_DBVALUE
+ LC_ALL=C gawk /^PTS[[:blank:]]/ { print $2 } /usr/lib/cyrus/cyrus-db-types.txt
+ NEW_DBVALUE=skiplist
+ [ -z skiplist ]
+ DO_UPGRADE_DB=
+ [ skiplist != berkeley ]
+ DO_UPGRADE_DB=yes
+ DBFILE=
+ [ -n yes ]
+ removedb ptscache.db
+ rm -f /var/lib/cyrus/ptscache.db
+ continue
+ read -r OLD_DBKEY OLD_DBVALUE
+ LC_ALL=C gawk /^QUOTA[[:blank:]]/ { print $2 } 
/usr/lib/cyrus/cyrus-db-types.txt
+ NEW_DBVALUE=quotalegacy
+ [ -z quotalegacy ]
+ DO_UPGRADE_DB=
+ [ quotalegacy != quotalegacy ]
+ DBFILE=
+ [ -n  ]
+ [ -n  ]
+ [ -f /var/lib/cyrus/ ]
+ read -r OLD_DBKEY OLD_DBVALUE
+ LC_ALL=C gawk /^SEEN[[:blank:]]/ { print $2 } 
/usr/lib/cyrus/cyrus-db-types.txt
+ NEW_DBVALUE=skiplist
+ [ -z skiplist ]
+ DO_UPGRADE_DB=
+ [ skiplist != skiplist ]
+ DBFILE=
+ [ -n  ]
+ [ -n  ]
+ [ -f /var/lib/cyrus/ ]
+ read -r OLD_DBKEY OLD_DBVALUE
+ LC_ALL=C gawk /^SUBS[[:blank:]]/ { print $2 } 
/usr/lib/cyrus/cyrus-db-types.txt
+ NEW_DBVALUE=flat
+ [ -z flat ]
+ DO_UPGRADE_DB=
+ [ flat != flat ]
+ DBFILE=
+ [ -n  ]
+ [ -n  ]
+ [ -f /var/lib/cyrus/ ]
+ read -r OLD_DBKEY OLD_DBVALUE
+ LC_ALL=C gawk /^TLS[[:blank:]]/ { print $2 } /usr/lib/cyrus/cyrus-db-types.txt
+ NEW_DBVALUE=skiplist
+ [ -z skiplist ]
+ DO_UPGRADE_DB=
+ [ skiplist != berkeley-nosync ]
+ DO_UPGRADE_DB=yes
+ DBFILE=
+ [ -n yes ]
+ removedb tls_sessions.db
+ rm -f /var/lib/cyrus/tls_sessions.db
+ continue
+ read -r OLD_DBKEY OLD_DBVALUE
+ [ -n yes -a -d /var/lib/cyrus/db ]
+ [ -n  ]
+ rm -rf /var/lib/cyrus/db
+ return 0
+ RET=0
+ [ 0 -eq 0 ]
+ cp -p /usr/lib/cyrus/cyrus-db-types.txt /usr/lib/cyrus/cyrus-db-types.active
+ exit 0

Reply via email to