Re: cyr_expire on 2.3.16

2016-12-10 Thread Ken Smith via Info-cyrus

Marcus Schopen wrote:

Am Samstag, den 10.12.2016, 14:15 + schrieb Ken Smith via
Info-cyrus:

Hi All,

I'm running 2.3.16 cyrus-imap on Centos 6.

Following a mother board failure on our primary Cyrus server we have
been using a standby server that normally gets a daily backup from the
primary. I now have the primary server running again and I'm
transferring the mailbox data back from the standby.

Through a backup anomaly there a quite a few more mail files in the
mailbox store than cyrus has in its database.

The primary server is now fine, and preparing to be live again.  If I
check the content of the imap store with mutt all is well on the primary
after updating it from the standby, there's just a whole load of surplus
files in /var/spool/imap/.. that I'd like to delete.

I believe I need the -D  option in cyr_expire but when I run it I get
this help text

./cyr_expire
cyr_expire [-C ] -E  [-X ] [-p prefix]
[-a] [-v]

Is the -D option not valid in this version?

What's the simplest way to tidy the filesystem up?

I do this on some mailboxes, if I want to physically remove all mails
with deleted flag from file system:

su - cyrus -c "/usr/sbin/cyrus expire -E 1 -X 0 -D 0 -v -p
user.usermailbox"

Ciao
Marcus


Thank you for your quick reply Marcus

When I run that (like this for Centos) I get

su cyrus -c "/usr/lib/cyrus-imapd/cyr_expire -E 1 -X 0 -D 0 -v -p user.kens"

Expunged 0 out of 0 messages from 0 mailboxes

I think through the backup anomaly the result is that the messages in 
the surplus files have long since been deleted and expunged from a Cyrus 
point of view and through the backup mistake the files that Cyrus knows 
nothing about any more have been restored.


Is there a way to resolve that? EG: Extract a list of valid message 
files from the database and remove those that are not referred to in there?


Thanks

Ken




Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus


Re: cyr_expire on 2.3.16

2016-12-10 Thread Marcus Schopen via Info-cyrus
Am Samstag, den 10.12.2016, 14:15 + schrieb Ken Smith via
Info-cyrus:
> Hi All,
> 
> I'm running 2.3.16 cyrus-imap on Centos 6.
> 
> Following a mother board failure on our primary Cyrus server we have 
> been using a standby server that normally gets a daily backup from the 
> primary. I now have the primary server running again and I'm 
> transferring the mailbox data back from the standby.
> 
> Through a backup anomaly there a quite a few more mail files in the 
> mailbox store than cyrus has in its database.
> 
> The primary server is now fine, and preparing to be live again.  If I 
> check the content of the imap store with mutt all is well on the primary 
> after updating it from the standby, there's just a whole load of surplus 
> files in /var/spool/imap/.. that I'd like to delete.
> 
> I believe I need the -D  option in cyr_expire but when I run it I get 
> this help text
> 
> ./cyr_expire
> cyr_expire [-C ] -E  [-X ] [-p prefix] 
> [-a] [-v]
> 
> Is the -D option not valid in this version?
> 
> What's the simplest way to tidy the filesystem up?

I do this on some mailboxes, if I want to physically remove all mails
with deleted flag from file system:

su - cyrus -c "/usr/sbin/cyrus expire -E 1 -X 0 -D 0 -v -p
user.usermailbox"

Ciao
Marcus



Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus


cyr_expire on 2.3.16

2016-12-10 Thread Ken Smith via Info-cyrus

Hi All,

I'm running 2.3.16 cyrus-imap on Centos 6.

Following a mother board failure on our primary Cyrus server we have 
been using a standby server that normally gets a daily backup from the 
primary. I now have the primary server running again and I'm 
transferring the mailbox data back from the standby.


Through a backup anomaly there a quite a few more mail files in the 
mailbox store than cyrus has in its database.


The primary server is now fine, and preparing to be live again.  If I 
check the content of the imap store with mutt all is well on the primary 
after updating it from the standby, there's just a whole load of surplus 
files in /var/spool/imap/.. that I'd like to delete.


I believe I need the -D  option in cyr_expire but when I run it I get 
this help text


./cyr_expire
cyr_expire [-C ] -E  [-X ] [-p prefix] 
[-a] [-v]


Is the -D option not valid in this version?

What's the simplest way to tidy the filesystem up?

Many thanks

Ken





Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus