Subscribe to Mailing Lists     FAQFAQ    SearchSearch      Register  Log in to check your private messagesLog in to check your private messages    Log inLog in 
These forums brought to you by Backup Central, where we also have the Mr. Backup Blog, Mailing Lists, FAQs,
and Directories of Backup Software and Hardware
Rsnapshot and bug with cp ?

 
Post new topic   Reply to topic    Backup Central Forums Forum Index -> Rsnapshot
View previous topic :: View next topic  
Author Message
Frédéric BERNOUD
Guest





PostPosted: Tue Feb 02, 2010 7:47 am    Post subject: Rsnapshot and bug with cp ? Reply with quote

It seems there is a BUG with cp !

I regularly encounter a problem with the order "cp - al " on several of backup under CENTOS. I m using rsnapshot for the backup.

My safeguard or backup works with Rsnapshot application , which using "cp. -al" command

This is reproductible *each time*. Note the bizarre error message
above (hardlinking over itself : ./daily.HARD_COPY" --> "./daily.HARD_COPY"... and not "./daily.0" ---> "./daily.HARD_COPY") :



.snapshots]# cp -al daily.0 daily.HARD_COPY
cp: cannot create hard link `daily.HARD_COPY/localhost/home/sauvegardes/sauvegarde_microlog/copacu/COUREVEN/00001284.doc' to `daily.HARD_COPY/localhost/home/sauvegardes/sauvegarde_microlog/copacu/COUREVEN/00001284.doc': No such file or directory
.snapshots]#


Yes, that file is missing on the copy.

.snapshots]# ls -l daily.HARD_COPY/localhost/home/sauvegardes/sauvegarde_microlog/copacu/COUREVEN/00001284.doc
ls: daily.HARD_COPY/localhost/home/sauvegardes/sauvegarde_microlog/copacu/COUREVEN/00001284.doc: No such file or directory
.snapshots]#


And the file is not corrupted

.snapshots]# mv daily.0/localhost/home/sauvegardes/sauvegarde_microlog/copacu/COUREVEN/00001284.doc ./
.snapshots]# cp -al 00001284.doc 00001284.doc-hard-link
.snapshots]# ls -l 00001284.doc-hard-link
-rwxr--r-- 27 nobody nobody 30720 Jun 28 2006 00001284.doc-hard-link
.snapshots]#


It is working if we remove the file:

.snapshots]# cp -al daily.0 daily.HARD_COPY2
.snapshots]# echo $?
0
.snapshots]#


This is reproductible:

.snapshots]# cp -al daily.0 daily.HARD_COPY3
cp: cannot create hard link `daily.HARD_COPY3/localhost/home/sauvegardes/sauvegarde_microlog/copacu/COUREVEN/00001284.doc' to `daily.HARD_COPY3/localhost/home/sauvegardes/sauvegarde_microlog/copacu/COUREVEN/00001284.doc': No such file or directory
.snapshots]# ls -l daily.HARD_COPY3/localhost/home/sauvegardes/sauvegarde_microlog/copacu/COUREVEN/00001284.doc
ls: daily.HARD_COPY3/localhost/home/sauvegardes/sauvegarde_microlog/copacu/COUREVEN/00001284.doc: No such file or directory
.snapshots]# ls -l daily.0/localhost/home/sauvegardes/sauvegarde_microlog/copacu/COUREVEN/00001284.doc
-rwxr--r-- 27 nobody nobody 30720 Jun 28 2006 daily.0/localhost/home/sauvegardes/sauvegarde_microlog/copacu/COUREVEN/00001284.doc
.snapshots]#

with coreutils 8.4 it is the same thing with another error message. But the file is coping:

.snapshots]# /usr/bin/cp-8.4 --version
cp (GNU coreutils) 8.4

