CLI command to extract/read a Zimbra backup 'item' file?
Results 1 to 2 of 2

Thread: CLI command to extract/read a Zimbra backup 'item' file?

  1. #1
    Join Date
    Nov 2012

    CLI command to extract/read a Zimbra backup 'item' file?

    ZxBackup's "items" appear to be stored as gzip'd files, and can be manually extracted as plain-text readable files.

    For example,

    cd ~
    file /opt/zimbra/backup/zextras/items/zx/zxw...Nmg\=
    	/opt/zimbra/backup/zextras/items/zx/zxw...Nmg\=: gzip compressed data, from FAT filesystem (MS-DOS, OS/2, NT)
    mv \
     /opt/zimbra/backup/zextras/items/zx/zxw...Nmg\= \
    gunzip ~/zxw...Nmg\=.gz
    cat zxw...Nmg\=
    	... plain text readable ...

    Is there a Zextras CLI command to do this -- extract and read an item in shell, without touching/disturbing the original -- more simply/directly?

  2. #2
    ZeXtras Community Manager ZeXtras Employee Cine's Avatar
    Join Date
    Apr 2011
    Hello rbsf!

    If you wish to inspect the content of a backupped blob file in the items/ subdirectory of the backup path, I suggest to use `zless` instead of mv+gunzip+cat. Reading the file with zless will not impact the backup system in any way.

    If you wish to inspect the backupped data for a Zimbra item, you can use the `zxsuite backup getItem` command to see all stored informations about an item.
    The syntax is:
     zxsuite backup getItem {account} {item} [attr1 value1 [attr2 value2...]]
    NAME              TYPE               EXPECTED VALUES   DEFAULT
    account(M)        Account Name/ID                      
    item(M)           Integer                              
    backup_path(O)    Path                                 /opt/zimbra/backup/zextras/
    (M) == mandatory parameter, (O) == optional parameter
    while an example output is:

    :~$ zxsuite backup getItem 04ed586a-66d2-48ec-9b7f-5c6e84951c2a 9440 backup_path /opt/zimbra/backup/zextras.tmp/
            type                                                message
            deleted                                             false
            metadata path                                       /opt/zimbra/backup/zextras.tmp/accounts/04ed586a-66d2-48ec-9b7f-5c6e84951c2a/items/40/9440
            blob path                                           /opt/zimbra/backup/zextras.tmp/items/Fi/FixBoFeuuxC,RzFlT1zgrTPSc0g=
            last modified                                       10/12/2012 23:30:27
            subject                                             Daily mail report for 2012-12-10
            conversation id                                     -9440
            fragment                                            Grand Totals -- messages 6 received 6 delivered 0 forwarded 0 deferred 0 bounced 0 rejected (0%) 0 reject warnings 0 held 0 discarded (0%) 10193 ...
    the account can be both expressed as an email address, for accounts which exist on the system, or as a zimbraId for deleted accounts that are still available in the backup.
    In the near future we'll add the option to dump the blob content straight from this command.

    Have a nice day,
    Last edited by Cine; 12-21-2012 at 10:14 AM.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts