LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-13-2011, 05:05 AM   #1
bucovaina78
Member
 
Registered: Oct 2004
Location: Belgium / Antwerp
Distribution: Debian
Posts: 287

Rep: Reputation: 33
rsync fails to delete files only. Shall I rely in --ignore-errors?


Situation.

host: computer I use daily
server: proliant DL380 with MSA500 which serves as a backup server.

I've just finished copying 1,4TB of data over the network and I'm experimenting with file deletion and creation of new files now.

I'm seeing that rsync fails to delete some files (see code below). I'm not very confident to rely on the option --ignore-errors. Is there another workaround to avoid using that option?




Code:
user@host:~$ rsync -zaPtgop --exclude="/home/user/.gvfs" --delete-before --progress -e ssh --skip-compress gz/zip/z/rpm/deb/iso/bz2/t[gb]z/7z/mp[34]/mov/avi/ogg/jpg/jpeg --stats /home/user/directory/ server:/home/user/directory
user@server's password: 
building file list ... 
123456 files to consider
rsync: opendir "/home/user/directory/lost+found" failed: Permission denied (13)
IO error encountered -- skipping file deletion
./
rsync: failed to set times on "/home/user/directory/.": Operation not permitted (1)
rsync: send_files failed to open "/home/user/directory/removespaces": Permission denied (13)
lost+found/
rsync: failed to set times on "/home/user/directory/lost+found": Operation not permitted (1)

Number of files: 123456
Number of files transferred: 1
Total file size: 1545600428805 bytes
Total transferred file size: 766 bytes
Literal data: 0 bytes
Matched data: 0 bytes
File list size: 9271029
File list generation time: 1.074 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 9271090
Total bytes received: 41

sent 9271090 bytes  received 41 bytes  1090721.29 bytes/sec
total size is 1545600428805  speedup is 166711.10
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1070) [sender=3.0.9]

Here I tried again with the --ignore-errors option and it works. Yet again I'm not fully confident using this option. Feels a bit things might go wrong in certain situations, although I can't think what why or when.

Code:
user@host:~$ rsync -zaPtgop --exclude="/home/user/.gvfs" --delete-before --ignore-errors --progress -e ssh --skip-compress gz/zip/z/rpm/deb/iso/bz2/t[gb]z/7z/mp[34]/mov/avi/ogg/jpg/jpeg --stats /home/user/directory/ server:/home/user/directory
user@server's password: 
Permission denied, please try again.
user@server's password: 
building file list ... 
123456 files to consider
rsync: opendir "/home/user/directory/lost+found" failed: Permission denied (13)
deleting zandbak/file1.exe
deleting zandbak/file2.exe
./
rsync: failed to set times on "/home/user/directory/.": Operation not permitted (1)
rsync: send_files failed to open "/home/user/directory/removespaces": Permission denied (13)
lost+found/
rsync: failed to set times on "/home/user/directory/lost+found": Operation not permitted (1)
zandbak/

Number of files: 123456
Number of files transferred: 1
Total file size: 1545600428805 bytes
Total transferred file size: 766 bytes
Literal data: 0 bytes
Matched data: 0 bytes
File list size: 9271029
File list generation time: 0.860 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 9271097
Total bytes received: 48

sent 9271097 bytes  received 48 bytes  741691.60 bytes/sec
total size is 1545600428805  speedup is 166710.85
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1070) [sender=3.0.9]
user@host:~$

Last edited by bucovaina78; 12-13-2011 at 05:07 AM.
 
Old 12-13-2011, 10:08 PM   #2
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,779

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
If you would stop trying to update directories where you have no write permission then the error messages would stop. A "lost+found" directory is typically accessible only by root. I don't know what the ownership/permissions on directories "/home/user/directory" and "/home/user/directory/removespaces" might by, but it would appear that user "user" does not have permission to make modifications there. Restrict your actions to the "zandback" directory, where you apparently do have permission:
Code:
rsync -zaPtgop --exclude="/home/user/.gvfs" --delete-before --progress -e ssh \
    --skip-compress gz/zip/z/rpm/deb/iso/bz2/t[gb]z/7z/mp[34]/mov/avi/ogg/jpg/jpeg --stats \
    /home/user/directory/zandback/ server:/home/user/directory/zandback

Last edited by rknichols; 12-13-2011 at 10:14 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
need to rsync only selected files (--files-from) also need to delete files on dest. ? BrianK Linux - General 5 10-22-2009 09:52 PM
how to delete *~ files created by rsync cyrilng Linux - Software 5 06-23-2009 01:04 AM
Based on what condition, will rsync delete files? edenCC Linux - Software 6 04-09-2009 01:21 AM
rsync not delete non existing files on remote server proNick Linux - Software 2 09-10-2008 03:47 AM
rsync ignore files Eazy-Snatch Linux - Networking 3 09-18-2006 06:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration