Page 38 of 66 FirstFirst ... 28363738394048 ... LastLast
Results 371 to 380 of 659

Thread: [SOLVED] Yet Another Backup Script for Community Version

  1. #371
    Join Date
    Aug 2008
    Location
    Pakistan
    Posts
    100
    Rep Power
    7

    Default Zimbra mailbox backup suceeded .

    Many Many thanks to LaFong ,

    After all with proper installation of dar,zlib,sendmail(But services is Off) , i am able to take backup of my zimbra mail boxes with 15Gb and 7 Mints mail server down time and , finally results are
    Creating file listing from archive...

    :::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::
    full Zimbra Backup ended at: 18:09
    Backup took Hr:3 Min:49 Sec:29 to complete
    :::::::::::::::Cheers Osoffice for the script:::::::::::::::::::::::
    Null message body; hope that's ok
    Thank to all for helping.

  2. #372
    Join Date
    Nov 2008
    Location
    Denver, CO
    Posts
    221
    Rep Power
    7

    Default

    Quote Originally Posted by farrukhndm View Post
    Creating file listing from archive...

    :::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::
    full Zimbra Backup ended at: 18:09
    Backup took Hr:3 Min:49 Sec:29 to complete
    :::::::::::::::Cheers Osoffice for the script:::::::::::::::::::::::
    Null message body; hope that's ok
    Is the result above from standard output? Have you set up your root cron to redirect output to the zim_backup.log file? That would explain the "Null message body" message. The script attempts to mail the log file to you, but if you do not redirect to the log in the cron job, you will get a null message body.

    Code:
    1 2 * * 1     /bin/bash     /usr/local/sbin/zmbac.sh -f > /var/log/zim_backup.log 2>&1
    0 3 * * 2-7   /bin/bash     /usr/local/sbin/zmbac.sh -d > /var/log/zim_backup.log 2>&1

  3. #373
    Join Date
    Jul 2010
    Posts
    1
    Rep Power
    5

    Default newb here, stuck installing

    Hi There,

    I have had a read through, and I am trying to get this script to work. I have downloaded the version 8 script today, and tried to install, but I get this when trying to run,

    root@zimbra:~# sh zmbak_v.0.8.sh
    cat: /opt/zimbra/backup.week: Is a directory
    [: 143: Illegal number:
    zmbak_v.0.8.sh: 158: Syntax error: "(" unexpected
    root@zimbra:~#

    **EDIT**

    OK, the above is a testament to how bad my Linux skills are. It seems if you run ./zmbak_v.0.8.sh --INSTALL life is sweet.



    Thanks
    Last edited by dwwnz; 07-21-2010 at 07:17 PM. Reason: a real newb, couldn't run script

  4. #374
    Join Date
    Apr 2009
    Posts
    22
    Rep Power
    6

    Unhappy Still have scp text file busy error

    Quote Originally Posted by jetorres View Post
    Since I change to the v0.8 of the script the backup is giving me an error during the scp copy section.

    I scp to the same server the backup is running.

    I added to the script, just before the scp command, and ps -ef command to output all the process running at same time the scp is to be run.

    The log I received is:
    Code:
    ============================
    Sat May 22 19:00:02 AST 2010
    Performing FULL backup
    ============================
    full Backup started at: Sat May 22 19:00:02 AST 2010 Old backups found...old week= 19 current week= 20
    
    /media/zimbrabackup/dars/19_Zimbra_Backup_20100515_FULL.1.dar moved to /media/zimbrabackup/burn/
    /media/zimbrabackup/dars/19_Zimbra_Backup_20100515_FULL.1.dar.md5 moved to /media/zimbrabackup/burn/ /media/zimbrabackup/dars/19_Zimbra_Backup_20100515_FULL.2.dar moved to /media/zimbrabackup/burn/
    /media/zimbrabackup/dars/19_Zimbra_Backup_20100515_FULL.2.dar.md5 
    ...
    moved to /media/zimbrabackup/burn/ /media/zimbrabackup/dars/19_Zimbra_Backup_20100521_DIFF.txt.gz moved to /media/zimbrabackup/burn/ Setting date & version Marker into /opt/zimbra/DATE_VERSION.txt Doing a hotsync of /opt/zimbra/ to /media/zimbrabackup/sync/ Disabling the Zimbra crontab...
    Stopping the Zimbra server...
    
    Host conecosrv1.conecodepr.com
    	Stopping stats...Done
    	Stopping mta...Done
    	Stopping spell...Done
    	Stopping snmp...Done
    	Stopping archiving...Done
    	Stopping antivirus...Done
    	Stopping antispam...Done
    	Stopping imapproxy...Done
    	Stopping mailbox...Done
    	Stopping logger...Done
    	Stopping ldap...Done
    Doing a fast cold sync...
    Reinstating Zimbra's crontab...
    Starting Zimbra...
    Host conecosrv1.conecodepr.com
    	Starting ldap...Done.
    	Starting logger...Done.
    	Starting mailbox...Done.
    	Starting imapproxy...Done.
    	Starting antispam...Done.
    	Starting antivirus...Done.
    	Starting snmp...Done.
    	Starting spell...Done.
    	Starting mta...Done.
    	Starting stats...Done.
    Service down time was - Hr:0 Min:3 Sec:39 Writing a full backup: 20_Zimbra_Backup_20100522_FULL
    into: /media/zimbrabackup/dars/ with file sizes of max: 4096M Saving Unencrtyped Archive...
    
    
     --------------------------------------------
     134789 inode(s) saved
     with 12735 hard link(s) recorded
     0 inode(s) changed at the moment of the backup  0 inode(s) not saved (no inode/file change)  0 inode(s) failed to save (filesystem error)  0 inode(s) ignored (excluded by filters)  0 inode(s) recorded as deleted from reference backup
     --------------------------------------------
     Total number of inode considered: 134789
     --------------------------------------------
     EA saved for 0 inode(s)
     --------------------------------------------
    Creating MD5 Checksum for 20_Zimbra_Backup_20100522_FULL.1.dar...
    /usr/bin/md5sum.textutils -b 20_Zimbra_Backup_20100522_FULL.1.dar > 20_Zimbra_Backup_20100522_FULL.1.dar.md5
    Creating MD5 Checksum for 20_Zimbra_Backup_20100522_FULL.2.dar...
    /usr/bin/md5sum.textutils -b 20_Zimbra_Backup_20100522_FULL.2.dar > 20_Zimbra_Backup_20100522_FULL.2.dar.md5
    Creating MD5 Checksum for 20_Zimbra_Backup_20100522_FULL.3.dar...
    /usr/bin/md5sum.textutils -b 20_Zimbra_Backup_20100522_FULL.3.dar > 20_Zimbra_Backup_20100522_FULL.3.dar.md5
    
    UID        PID  PPID  C STIME TTY          TIME CMD
    root         1     0  0 Apr19 ?        00:00:03 /sbin/init
    ...
    root      3116     1  0 Apr19 ?        00:00:00 /sbin/udevd --daemon
    www-data  3345  6348  0 May16 ?        00:00:00 /usr/sbin/apache2 -k start
    www-data  3348  6348  0 May16 ?        00:00:00 /usr/sbin/apache2 -k start
    www-data  3350  6348  0 May16 ?        00:00:00 /usr/sbin/apache2 -k start
    www-data  3351  6348  0 May16 ?        00:00:00 /usr/sbin/apache2 -k start
    www-data  3352  6348  0 May16 ?        00:00:00 /usr/sbin/apache2 -k start
    root      3431     2  0 Apr19 ?        00:00:00 [kpsmoused]
    root      3442     2  0 Apr19 ?        00:00:00 [edac-poller]
    postfix   4428 17248  0 20:55 ?        00:00:00 smtpd -n smtp -t inet -u -o stress 
    root      4670     2  0 Apr19 ?        00:00:00 [kjournald]
    root      4671     2  0 Apr19 ?        00:03:28 [kjournald]
    root      4672     2  0 Apr19 ?        00:02:46 [kjournald]
    root      4673     2  0 Apr19 ?        00:00:00 [kjournald]
    root      4674     2  0 Apr19 ?        00:01:48 [kjournald]
    root      4675     2  0 Apr19 ?        00:00:00 [kjournald]
    root      4973     1  0 Apr19 tty4     00:00:00 /sbin/getty 38400 tty4
    root      4974     1  0 Apr19 tty5     00:00:00 /sbin/getty 38400 tty5
    root      4976     1  0 Apr19 tty2     00:00:00 /sbin/getty 38400 tty2
    root      4978     1  0 Apr19 tty3     00:00:00 /sbin/getty 38400 tty3
    root      4980     1  0 Apr19 tty6     00:00:00 /sbin/getty 38400 tty6
    root      5182     1  0 Apr19 ?        00:00:00 /usr/sbin/acpid -c /etc/acpi/events -s /var/run/acpid.socket
    root      5242     2  0 Apr19 ?        00:00:00 [kondemand/0]
    root      5243     2  0 Apr19 ?        00:00:00 [kondemand/1]
    root      5244     2  0 Apr19 ?        00:00:00 [kondemand/2]
    root      5245     2  0 Apr19 ?        00:00:00 [kondemand/3]
    syslog    5333     1  0 Apr19 ?        00:05:44 /sbin/syslogd -u syslog
    root      5388     1  0 Apr19 ?        00:00:00 /bin/dd bs 1 if /proc/kmsg of /var/run/klogd/kmsg
    klog      5390     1  0 Apr19 ?        00:00:00 /sbin/klogd -P /var/run/klogd/kmsg
    113       5412     1  0 Apr19 ?        00:00:00 /usr/bin/dbus-daemon --system
    root      5428     1  0 Apr19 ?        00:00:00 /usr/sbin/NetworkManager --pid-file /var/run/NetworkManager/NetworkManager.pid
    root      5443     1  0 Apr19 ?        00:00:00 /usr/sbin/NetworkManagerDispatcher --pid-file /var/run/NetworkManager/NetworkManagerDispatcher.pid
    root      5456     1  0 Apr19 ?        00:00:00 /usr/bin/system-tools-backends
    bind      5483     1  0 Apr19 ?        00:00:06 /usr/sbin/named -u bind
    avahi     5550     1  0 Apr19 ?        00:00:46 avahi-daemon: running [conecosrv1.local]
    avahi     5551  5550  0 Apr19 ?        00:00:00 avahi-daemon: chroot helper
    root      5602     1  0 Apr19 ?        00:00:00 /bin/sh /usr/bin/mysqld_safe
    mysql     5645  5602  0 Apr19 ?        00:15:47 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-external-locking --port=3306 --socket=/var/run/mysqld/mysqld.sock
    root      5646  5602  0 Apr19 ?        00:00:00 logger -p daemon.err -t mysqld_safe -i -t mysqld
    backuppc  5736     1  0 Apr19 ?        00:00:54 /usr/bin/perl /usr/share/backuppc/bin/BackupPC -d
    backuppc  5751  5736  0 Apr19 ?        00:04:41 /usr/bin/perl /usr/share/backuppc/bin/BackupPC_trashClean
    root      5763     1  0 Apr19 ?        00:00:00 /usr/sbin/cupsd
    root      5810     1  0 Apr19 ?        00:00:00 /usr/sbin/rinetd
    root      5826     1  0 Apr19 ?        00:00:44 /usr/sbin/nmbd -D
    root      5829     1  0 Apr19 ?        00:00:00 /usr/sbin/smbd -D
    root      5846  5829  0 Apr19 ?        00:00:00 /usr/sbin/smbd -D
    root      5847     1  0 Apr19 ?        00:00:04 /usr/sbin/winbindd
    root      5866  5847  0 Apr19 ?        00:00:00 /usr/sbin/winbindd
    root      5874     1  0 Apr19 ?        00:00:00 /usr/sbin/xinetd -pidfile /var/run/xinetd.pid -stayalive -inetd_compat
    root      5942     1  0 Apr19 ?        00:01:42 /usr/sbin/dhcdbd --system
    116       5961     1  0 Apr19 ?        00:00:26 /usr/sbin/hald
    root      5964     1  0 Apr19 ?        00:00:00 /usr/sbin/console-kit-daemon
    root      5965  5961  0 Apr19 ?        00:00:00 hald-runner
    root      6041  5965  0 Apr19 ?        00:00:00 hald-addon-input: Listening on /dev/input/event1 /dev/input/event4
    116       6048  5965  0 Apr19 ?        00:00:00 hald-addon-acpi: listening on acpid socket /var/run/acpid.socket
    root      6050  5965  0 Apr19 ?        00:00:07 hald-addon-storage: no polling on /dev/fd0 because it is explicitly disabled
    root      6069  5965  0 Apr19 ?        00:01:14 hald-addon-storage: polling /dev/scd0 (every 16 sec)
    root      6095     1  0 Apr19 ?        00:00:00 /usr/sbin/hcid -x -s
    root      6112     2  0 Apr19 ?        00:00:00 [btaddconn]
    root      6113     2  0 Apr19 ?        00:00:00 [btdelconn]
    root      6135  6095  0 Apr19 ?        00:00:00 /usr/lib/bluetooth/bluetoothd-service-audio
    root      6142     2  0 Apr19 ?        00:00:00 [krfcommd]
    root      6156  6095  0 Apr19 ?        00:00:00 /usr/lib/bluetooth/bluetoothd-service-input
    root      6215     1  0 Apr19 ?        00:00:00 /usr/sbin/gdm
    root      6218  6215  0 Apr19 ?        00:00:00 /usr/sbin/gdm
    root      6222  6218  0 Apr19 tty7     00:12:07 /usr/bin/X :0 -br -audit 0 -auth /var/lib/gdm/:0.Xauth vt7
    daemon    6281     1  0 Apr19 ?        00:00:00 /usr/sbin/atd
    root      6295     1  0 Apr19 ?        00:00:12 /usr/sbin/cron
    root      6348     1  0 Apr19 ?        00:01:08 /usr/sbin/apache2 -k start
    root      6371     1  0 Apr19 ?        00:00:01 /opt/likewise/sbin/dcerpcd
    root      6435     1  0 Apr19 ?        00:00:03 /usr/sbin/sshd
    gdm       6448  6218  0 Apr19 ?        00:45:04 /usr/lib/gdm/gdmgreeter
    root      6469     1  0 Apr19 ?        00:00:01 /opt/likewise/sbin/eventlogd --start-as-daemon
    root      6502     1  0 Apr19 ?        00:00:00 /opt/likewise/sbin/lwiod --start-as-daemon
    root      6537     1  0 Apr19 ?        00:00:10 /opt/likewise/sbin/netlogond --start-as-daemon
    root      6575     1  0 Apr19 ?        00:22:54 /opt/likewise/sbin/lsassd --start-as-daemon
    root      6687     2  0 Apr19 ?        00:00:01 [cifsoplockd]
    root      6688     2  0 Apr19 ?        00:00:00 [cifsdnotifyd]
    root      6698     2  0 Apr19 ?        00:10:39 [cifsd]
    root      6710     1  0 Apr19 ?        00:00:38 /usr/bin/perl /usr/share/webmin/miniserv.pl /etc/webmin/miniserv.conf
    ntp       6757     1  0 Apr19 ?        00:00:48 /usr/sbin/ntpd -p /var/run/ntpd.pid -u 117:130 -g
    postfix   7233 17248  0 21:00 ?        00:00:00 cleanup -z -t unix -u
    postfix   7234 17248  0 21:00 ?        00:00:00 smtp -n smtp-amavis -t unix -u -o smtp_data_done_timeout 1200 -o smtp_send_xforward_command yes -o disable_dns_lookups yes -o max_use 20
    postfix   7237 17248  0 21:00 ?        00:00:00 smtpd -n 127.0.0.1:10025 -t inet -u -o content_filter  -o local_recipient_maps  -o virtual_mailbox_maps  -o virtual_alias_maps  -o relay_recipient_maps  -o smtpd_restriction_classes  -o smtpd_delay_reject no -o smtpd_client_restrictions permit_mynetworks,reject -o smtpd_helo_restrictions  -o smtpd_milters  -o smtpd_sender_restrictions  -o smtpd_recipient_restrictions permit_mynetworks,reject -o mynetworks_style host -o mynetworks 127.0.0.0/8 -o strict_rfc821_envelopes yes -o smtpd_error_sleep_time 0 -o smtpd_soft_error_limit 1001 -o smtpd_hard_error_limit 1000 -o smtpd_client_connection_count_limit 0 -o smtpd_client_connection_rate_limit 0 -o receive_override_options no_header_body_checks,no_unknown_recipient_checks,no_address_mappings
    postfix   7238 17248  0 21:00 ?        00:00:00 lmtp -t unix -u
    root      7248 11737  0 21:00 ?        00:00:00 ps -ef
    root     10510     1  0 Apr19 tty1     00:00:00 /sbin/getty 38400 tty1
    root     11730  6295  0 19:00 ?        00:00:00 /USR/SBIN/CRON
    root     11732 11730  0 19:00 ?        00:00:00 /bin/sh -c /bin/bash     /opt/conecobin/zmbac.sh -f > /var/log/zim_backup.log 2>&1
    root     11737 11732  0 19:00 ?        00:00:00 /bin/bash /opt/conecobin/zmbac.sh -f
    root     13928     2  0 19:02 ?        00:00:07 [pdflush]
    zimbra   14009     1  0 19:03 ?        00:00:12 /opt/zimbra/openldap/libexec/slapd -l LOCAL0 -4 -u zimbra -h ldap://conecosrv1.conecodepr.com:389 -f /opt/zimbra/conf/slapd.conf
    zimbra   14475     1  0 19:03 ?        00:00:00 /bin/sh /opt/zimbra/logger/mysql/bin/mysqld_safe --defaults-file=/opt/zimbra/conf/my.logger.cnf --external-locking --log-error=/opt/zimbra/log/logger_mysql_error.log --ledir=/opt/zimbra/logger/mysql/libexec
    zimbra   14482     1  0 19:03 ?        00:00:00 /usr/bin/perl /opt/zimbra/libexec/logswatch --config-file=/opt/zimbra/conf/logswatchrc --use-cpan-file-tail --pid-file=/opt/zimbra/log/logswatch.pid --script-dir=/tmp -t /var/log/zimbra.log
    zimbra   14521 14475  0 19:03 ?        00:00:54 /opt/zimbra/logger/mysql/libexec/mysqld --defaults-file=/opt/zimbra/conf/my.logger.cnf --basedir=/opt/zimbra/logger/mysql --datadir=/opt/zimbra/logger/db/data --pid-file=/opt/zimbra/logger/db/mysql.pid --skip-external-locking --port=7307 --socket=/opt/zimbra/logger/db/mysql.sock --external-locking
    zimbra   14523 14482  0 19:03 ?        00:00:04 /usr/bin/perl /tmp/.swatch_script.14482
    zimbra   14534 14523  0 19:03 ?        00:00:01 /usr/bin/perl /opt/zimbra/libexec/zmlogger
    zimbra   14654     1  0 19:03 ?        00:00:13 /usr/bin/perl /opt/zimbra/libexec/zmmtaconfig
    zimbra   14660     1  0 19:03 ?        00:00:00 /bin/sh /opt/zimbra/mysql/bin/mysqld_safe --defaults-file=/opt/zimbra/conf/my.cnf --external-locking --log-error=/opt/zimbra/log/mysql_error.log --ledir=/opt/zimbra/mysql/libexec
    zimbra   14729 14660  0 19:03 ?        00:00:24 /opt/zimbra/mysql/libexec/mysqld --defaults-file=/opt/zimbra/conf/my.cnf --basedir=/opt/zimbra/mysql --datadir=/opt/zimbra/db/data --pid-file=/opt/zimbra/db/mysql.pid --skip-external-locking --port=7306 --socket=/opt/zimbra/db/mysql.sock --external-locking
    root     15883     1  0 19:04 ?        00:00:00 /opt/zimbra/libexec/zmmailboxdmgr start -Xms1582m -Xmx1582m -client -XX:NewRatio=2 -Djava.awt.headless=true -XX:MaxPermSize=128m -XX:SoftRefLRUPolicyMSPerMB=1 -Xss256k
    zimbra   15884 15883  0 19:04 ?        00:00:40 /opt/zimbra/java/bin/java -Xms1582m -Xmx1582m -client -XX:NewRatio=2 -Djava.awt.headless=true -XX:MaxPermSize=128m -XX:SoftRefLRUPolicyMSPerMB=1 -Xss256k -Djava.io.tmpdir=/opt/zimbra/mailboxd/work -Djava.library.path=/opt/zimbra/lib -Djava.endorsed.dirs=/opt/zimbra/mailboxd/common/endorsed -Dzimbra.config=/opt/zimbra/conf/localconfig.xml -Djetty.home=/opt/zimbra/mailboxd -DSTART=/opt/zimbra/mailboxd/etc/start.config -jar /opt/zimbra/mailboxd/start.jar /opt/zimbra/mailboxd/etc/jetty.properties /opt/zimbra/mailboxd/etc/jetty-setuid.xml /opt/zimbra/mailboxd/etc/jetty.xml
    zimbra   15898     1  0 19:04 ?        00:00:00 /opt/zimbra/memcached/bin/memcached -d -P /opt/zimbra/log/memcached.pid
    zimbra   16254     1  0 19:04 ?        00:00:00 nginx: master process /opt/zimbra/nginx/sbin/nginx -c /opt/zimbra/conf/nginx.conf
    zimbra   16255 16254  0 19:04 ?        00:00:00 nginx: worker process                                      
    zimbra   16256 16254  0 19:04 ?        00:00:00 nginx: worker process                                      
    zimbra   16258 16254  0 19:04 ?        00:00:00 nginx: worker process                                      
    zimbra   16259 16254  0 19:04 ?        00:00:00 nginx: worker process                                      
    zimbra   16282     1  0 19:05 ?        00:00:01 amavisd (master)
    zimbra   16320     1  0 19:05 ?        00:00:00 /opt/zimbra/clamav/bin/freshclam --config-file=/opt/zimbra/conf/freshclam.conf -d --checks=12
    zimbra   16321 16282  0 19:05 ?        00:00:01 amavisd (ch4-avail)
    zimbra   16322 16282  0 19:05 ?        00:00:02 amavisd (ch3-avail)
    zimbra   16323 16282  0 19:05 ?        00:00:02 amavisd (ch6-avail)
    zimbra   16324 16282  0 19:05 ?        00:00:04 amavisd (ch6-avail)
    zimbra   16325 16282  0 19:05 ?        00:00:02 amavisd (ch5-avail)
    zimbra   16326 16282  0 19:05 ?        00:00:02 amavisd (ch3-avail)
    zimbra   16327 16282  0 19:05 ?        00:00:02 amavisd (ch5-avail)
    zimbra   16328 16282  0 19:05 ?        00:00:02 amavisd (ch5-avail)
    zimbra   16329 16282  0 19:05 ?        00:00:01 amavisd (ch2-avail)
    zimbra   16330 16282  0 19:05 ?        00:00:03 amavisd (ch4-avail)
    zimbra   16428     1  0 19:05 ?        00:00:08 /opt/zimbra/clamav/sbin/clamd --config-file=/opt/zimbra/conf/clamd.conf
    zimbra   16468     1  0 19:05 ?        00:00:00 /usr/bin/perl /opt/zimbra/libexec/swatch --config-file=/opt/zimbra/conf/swatchrc --use-cpan-file-tail --script-dir=/tmp -t /var/log/zimbra.log
    zimbra   16472 16468  0 19:05 ?        00:00:03 /usr/bin/perl /tmp/.swatch_script.16468
    zimbra   16480     1  0 19:05 ?        00:00:00 /opt/zimbra/httpd-2.2.8/bin/httpd -k start -f /opt/zimbra/conf/httpd.conf
    zimbra   16482 16480  0 19:05 ?        00:00:00 /opt/zimbra/httpd-2.2.8/bin/httpd -k start -f /opt/zimbra/conf/httpd.conf
    zimbra   16484 16480  0 19:05 ?        00:00:00 /opt/zimbra/httpd-2.2.8/bin/httpd -k start -f /opt/zimbra/conf/httpd.conf
    zimbra   16485 16480  0 19:05 ?        00:00:00 /opt/zimbra/httpd-2.2.8/bin/httpd -k start -f /opt/zimbra/conf/httpd.conf
    zimbra   16487 16480  0 19:05 ?        00:00:00 /opt/zimbra/httpd-2.2.8/bin/httpd -k start -f /opt/zimbra/conf/httpd.conf
    zimbra   16488 16480  0 19:05 ?        00:00:00 /opt/zimbra/httpd-2.2.8/bin/httpd -k start -f /opt/zimbra/conf/httpd.conf
    root     17248     1  0 19:05 ?        00:00:00 /opt/zimbra/postfix/libexec/master
    postfix  17255 17248  0 19:05 ?        00:00:00 qmgr -l -t fifo -u
    zimbra   17256     1  0 19:05 ?        00:00:00 /opt/zimbra/cyrus-sasl/sbin/saslauthd -r -a zimbra
    zimbra   17257 17256  0 19:05 ?        00:00:00 /opt/zimbra/cyrus-sasl/sbin/saslauthd -r -a zimbra
    zimbra   17258 17256  0 19:05 ?        00:00:00 /opt/zimbra/cyrus-sasl/sbin/saslauthd -r -a zimbra
    zimbra   17260 17256  0 19:05 ?        00:00:00 /opt/zimbra/cyrus-sasl/sbin/saslauthd -r -a zimbra
    zimbra   17261 17256  0 19:05 ?        00:00:00 /opt/zimbra/cyrus-sasl/sbin/saslauthd -r -a zimbra
    zimbra   17333     1  0 19:05 ?        00:00:05 /usr/bin/perl -w /opt/zimbra/libexec/zmstat-proc
    zimbra   17335     1  0 19:05 ?        00:00:00 /usr/bin/perl -w /opt/zimbra/libexec/zmstat-cpu
    zimbra   17337     1  0 19:05 ?        00:00:00 /usr/bin/perl -w /opt/zimbra/libexec/zmstat-vm
    zimbra   17343     1  0 19:05 ?        00:00:00 /usr/bin/perl -w /opt/zimbra/libexec/zmstat-fd
    zimbra   17345     1  0 19:05 ?        00:00:01 /usr/bin/perl -w /opt/zimbra/libexec/zmstat-mysql
    zimbra   17350     1  0 19:05 ?        00:00:00 /usr/bin/perl -w /opt/zimbra/libexec/zmstat-mtaqueue
    root     17679     2  0 May21 ?        00:00:07 [pdflush]
    zimbra   17937 17337  0 19:06 ?        00:00:00 /usr/bin/vmstat -n -S K 30
    postfix  18241 17248  0 19:06 ?        00:00:00 tlsmgr -l -t unix -u
    postfix  18243 17248  0 19:06 ?        00:00:00 anvil -l -t unix -u
    root     21805  5965  0 May08 ?        00:00:21 hald-addon-hid-ups: listening on /dev/usb/hiddev0
    postfix  30282 17248  0 20:41 ?        00:00:00 showq -t unix -u
    postfix  30976 17248  0 20:42 ?        00:00:00 pickup -l -t fifo -u
    
    copy archive to conecosrv1.conecodepr.com remote directory /media/iomega/iomega-005d42/ConecoSrv1/ZimbraBackup
    scp: /media/iomega/iomega-005d42/ConecoSrv1/ZimbraBackup/20_Zimbra_Backup_20100522_FULL.3.dar: truncate: Text file busy Error copying archive and checksum to conecosrv1.conecodepr.com
    I do not see why scp has a "Text file busy"

    Since then ...

    I change the ps -ef line to lsof, I added-vvv to the scp command, but none showed me a reason why the scp failed on copying the third backup file with text file busy.
    I could not see any process with this file in use state.

    So I changed the script code to scp one file at a time in a loop, instead of multiple files. Guess what, still have the same error, text file busy.

    So the problem is not the scp, is the file itself. Either the checksum or the dar command is leaving the file in a bad state, and when scp gets to it, fails.

    I am no expert so I need help solving this problem.

    I hope someone is willing to troubleshoot this with me.

  5. #375
    Join Date
    Nov 2008
    Location
    Denver, CO
    Posts
    221
    Rep Power
    7

    Default

    Quote Originally Posted by jetorres View Post
    I do not see why scp has a "Text file busy"
    The error can occur if a destination file with the same name already exists and is busy: #313045 - /usr/bin/scp: scp: Avoid Text file busy error - Debian Bug report logs. Are you checking whether the destination file exists and is busy? Do you have something running on the destination server which senses new files and makes them busy?

    You can also use an alternative to scp, e.g. sftp, rsync, or ssh (Network File Copy using SSH)

    Also, you might try increasing your archive size so that the Full is all in one dar file. From your log, it's failing on the 3rd dar file, 20_Zimbra_Backup_20100522_FULL.3.dar. I set my ARCHIVESIZE large enough so that I only get a single dar file, in this case up to 110GB.

    Code:
    ARCHIVESIZE="110000M"   # storage media size, for full-backup archiving
    This (probably) won't help the scp issue, but makes things simpler if you're not burning to DVD.

  6. #376
    Join Date
    Apr 2009
    Posts
    22
    Rep Power
    6

    Default scp error is worst now

    Quote Originally Posted by LaFong View Post
    The error can occur if a destination file with the same name already exists and is busy: #313045 - /usr/bin/scp: scp: Avoid Text file busy error - Debian Bug report logs. Are you checking whether the destination file exists and is busy? Do you have something running on the destination server which senses new files and makes them busy?

    You can also use an alternative to scp, e.g. sftp, rsync, or ssh (Network File Copy using SSH)

    Also, you might try increasing your archive size so that the Full is all in one dar file. From your log, it's failing on the 3rd dar file, 20_Zimbra_Backup_20100522_FULL.3.dar. I set my ARCHIVESIZE large enough so that I only get a single dar file, in this case up to 110GB.

    Code:
    ARCHIVESIZE="110000M"   # storage media size, for full-backup archiving
    This (probably) won't help the scp issue, but makes things simpler if you're not burning to DVD.

    Making the ARCHIVESIZE large will defeat the use of the V0.8 script, and having files bigger than 4G are slowed to be moved. So I need to solve the scp problem.

    The file does not exist at the destination as the file is being created by the backup script, which runs only once per day. The destination is actually the same source server which I connect, since the script provides scp tranfer only. (Maybe I could change the script and add a section to copy the files directly to a mounted external drive, NAS or NFS)

    For testing I changed the ARCHIVESIZE to 2GB instead of 4GB and now the archives 1 to 5 return text file busy error and the last file is done without error. So the error now is worst.

    How do I find out the answer to this question:
    "Do you have something running on the destination server which senses new files and makes them busy?"

  7. #377
    Join Date
    Nov 2008
    Location
    Denver, CO
    Posts
    221
    Rep Power
    7

    Default

    Quote Originally Posted by jetorres View Post
    Making the ARCHIVESIZE large will defeat the use of the V0.8 script, and having files bigger than 4G are slowed to be moved. So I need to solve the scp problem.
    Can't agree with you here. Most people do not use the burn aspect of the script, which is the only reason for the 4GB ARCHIVESIZE. The size of the file should not affect the speed of transfer. Transferring one 20GB file would ordinarily take slightly less time than 5 4GB files.

    The file does not exist at the destination as the file is being created by the backup script, which runs only once per day. The destination is actually the same source server which I connect, since the script provides scp tranfer only. (Maybe I could change the script and add a section to copy the files directly to a mounted external drive, NAS or NFS)
    Yes, just use cp. I hope you are not scp'ing to the same partition on the same server, especially not the same directory. Either it will be slow, or may even attempt to overwrite itself. And your backup would not be safe. Changing the scp section, or adding a separate cp section should be straightforward.

    For testing I changed the ARCHIVESIZE to 2GB instead of 4GB and now the archives 1 to 5 return text file busy error and the last file is done without error. So the error now is worst.

    How do I find out the answer to this question:
    "Do you have something running on the destination server which senses new files and makes them busy?"
    You've already used lsof, which is the tool of choice. I have not seen scp used to copy files elsewhere on the same server before, so I would look for a substitute.

  8. #378
    Join Date
    Apr 2009
    Posts
    22
    Rep Power
    6

    Default Changing the copy method will not remove the error cause

    Quote Originally Posted by LaFong View Post
    Can't agree with you here. Most people do not use the burn aspect of the script, which is the only reason for the 4GB ARCHIVESIZE. The size of the file should not affect the speed of transfer. Transferring one 20GB file would ordinarily take slightly less time than 5 4GB files.


    Yes, just use cp. I hope you are not scp'ing to the same partition on the same server, especially not the same directory. Either it will be slow, or may even attempt to overwrite itself. And your backup would not be safe. Changing the scp section, or adding a separate cp section should be straightforward.


    You've already used lsof, which is the tool of choice. I have not seen scp used to copy files elsewhere on the same server before, so I would look for a substitute.

    I am scp'ing from one folder in the local hard drive to an Iomega external NAS drive (NTFS) that is mounted in the server.

    What worries me is that the error of text file busy is truncating the files. Even if I create a new section using cp to copy the files to the NAS, instead of scp, the cause of the error will still exist.

    Having then, a similar error with the cp and obtaining truncated files in the NAS. So I need to find the cause to really solve the problem.

    I tried with lsof, but did not show any process with the files in open state before or after the scp command. I will need to run the lsof in parallel to the backup script to check during the scp command if there is any process using the files. But how do I do that?

    Also, how do you set a system to make all new files busy?

  9. #379
    Join Date
    Nov 2008
    Location
    Denver, CO
    Posts
    221
    Rep Power
    7

    Default

    Quote Originally Posted by jetorres View Post
    I am scp'ing from one folder in the local hard drive to an Iomega external NAS drive (NTFS) that is mounted in the server.

    What worries me is that the error of text file busy is truncating the files. Even if I create a new section using cp to copy the files to the NAS, instead of scp, the cause of the error will still exist.

    Having then, a similar error with the cp and obtaining truncated files in the NAS. So I need to find the cause to really solve the problem.
    Is it a local drive or a NAS? How is it mounted, Windows share, NFS, USB, eSATA, what?

    I tried with lsof, but did not show any process with the files in open state before or after the scp command. I will need to run the lsof in parallel to the backup script to check during the scp command if there is any process using the files. But how do I do that?

    Also, how do you set a system to make all new files busy?
    There can be scripts or realtime archiving or other things which watch for new files, and can potentially make them busy. This would be uncommon though. Most likely, using something other than scp will fix the problem. scp and cp are completely different.

  10. #380
    Join Date
    Apr 2009
    Posts
    22
    Rep Power
    6

    Cool Added section to cp instead of scp to mounted external drive

    Quote Originally Posted by LaFong View Post
    Is it a local drive or a NAS? How is it mounted, Windows share, NFS, USB, eSATA, what?


    There can be scripts or realtime archiving or other things which watch for new files, and can potentially make them busy. This would be uncommon though. Most likely, using something other than scp will fix the problem. scp and cp are completely different.
    The drive is an Iomega NAS drive that is mounted using CIFS drivers.

    I already added a section using cp instead of scp to copy the files to the NAS drive mounted. By now, it did not failed, running the script off schedule. So the problem might be fix by using cp instead of scp. I have to wait to my weekly schedule, to run it at the same time the problem arises. If it runs fine during the normal schedule I will consider it solve.

    Even though is fairly simple, I will post the code changes, after I am sure it solves my problem. Maybe someone else could benefit.

Similar Threads

  1. Zimbra Backup Script ... Small Problem
    By frankb in forum Administrators
    Replies: 12
    Last Post: 07-14-2008, 09:40 AM
  2. Debian - Upgrade from 4.5.6
    By magikman in forum Installation
    Replies: 1
    Last Post: 01-19-2008, 12:59 PM
  3. Backup script issues
    By SSS in forum Administrators
    Replies: 18
    Last Post: 12-03-2007, 09:56 AM
  4. 4.0.4 to 4.5.6 upgrade failed in network edition
    By chenthil in forum Administrators
    Replies: 1
    Last Post: 08-27-2007, 10:36 AM
  5. [SOLVED] Simple backup question...
    By dameron in forum Administrators
    Replies: 3
    Last Post: 08-25-2007, 10:36 PM

Posting Permissions

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