ispCP - Board - Support
/bin/tar: .: file changed as we read it - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Support Area (/forum-30.html)
+--- Forum: System Setup & Installation (/forum-32.html)
+--- Thread: /bin/tar: .: file changed as we read it (/thread-2132.html)

Pages: 1 2


RE: /bin/tar: .: file changed as we read it - joximu - 01-12-2008 10:49 PM

Hi

the first ones:

/bin/tar: .: file changed as we read it

so: file "." is changed, which means in directory . there are changes while reading it (files were added, deleted etc). Maybe you can change the tar command to be more verbose...


then the cache:

/bin/tar: ./htdocs/modules/Postcalendar/pntemplates/cache: file changed as we read it

it seems that someone is visiting the website during backup and therefore changed the cache - this is not predictable. One solution might be that the customer can define some files/folders to also exclude from backup or all theese files should be in the phptmp folder (which is excluded in the script).

(I'm always talking about the ispcp version)


See the ticket I opened - I also put a patch there which fixes the problem in the ispcp backup programm (tar error -> no more backup).

/J


RE: /bin/tar: .: file changed as we read it - gandyman - 01-13-2008 02:37 AM

hmz understand this all np.

shall try a verbose to see what-why.

This:
Quote:or all theese files should be in the phptmp folder
Wil be an utopie, becouse this means that the program postcalendar needs to be rewritten.

I wil use your patch to see what happen then.

meanwhile I wil work on a hard solution to prevent this error, because I dont think I am the only one who have this prob ???

I have some ideas.
And wen a good solution work wel I post it.

Meanwhile I ceep 1 eye on your ticket, afcourse Wink

BTW I have run a new test now, and take out the network cable from the server.
So nobody ( include me) could do something on the server.

ques what ? ................. Sad
same error.......


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

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/howto:backup:remote_ftp_backup