.snapshots]# /usr/bin/cp-8.4 -al daily.0 daily.HARD_COPY4
/usr/bin/cp-8.4: cannot create link `daily.HARD_COPY4/localhost/home/sauvegardes/sauvegarde_microlog/copacu/COUREVEN/00001284.doc': File exists
.snapshots]# ls -l daily.HARD_COPY4/localhost/home/sauvegardes/sauvegarde_microlog/copacu/COUREVEN/00001284.doc
-rwxr--r-- 28 nobody nobody 30720 Jun 28 2006 daily.HARD_COPY4/localhost/home/sauvegardes/sauvegarde_microlog/copacu/COUREVEN/00001284.doc
.snapshots]#




Someone have the same bug on debian:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=512831

Please help!


.snapshots]# rpm -qa rsnapshot
rsnapshot-1.3.0-1.el5.rf
.snapshots]#

.snapshots]# cp --version
cp (GNU coreutils) 5.97


.snapshots]# cat /etc/redhat-release
CentOS release 5 (Final)
.snapshots]#

.snapshots]# rpm -qa coreutils
coreutils-5.97-23.el5_4.1
.snapshots]#


# uname -a
Linux sageetbellierbackup.altiva.org 2.6.18-8.1.14.el5 #1 SMP Thu Sep 27 18:58:54 EDT 2007 i686 i686 i386 GNU/Linux

.snapshots]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/md0 4.8G 308M 4.2G 7% /
tmpfs 247M 0 247M 0% /dev/shm
/dev/md5 434G 106G 306G 26% /home
/dev/md4 965M 18M 898M 2% /tmp
/dev/md2 4.8G 1.5G 3.1G 33% /usr
/dev/md3 5.7G 501M 4.9G 10% /var
.snapshots]#



------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
Back to top
David Cantrell
Guest





PostPosted: Fri Feb 05, 2010 11:49 am    Post subject: Rsnapshot and bug with cp ? Reply with quote

Frédéric BERNOUD wrote:

Quote:
It seems there is a BUG with cp !


Someone have the same bug on debian:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=512831

Please help!

You could simply not use GNU cp - comment out the cmd_cp line in
rsnapshot.conf. rsnapshot can do this step itself if GNU cp isn't
available.

--
David Cantrell | top google result for "internet beard fetish club"

Guns aren't the problem. People who deserve to die are the problem.

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
Back to top
Frédéric BERNOUD
Guest





PostPosted: Mon Feb 08, 2010 3:08 am    Post subject: Rsnapshot and bug with cp ? Reply with quote

Thanks David Cantrell.

I've try to comment out the cmd_cp line and I've got a similar error "ERROR: Warning! Could not link"

Note, this is on another server always on centos 5.

Any idea?

Regards,

Frederic Bernoud


LOGS:

[root < at > Serveur .snapshots]# rsnapshot -v daily
echo 25025 > /var/run/rsnapshot.pid
/bin/rm -rf /mnt/RAID1T/.snapshots/daily.14/
mv /mnt/RAID1T/.snapshots/daily.13/ /mnt/RAID1T/.snapshots/daily.14/
mv /mnt/RAID1T/.snapshots/daily.12/ /mnt/RAID1T/.snapshots/daily.13/
mv /mnt/RAID1T/.snapshots/daily.11/ /mnt/RAID1T/.snapshots/daily.12/
mv /mnt/RAID1T/.snapshots/daily.10/ /mnt/RAID1T/.snapshots/daily.11/
mv /mnt/RAID1T/.snapshots/daily.9/ /mnt/RAID1T/.snapshots/daily.10/
mv /mnt/RAID1T/.snapshots/daily.8/ /mnt/RAID1T/.snapshots/daily.9/
mv /mnt/RAID1T/.snapshots/daily.7/ /mnt/RAID1T/.snapshots/daily.8/
mv /mnt/RAID1T/.snapshots/daily.6/ /mnt/RAID1T/.snapshots/daily.7/
mv /mnt/RAID1T/.snapshots/daily.5/ /mnt/RAID1T/.snapshots/daily.6/
mv /mnt/RAID1T/.snapshots/daily.4/ /mnt/RAID1T/.snapshots/daily.5/
mv /mnt/RAID1T/.snapshots/daily.3/ /mnt/RAID1T/.snapshots/daily.4/
mv /mnt/RAID1T/.snapshots/daily.2/ /mnt/RAID1T/.snapshots/daily.3/
mv /mnt/RAID1T/.snapshots/daily.1/ /mnt/RAID1T/.snapshots/daily.2/
native_cp_al("/mnt/RAID1T/.snapshots/daily.0", \
"/mnt/RAID1T/.snapshots/daily.1")
----------------------------------------------------------------------------
rsnapshot encountered an error! The program was invoked with these options:
/usr/bin/rsnapshot -v daily
----------------------------------------------------------------------------
ERROR: Warning! Could not link("/mnt/RAID1T/.snapshots/daily.0/localhost/mnt/RAID1T/sauvegardes/Sauvegarde-Servlin/home/servlin1/microlog/copacu/COUREVEN/00011464.doc", "/mnt/RAID1T/.snapshots/daily.1/localhost/mnt/RAID1T/sauvegardes/Sauvegarde-Servlin/home/servlin1/microlog/copacu/COUREVEN/00011464.doc") : File exists
/usr/bin/rsync -a --delete --numeric-ids /mnt/RAID1T/.snapshots/daily.0/ \
/mnt/RAID1T/.snapshots/daily.1/
/usr/bin/rsync -a --delete --numeric-ids --relative --delete-excluded \
--exclude=??? /home/vpopmail /mnt/RAID1T/.snapshots/daily.0/localhost/
/usr/bin/rsync -a --delete --numeric-ids --relative --delete-excluded \
--exclude=??? /etc /mnt/RAID1T/.snapshots/daily.0/localhost/
touch /mnt/RAID1T/.snapshots/daily.0/
rm -f /var/run/rsnapshot.pid
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Backup Central Forums Forum Index -> Rsnapshot All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Magic SEO URL for phpBB