I use rsync command to take backup of files from one of my ubuntu server to another ubuntu machine.
Backup server trigger a script that use rysnc command.
Here is the command I use
rsync -rltvh —partial —stats —exclude=.beagle/ —exclude=.* —delete-after root@live_server:/home/ /home/live_server_backup/home >> /tmp/logfile.log 2>&1
live_server is ssh-able without password. So it works. Now problem is with
—delete-after option
After all file synced .At the end I can see deletion procedure skipped.logfile error is like
IO error encountered — skipping file deletion
When i tried to find log there were some error while file sync
rsync: send_files failed to open «/home/xyz/Desktop/PPT_session_1_context.pdf»: Permission denied (13)
So my understanding is as rsync could not read all the files from target for safety reason it is skipping the file deletion.
Is there any way to make —delete-after work even if there is some permission error?
I do not want to use force deletion as it will be dangerous in some situation.
asked Dec 7, 2012 at 3:29
2
Additional note about this issue:
vanished file
should not trigger the condition IO error encountered -- skipping file deletion
, but this often happens when you are creating a backup of a live system.
This is covered by rsync bug #7809 (https://bugzilla.samba.org/show_bug.cgi?id=7809) and should be solved in the upcoming release 3.1.0.
In the meantime use:
--ignore-errors delete even if there are I/O errors
answered Jun 28, 2013 at 11:11
retoreto
6166 silver badges5 bronze badges
From the rsync man page:
--ignore-errors delete even if there are I/O errors
That will address your problem.
answered Apr 27, 2013 at 1:07
TimCinelTimCinel
3513 silver badges5 bronze badges
1
You should use an exclusion file to make rsync
ignore the files that it can’t read. The list can be generated with find . -exec test -r '{}'
in the source directory and then massaged into the exclusion file format rsync
wants.
answered Dec 7, 2012 at 4:48
Kyle JonesKyle Jones
6,1242 gold badges23 silver badges31 bronze badges
4
For me above IO errors, you see permission denied. Didn’t notice at first, but I had to make sure the directory I was reading from was readable as the user I was trying to rsync from.
So probably mostly permission issues these days.
chown the live server appropriately and should work.
answered Jul 12, 2022 at 13:42
I use rsync command to take backup of files from one of my ubuntu server to another ubuntu machine.
Backup server trigger a script that use rysnc command.
Here is the command I use
rsync -rltvh —partial —stats —exclude=.beagle/ —exclude=.* —delete-after root@live_server:/home/ /home/live_server_backup/home >> /tmp/logfile.log 2>&1
live_server is ssh-able without password. So it works. Now problem is with
—delete-after option
After all file synced .At the end I can see deletion procedure skipped.logfile error is like
IO error encountered — skipping file deletion
When i tried to find log there were some error while file sync
rsync: send_files failed to open «/home/xyz/Desktop/PPT_session_1_context.pdf»: Permission denied (13)
So my understanding is as rsync could not read all the files from target for safety reason it is skipping the file deletion.
Is there any way to make —delete-after work even if there is some permission error?
I do not want to use force deletion as it will be dangerous in some situation.
asked Dec 7, 2012 at 3:29
2
Additional note about this issue:
vanished file
should not trigger the condition IO error encountered -- skipping file deletion
, but this often happens when you are creating a backup of a live system.
This is covered by rsync bug #7809 (https://bugzilla.samba.org/show_bug.cgi?id=7809) and should be solved in the upcoming release 3.1.0.
In the meantime use:
--ignore-errors delete even if there are I/O errors
answered Jun 28, 2013 at 11:11
retoreto
6166 silver badges5 bronze badges
From the rsync man page:
--ignore-errors delete even if there are I/O errors
That will address your problem.
answered Apr 27, 2013 at 1:07
TimCinelTimCinel
3513 silver badges5 bronze badges
1
You should use an exclusion file to make rsync
ignore the files that it can’t read. The list can be generated with find . -exec test -r '{}'
in the source directory and then massaged into the exclusion file format rsync
wants.
answered Dec 7, 2012 at 4:48
Kyle JonesKyle Jones
6,1242 gold badges23 silver badges31 bronze badges
4
For me above IO errors, you see permission denied. Didn’t notice at first, but I had to make sure the directory I was reading from was readable as the user I was trying to rsync from.
So probably mostly permission issues these days.
chown the live server appropriately and should work.
answered Jul 12, 2022 at 13:42
Содержание
- Help with r-sync error «failed: Operation not permitted (1) IO error encountered — skipping file deletion»
- Similar questions
- LXC backup fails with «failed: exit code 23»
- Ovidiu
- fabian
- Ovidiu
- fabian
- Ovidiu
- Ovidiu
- fabian
- How do I make rsync delete files that have been deleted from the source folder?
- Code error 23 — IO Error? #25
- Comments
- rsync tasks fails after 11.3 upgrade
- mattieu
- Caleb Land
Help with r-sync error «failed: Operation not permitted (1) IO error encountered — skipping file deletion»
I’m using a MacBook Pro (Retina, 13 inch, Mid 2014). It’s running macOS Mojave.
So I have two external hard drives that I use to store all my work. They are both 4TB.
I use one of them as my primary hard drive, we will call it H1.
The other one is a back-up drive, we will call H2.
I use the sudo r-sync command in Terminal to back-up all the contents from H1 to H2.
I’ve been using it for a few years now without issue. Here’s how I type it:
sudo rsync -av —delete /Volumes/H1/ /Volumes/H2
For some reason, I am now getting an error when I run this command. I type the command, hit enter and then this text appears:
building file list . done
rsync: opendir «/Volumes/H2/.Spotlight-V100» failed: Operation not permitted (1)
rsync: delete_file: rmdir «/Volumes/H2/.Spotlight-V100» failed: Operation not permitted (1)
IO error encountered — skipping file deletion
Even though this error appears, new or moved files from H1 are still copied over to H2 as normal but the old files are not deleted.
For example this is a folder in H1:
Game of Thrones
I change the folder names in H1 so now it looks like this:
George R. R. Martin
But when I use sudo rsync the folder in H2 appears like this because it is skipping file deletion:
Game of Thrones
George R. R. Martin
So far I have tried the following:
- I have gone into System Preferences > Spotlight > Search Results and unticked all of the categories.
- I have used the shortcut CMD + SHIFT + . to view hidden files on both hard drives and then tried to delete the Spotlight-V100 folder in both of them. This folder just keeps reappearing.
Can anyone help me please? I just want to be able to make my H2 backup without having this issue.
Is there something else I should be doing to get rid of Spotlight? Or a way around it so this function stops skipping file deletion?
Thanks in advance.
MacBook Pro 13″, macOS 10.14
Posted on Apr 22, 2019 6:33 AM
Similar questions
Loading page content
Page content loaded
There are no replies.
Help with r-sync error «failed: Operation not permitted (1) IO error encountered — skipping file deletion»
Источник
LXC backup fails with «failed: exit code 23»
Ovidiu
Active Member
All other LXC backups are working just fine but this one gives:
fabian
Proxmox Staff Member
Best regards,
Fabian
Do you already have a Commercial Support Subscription? — If not, Buy now and read the documentation
Ovidiu
Active Member
fabian
Proxmox Staff Member
Best regards,
Fabian
Do you already have a Commercial Support Subscription? — If not, Buy now and read the documentation
Ovidiu
Active Member
That LXC container is: Operating system Linux 4.2.8-1-pve (Ubuntu 14.04)
mount shows:
/dev/loop4 on / type ext4 (rw,relatime,noacl,data=ordered)
After the basic installation I installed Streisand into it => https://github.com/jlund/streisand
That is all that was done to that container as far as I remember.
Thanks for looking into it.
Ovidiu
Active Member
fabian
Proxmox Staff Member
Best regards,
Fabian
Do you already have a Commercial Support Subscription? — If not, Buy now and read the documentation
Источник
How do I make rsync delete files that have been deleted from the source folder?
I recently set up a machine with Ubuntu Server to host game servers. I installed a backup plugin for each game server that creates frequent backups of game world files in a particular folder on the machine. I also established a cron task to automatically copy those backups to my Dropbox folder every night using rsync with the -a option.
After a few months my Dropbox account reached its storage limit and I realized I would not be able to keep so many backups, so I configured the game server backup plugin to not retain so many backups, then waited a few days to see if it would delete the older backups as it is scheduled to do on a weekly basis. The backup plugin eventually did its job and deleted the older backups, so I was expecting the rsync cron task to subsequently delete the older backups from my Dropbox folder to match the source folder, but it has not done so. So I have a couple of questions:
By default, does rsync only add files to the destination folder that have been added to the source folder and change files that have been changed in the source folder but NOT delete files that were deleted from the source folder?
If that is the case, what is the best way to make rsync do this? I want the destination folder to perfectly reflect the source folder, and that means deleting any files that have been deleted from the source folder.
I see some options listed in the manual page for rsync that might do the trick, but since I’m not familiar with.
Источник
Code error 23 — IO Error? #25
I’ve been a user of this package for a while, bit I’ve just used it on a new project today and I’m getting an IO error code 23.
I’m using it with the latest weapp generator for grunt.
The text was updated successfully, but these errors were encountered:
I haven’t come across that error. Can you provide any more information, or some steps to reliably reproduce it?
There have been some fundamental changes recently in rsyncwrapper (the module that grunt-rsync uses to do the actual rsyncing). So I guess that could be causing the issue. I think rsync error 23 means the transfer failed part way through.
Which version of grunt-rsync are you using? Are you using the latest version 0.4.0? Can you try with the previous version 0.3.0 to see if you still get the problem. Or even further back 0.2.1.
So i had no luck with 0.3.0 (same error), but 0.2.1 seems to be working fine. Weird.
So grunt-rsync 0.3.0 represents starting to use rsyncwrapper >= 0.2.0, which is where the changes start to come in. So I guess we can narrow it down to something that happened in rsyncwrapper from 0.2.0 onwards.
Is the failing file transfer you’re trying to do very large? Does it involve a lot of files? Are you printing a lot of output to the terminal? Can you see if it still fails when transferring just one or two files? Or without printing verbose info to the terminal?
Err, it’s probably best i just print the output. This is what happens when i use the latest version of grunt-rsync:
Can you paste in your grunt-rsync options object too?
The generated rsync command was:
The end part —exclude=node_modules, .tmp, test, bower_components looks a bit odd .
Btw, if you copy the generated rsync command (in the output where it says Shell command was ) and paste that into your terminal and run it directly outside of Grunt, does it work?
I’ll test that shell command in a sec.
Here’s the grunt options object:
Nope, doesn’t work. I get a few no such file or directory errors — mainly the ones i’ve said to exclude in the options object :/
Can you try setting your exclude options as all individual strings:
You know what, that did the trick! Amazing!
Annoying i didn’t see it myself 🙁 Massive, massive thanks for the quick response!
No worries, you’re welcome 🙂
I think its something to do with the way that the newer versions of rsyncwrapper are causing the shell to expand the command. For whatever reason those excludes we’re being interpreted as extra source or destination locations I guess?
Just a note for future visitors: I was getting error code 23 due to a nonexistent file/directory that I had specified to sync.
I’m in process of setting up continuous integration and deployment of projects onto AWS EC2 instances within VPC using GoCD (the same can be tried in Jenkins as well). Ideally I would like to trigger the build, distribute and deploy/restart the projects from my GoCD system. I’m able to build, distribute and deploy the project to private instances in VPC through terminal. However, when the same I have put inside the different stages of pipeline in goCD to automate this complete process flow. For all this I am using grunt scripts as task executor.
So when trying to deploy the project on staging, I am also encountering the similar issue. For reference, below here I have attached the output which I am getting on console:
/project/analytics/analytics-server building file list . done analytics_server-0.0.1-SNAPSHOT.jar conf.yml deploy_all nrjks.jks ona.conf start_local start_server lib/ sent 96078 bytes received 180 bytes 38503.20 bytes/sec total size is 22257751 speedup is 231.23 Shell command was: rsync ./dist/ root@xxx.ser.xxx.net:
/project/analytics/analytics-server —rsh «ssh -i allStagingServer.key» —recursive —delete —delete-excluded —exclude=.svn* —exclude=*.scss —verbose �[31mERROR�[39m �[31mError: rsync exited with code 23�[39m �[33mWarning: Task «rsync:internal_copy_dist» failed.� Use —force to continue.�[39m �[31mAborted due to warnings.�[39m»>
Here’s the grunt’s options & internal_copy_dist:
/project/analytics/analytics-server», host: » «, syncDestIgnoreExcl: true > >»>
Any ideas?
Or if I am going wrong then any suggestions.
Источник
rsync tasks fails after 11.3 upgrade
mattieu
Cadet
Hi,
After upgrading to 11.3, all my rsync tasks fails with the logs:
rsync: opendir «/mnt/tank/Documents/user2/Downloads» failed: Permission denied (13) IO error encountered — skipping file deletion rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1191) [sender=3.1.3]
I run the tasks with another user (user1). This user has read/write rights on the directory:
$ ls -alFh /mnt/tank/Documents/user2 total 378 drwxrwxr-x 13 user2 gnas 13B 31 juil. 2018 ./ drwxr-xr-x 4 root gnas 4B 22 janv. 2015 ../ drwxrwx— 5 user2 gnas 155B 31 juil. 2018 Downloads/ $ grep gnas /etc/group gnas:*:1002:user1,user2
When I run the exact same command line launched by the FreeNAS UI from a user1 shell, the rsync command succeeds:
$ /usr/bin/lockf -s -t 0 -k /mnt/tank/Documents/user2 /usr/local/bin/rsync -a -z —delay-updates —delete-delay -p -r -t —usermap=’*:18000′ —groupmap=’*:18000′ -e ‘ssh -p 22 -o BatchMode=yes -o StrictHostKeyChecking=yes’ /mnt/tank/Documents/user2 18000@dsthost.net:documents_user2 $
Have you an idea what’s going on?
Cheers.
Caleb Land
Cadet
I’m getting a similar error here. I don’t know if it’s been since I upgrade to 11.3, since I have been playing with permissions, but I can run the lockf command from the command line as the user I specified in the gui, and it works ok.
If I recursively set the ACLs of my dataset to OPEN then the gui rsync task works, but if I restrict «everyone» it doesn’t seem to work.
I’m getting the error:
I have to dig a little deeper, but there seems there is something going on with the rsync task
Источник
View previous topic :: View next topic | |||||||||||
Author | Message | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Joffer Guru Joined: 10 Sep 2002 |
|
||||||||||
Back to top |
|
||||||||||
devon l33t Joined: 23 Jun 2003 |
|
||||||||||
Back to top |
|
||||||||||
Joffer Guru Joined: 10 Sep 2002 |
|
||||||||||
Back to top |
|
||||||||||
devon l33t Joined: 23 Jun 2003 |
|
||||||||||
Back to top |
|
||||||||||
Joffer Guru Joined: 10 Sep 2002 |
|
||||||||||
Back to top |
|
||||||||||
devon l33t Joined: 23 Jun 2003 |
|
||||||||||
Back to top |
|
||||||||||
Joffer Guru Joined: 10 Sep 2002 |
|
||||||||||
Back to top |
|
||||||||||
Joffer Guru Joined: 10 Sep 2002 |
|
||||||||||
Back to top |
|
||||||||||
|
You cannot post new topics in this forum |