I recently had a 5.0.9 Zimbra mailbox with inconsistencies between metadata (MySQL DB) and blob store (/opt/zimbra/store/...) in which the store was missing blob data referenced in the database.
Once I parsed the zmblobchk report data to retrieve information for the mailbox I wanted to fix, I wanted an efficient way to remove the blob item references from the database.
All commands run as zimbra user.
A snip from zmblobchk's mb8blobcheck.rpt file:
* MailboxGroup=8, mailbox=8, item=397: file not found: 397-2020.msg (delete associated metadata)
* MailboxGroup=8, mailbox=8, item=398: file not found: 398-2021.msg (delete associated metadata)
Grab the item IDs using awk piped to sed:
awk -F"item=" '{ print $2 }' mb8blobcheck.out | sed -e 's/: file not.*//g' > mb8blobitems.out
Replace newline characters with commas using a tr and sed combo so the list can be used in a MySQL delete query:
cat mb8blobitems.out | tr '\n' ',' | sed -e 's/,$//g' > mb8blobitems.csv
cat mb8blobitems.csv
397,398
Use the .csv in a MySQL delete query to remove the bad entries:
mysql mboxgroup8 -e "DELETE FROM mail_item WHERE mailbox_id=8 AND id IN(`cat mb8blobitems.csv`)"
Thanks to http://funarg.nfshost.com/r2/notes/sed-return-comma.html for this tip.
- admin's blog
- Login or register to post comments
online cialis
cialis , cialis , online cialis ,
Cheap Phentermine
ubekvLSb Cheap Phentermine Xanax Ativan Buy Cialis Online Buy Ambien Buy Valium
Xanax
PpdfeTq Xanax Buy Cialis Phentermine Valium Buy Ambien Ativan
generic cialis
free cialis , generic cialis ,
Xanax
eeAHuJlI Xanax Tramadol Viagra Buy Valium Ambien Buy Phentermine
Valium
FKhjVQ Valium Buy Tramadol Phentermine Ambien Viagra Xanax
Buy Xanax
bCYOVuQc Buy Xanax Cheap Valium Cheap Phentermine Viagra Cheap Ativan Cheap Ambien
Buy Phentermine
EnMiBN Buy Phentermine Xanax Ativan Buy Viagra online Buy Ambien Valium
viagra alternative
cialis soft tabs , cheap generic viagra , cheap cialis , viagra alternative ,
Buy Xanax
GmkfIOty Buy Xanax Valium Cialis Ambien Ultram Phentermine
Cheap Phentermine
IiFNeoCf Cheap Phentermine Cialis Cheap Tramadol Valium Ambien Buy Xanax
viagra online
cialis , buy viagra , cialis , viagra online ,
Xanax
ZmTiFcG Xanax Ativan Viagra Phentermine Valium Ambien
buy viagra
viagar , cailis , cheap cialis , cialis , buy viagra ,
Buy Ambien
zpiLHZ Buy Ambien Cheap Xanax Cialis Buy Phentermine Cheap Valium Cigarettes
cialis online
generic viagra , cheap cialis , viagra , cialis online ,
buy cialis
viagra , cialis online , viagra , buy cialis ,
cialis online
viargra , cialis , viagra , cialis online ,
Services
truly, if the accuracy were recognized, this was the very first compound used as an buy nolvadex without prescription accessory medication by steroid-using athletes. Dan Duchaine had first speculated that it could perhaps be applied by bodybuilders to halt the development of gynocomastia chest tissue in males, because it was used to finish breast tumors in women.
Cigarettes
seVetLGD Cigarettes Cheap Phentermine Buy Viagra online Valium Rolex Watches Buy Cialis Online
Tramadol
YluTlahk Tramadol Buy Cialis Buy Phentermine Viagra Cartier Watches
Xanax
zEdSPMb Xanax Valium Tramadol Cigarettes Ativan
erectile dysfunction
viagra , viagra , erectile dysfunction ,
Services
Augmentin is an antibiotic medicament that is available by prescription. It can be used to deal a number of different augmentin how long to work bacterially infections. The dose, which comes in pills, chewable tabs, and a liquid form, is general accepted every 8 or 12 hours - depending on the particular production and dosage.
Viagra
AEboNxLR Viagra Ativan Buy Phentermine Buy Ambien Cheap Xanax Cialis
generic viagra
cialis , cheap viagra , buy cialis , generic viagra ,
cialis
cialis , cialis ,
Cheap viagra
TrFrgH Cheap viagra Buy Viagra online Phentermine Buy Cialis Online Cheap Ambien
buy cialis
buy cialis ,
cialis
cialis , cialis ,
viagra
cialis , viagra , cialis , viagra ,
Cheap Tramadol
YyZLOhwX Cheap Tramadol Buy Xanax Cheap Klonopin Buy Cialis Phentermine
Services
Acomplia is a popular weight loss medication that is usually buy acomplia came with by practice and diet in place to treat overweight or corpulent patients who are bearing from highly blood points of fat or patients who are enduring from diabetes type 2.
Services
Acomplia is a popular slant departure medicament that is normally buy acomplia without prescription accompanied by exert and diet in club to cover fleshy or corpulent patients who are suffering from extremely high blood levels of fat or patients who are tolerating from diabetes type 2.
cialis
viagra , cialis , viagra , cialis ,
Services
Tenormin can do slope results that may mar your intending or responses. Be heedful if you drive or do anything that takes buy tenormin online you to be awaken and alert. Void drinking inebriant, which fired increase drowsiness and giddiness while you are assuming Tenormin.
Services
Don't use singular to treat an bronhial asthma assault that has already set out. It will not work singulair tablets quick enough to reverse your symptoms. Apply only a fast-acting inhalation medication to cover an asthma attack..
Ativan
qUVzvXQm Ativan Cialis Buy Valium Klonopin Ambien
bu sitelerde güzel sözler ve
bu sitelerde güzel sözler ve aşk sözleri bulabilir e-okul sistemi hakkında yardım alabilirsiniz.
güzel sözler,aşk sözleri,kısa aşk sözleri,tv izle,aşk sözleri kısa,dizi izle,fragman,muzik dinle,canlı tv izle,e-okul sistemi,güzel sözler
Viagra
RutFqVsc Viagra Cialis Buy Cialis Buy Phentermine Buy Viagra Cheapest Cialis
cheap cialis
viagra , cheap cialis , viagra , cheap cialis ,
Viagra
RyyfSeO Viagra Cheap Phentermine Buy Ativan Buy Valium Buy Xanax Ambien
Xanax
IGzMaf Xanax Cheap Phentermine Viagra Cheap Valium Ativan Buy Ambien
buy cialis
viagra , cheap cialis , viagra , buy cialis ,
Cialis
skVdagsx Cialis Buy Valium Cheap Xanax Ativan Ambien Cheap Phentermine
Buy Phentermine
vapFJa Buy Phentermine Cheap Xanax Cialis Buy Valium Cheap Ambien Buy Ativan
cialis
viagra , cialis , viagra , cialis ,
Xanax
AbbNNbpN Xanax Phentermine Cheap Ambien Cialis Ativan Cheap Valium
Phentermine
mqZoxxs Phentermine Buy Valium Xanax Cialis Ambien Ativan
Services
No bad post, write more