Current time: 05-08-2024, 09:01 AM Hello There, Guest! (LoginRegister)


Post Reply 
/bin/tar: .: file changed as we read it
Author Message
datacompboy Offline
Junior Member
*

Posts: 50
Joined: Nov 2009
Reputation: 0
Post: #13
RE: /bin/tar: .: file changed as we read it
Well, get that problem today.
Commandline test shows me, that problem caused by creation of log and file after tar command run.
Not sure is that because multicores, or just tar version updated (yesterday it was fine, but today failed on all vsites).

Fixed with change
$backup_cmd = "$cmd_tar --ignore-failed-read --create --directory=$dmn_dir --$zip --file=$dmn_dir/$backup_filename --exclude=logs --exclude=phptmp --exclude=backups --exclude=$backup_filename --exclude=$backup_filename.log . 2> $dmn_dir/$backup_filename.log 1>&2";

to
$backup_cmd = "touch $dmn_dir/$backup_filename $dmn_dir/$backup_filename.log && $cmd_tar --ignore-failed-read --create --directory=$dmn_dir --$zip --file=$dmn_dir/$backup_filename --exclude=logs --exclude=phptmp --exclude=backups --exclude=$backup_filename --exclude=$backup_filename.log . 2> $dmn_dir/$backup_filename.log 1>&2";

-- i have added touch command BEFORE running tar -- so content of directory remains static.


Also, to have backup uploaded to external FTP, instead of cron i have added hook after call to backup_all_shut_down -- so backup gets sync as soon as backup finished.
http://www.isp-control.net/documentation...ftp_backup
(This post was last modified: 11-20-2009 03:29 AM by datacompboy.)
11-20-2009 03:18 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
RE: /bin/tar: .: file changed as we read it - datacompboy - 11-20-2009 03:18 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)