Results 1 to 9 of 9

Thread: Unexpected EOF in archive / backup procedure

  1. #1
    Join Date
    Nov 2008
    Posts
    237
    Rep Power
    7

    Default Unexpected EOF in archive / backup procedure

    Hello,

    I'm trying to make a backup script, it is very simple, below is a simple of it:

    Code:
    local_log_file_name = zimbrabackup.log
    su - zimbra -c "zmcontrol -v" >> $local_log_file_name
    su - zimbra -c "zmcontrol stop" >> $local_log_file_name
    pkill -9 -u zimbra >> $local_log_file_name
    rsync -avr /opt/zimbra/ /backup/zimbra
    su - zimbra -c "zmcontrol start" >> $local_log_file_name
    tar -zcvf /backup/zimbrabackup.tar.gz -C /backup zimbra
    when I extract the output compressed file it gives the following error:
    Code:
    zimbra/data/clamav/db/clamav-18b24c80e244a45ac774591d32a6ddae/main.mdb
    zimbra/data/clamav/db/clamav-18b24c80e244a45ac774591d32a6ddae/main.db
    zimbra/data/clamav/db/clamav-b567c9ede98c2fc318235f0bc297724c
    zimbra/data/clamav/db/clamav-8e8a24ad01a3e38e29fad0508ce5931d/
    zimbra/data/clamav/db/clamav-8e8a24ad01a3e38e29fad0508ce5931d/main.fp
    zimbra/data/clamav/db/clamav-8e8a24ad01a3e38e29fad0508ce5931d/main.hdb
    zimbra/data/clamav/db/clamav-8e8a24ad01a3e38e29fad0508ce5931d/COPYING
    zimbra/data/clamav/db/clamav-8e8a24ad01a3e38e29fad0508ce5931d/main.zmd
    zimbra/data/clamav/db/clamav-8e8a24ad01a3e38e29fad0508ce5931d/main.info
    zimbra/data/clamav/db/clamav-8e8a24ad01a3e38e29fad0508ce5931d/main.ndb
    zimbra/data/clamav/db/clamav-8e8a24ad01a3e38e29fad0508ce5931d/main.mdb
    zimbra/data/clamav/db/clamav-8e8a24ad01a3e38e29fad0508ce5931d/main.db
    zimbra/data/clamav/db/main.cld
    zimbra/data/tmp/
    zimbra/data/tmp/.swatch_script.21337
    zimbra/data/tmp/nginx/
    zimbra/data/tmp/nginx/client/
    zimbra/data/tmp/nginx/proxy/
    zimbra/data/tmp/nginx/fastcgi/
    zimbra/data/tmp/.swatch_script.27661
    zimbra/data/tmp/.swatch_script.24658
    zimbra/data/tmp/.swatch_script.20582
    zimbra/data/tmp/.swatch_script.7685
    zimbra/data/tmp/.swatch_script.10413
    zimbra/data/tmp/.swatch_script.27373
    zimbra/data/tmp/.swatch_script.30929
    zimbra/data/tmp/syslog.conf.E19379
    zimbra/data/tmp/.swatch_script.17217
    zimbra/data/tmp/.swatch_script.7666
    zimbra/data/tmp/455ee5d0-777f-4962-a86f-012c6729d57c-deferred/
    zimbra/data/tmp/455ee5d0-777f-4962-a86f-012c6729d57c-deferred/segments.gen
    zimbra/data/tmp/455ee5d0-777f-4962-a86f-012c6729d57c-deferred/segments_6
    zimbra/data/tmp/.swatch_script.21368
    zimbra/data/tmp/.swatch_script.2173
    zimbra/data/tmp/.swatch_script.21253
    zimbra/data/tmp/.swatch_script.24135
    zimbra/data/tmp/.swatch_script.811
    zimbra/data/tmp/.swatch_script.6750
    zimbra/data/tmp/.swatch_script.25625
    zimbra/data/tmp/.swatch_script.10877
    zimbra/data/tmp/.swatch_script.8060
    zimbra/data/tmp/syslog.conf.w19392
    zimbra/data/tmp/.swatch_script.21139
    zimbra/data/tmp/.swatch_script.30226
    zimbra/data/tmp/.swatch_script.12964
    zimbra/data/tmp/.swatch_script.12900
    zimbra/data/tmp/uncompressed/
    zimbra/data/tmp/.swatch_script.22879
    tar: Unexpected EOF in archive
    tar: Unexpected EOF in archive
    tar: Error is not recoverable: exiting now
    it always stoped on the zimbra/data/tmp path, so any idea about this matter?

    Cheers,
    - In a world without walls and fences who needs windows and gates?
    - I am Running Linux.. Finally, my PC is valid & Reliable Hereafter.

  2. #2
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    25

    Default

    Redirect the output of the tar command as it may be killing the pipe which is created
    Code:
    tar -zcvf /backup/zimbrabackup.tar.gz -C /backup zimbra >> $local_log_file_name 2>&1

  3. #3
    Join Date
    Nov 2008
    Posts
    237
    Rep Power
    7

    Default

    while I'm testing your suggestion, is it possible to exclude the /opt/zimbra/tmp folder?, to be the command like this:
    Code:
    rsync -aHk --progress --delete --exclude=*.pid --exclude=/opt/zimbra/tmp/* /opt/zimbra/ /backup/zimbra/
    is it required here to add trailing / after -C to be like this /backup/ zimbra/
    Code:
    tar -zcvf /backup/zimbrabackup.tar.gz -C /backup zimbra >> $local_log_file_name 2>&1
    - In a world without walls and fences who needs windows and gates?
    - I am Running Linux.. Finally, my PC is valid & Reliable Hereafter.

  4. #4
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    25

    Default

    Yes you can just use
    Code:
    --exclude=/opt/zimbra/tmp/
    and for tar you need to use
    Code:
    tar -zcvf /backup/zimbrabackup.tar.gz -C /backup/zimbra . >> $local_log_file_name 2>&1

  5. #5
    Join Date
    Nov 2008
    Posts
    237
    Rep Power
    7

    Default

    I think it work properly, but can I write the command like this:
    Code:
    tar -zcvf /backup/zimbrabackup.tar.gz -C /backup/zimbra . 2>&1
    instead of this
    Code:
    tar -zcvf /backup/zimbrabackup.tar.gz -C /backup/zimbra . >> $local_log_file_name 2>&1
    I noticed that the tar file is now 4.6GB when I used:
    Code:
    rsync -aHk --progress --delete --exclude=/opt/zimbra/tmp/ /opt/zimbra/ /backup/tmp/zimbra/
    unlike when I was using this:
    rsync -avr /opt/zimbra/ /backup/tmp/zimbra

    it was 5.7GB so is the tmp folder is one GB?
    - In a world without walls and fences who needs windows and gates?
    - I am Running Linux.. Finally, my PC is valid & Reliable Hereafter.

  6. #6
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    25

    Default

    Its possible though you could check with
    Code:
    du -sk /opt/zimbra/tmp
    With respect to the tar command where do you want to send stdout and stderr ?

  7. #7
    Join Date
    Nov 2008
    Posts
    237
    Rep Power
    7

    Default

    no tmp exists:
    root@zimbra:~# du -sk /opt/zimbra/tmp
    du: cannot access `/opt/zimbra/tmp': No such file or directory
    - In a world without walls and fences who needs windows and gates?
    - I am Running Linux.. Finally, my PC is valid & Reliable Hereafter.

  8. #8
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    25

    Default

    The path should be /opt/zimbra/data/tmp; so you will need to update your exclude within the rsync.

  9. #9
    Join Date
    Nov 2008
    Posts
    237
    Rep Power
    7

    Default

    I ran the command and below is the result:
    Code:
    root@zimbra:~# du -sh /opt/zimbra/data/tmp/
    236K    /opt/zimbra/data/tmp/
    it seems like are 1/4 M, still don't know why the 1.1GB differents between rsync -aHK
    and rsync -avr

    Cheers,
    - In a world without walls and fences who needs windows and gates?
    - I am Running Linux.. Finally, my PC is valid & Reliable Hereafter.

Similar Threads

  1. Replies: 658
    Last Post: 04-04-2014, 10:01 AM
  2. Inconsistent backup of Zimbra
    By Bingo in forum Administrators
    Replies: 8
    Last Post: 03-11-2010, 06:02 AM
  3. Proofing Modified Backup Script
    By dkbk in forum Administrators
    Replies: 0
    Last Post: 11-26-2009, 12:52 PM
  4. zimbra opesource Backup Script Problem!
    By tashi in forum Administrators
    Replies: 4
    Last Post: 03-31-2009, 12:49 AM
  5. Zimbra fails after working for 2 weeks
    By Linsys in forum Administrators
    Replies: 10
    Last Post: 10-07-2008, 01:42 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
  •