Le mercredi 28 Septembre 2005 18:18, mna.news a écrit :
> Cheers,
>
> i have a trouble using tar method to backup somes servers.
> the full backup is OK with no problem, just some informations regarding
> somes socket who are not saved ( it's totally normal).
> [...]
I have found the trouble and here is the explanation and a very little patch :
the trouble come from the different maner that the job is done under linux and
aix for the comman tar, the difference is located in the trailing slash ...
let's have an example :
under aix :
LANGUAGE=EN /usr/local/bin/tar cvf /tmp/mna.tar --totals
--newer=2005-09-28 /opt/freeware/bin
/opt/freeware/bin/
/usr/local/bin/tar: Treating date `2005-09-28' as 2005-09-28 00:00:00 + 0
nanoseconds
/usr/local/bin/tar: Removing leading `/' from member names
/usr/local/bin/tar: /opt/freeware/bin/gunzip: file is unchanged; not dumped
[....]
Total bytes written: 10240 (10KiB, 1,9MiB/s)
under linux :
LANGUAGE=EN /bin/gtar cvf /tmp/mna.tar --totals --newer=2005-09-28 /boot/grub
/bin/gtar: Treating date `2005-09-28' as 2005-09-28 00:00:00 + 0 nanoseconds
/bin/gtar: Removing leading `/' from member names
/boot/grub/
Total bytes written: 10240 (10KiB, 9.4MiB/s)
but if we try under linux :
LANGUAGE=EN /bin/gtar cvf /tmp/mna.tar --totals
--newer=2005-09-28 /boot/grub/*
/bin/gtar: Treating date `2005-09-28' as 2005-09-28 00:00:00 + 0 nanoseconds
/bin/gtar: Removing leading `/' from member names
/bin/gtar: /boot/grub/e2fs_stage1_5: file is unchanged; not dumped
[....]
so we can see that the output gnutar is different.
so to avoid this annoying line on incremental backup logs using tar method i
have modified Tar.pm to not log thoses line, here is the patch :
-------------------------------------------------------------------------------------------------
$diff -urN Tar.pm.bkp Tar.pm
--- Tar.pm.bkp 2005-10-09 15:38:34.288803965 +0200
+++ Tar.pm 2005-10-09 15:44:54.338083736 +0200
@@ -221,8 +221,11 @@
$t->{XferLOG}->write(\"$_\n") if ( $t->{logLevel} >= 2 );
$t->{fileCnt}++;
} else {
+ if ( ! /file is unchanged\; not dumped$/ )
+ {
$t->{XferLOG}->write(\"$_\n") if ( $t->{logLevel} >= 0 );
$t->{xferErrCnt}++;
+ }
#
# If tar encounters a minor error, it will exit with a non-zero
# status. We still consider that ok. Remember if tar prints
---------------------------------------------------------------------------------------------------
this modification working for me and i have eliminate all messages regarding
files not dumped due to unchanged status.
This modification need probably to be tested by somebody else, and may be we
can add some filtering strings in config.pl to be more scalable.
Another way of modification can be done only in the CGI handling view logs,
this way have the advantage to log all messages and display only errors.
Michael.
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
BackupPC-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/