Rsync error some files attrs were not transferred see previous errors code 23

I'm trying to make a backup of my /home to transfer all data from one computer to another. I wanted to save the backup on the same computer and than transfere it to another one. For safety reasons,...

I’m trying to make a backup of my /home to transfer all data from one computer to another. I wanted to save the backup on the same computer and than transfere it to another one. For safety reasons, I’m trying to learn how does it work on the computer without a lot of data (the new one) to be sure I won’t delete something instead of copying it.

I’ve run in terminal:

sudo rsync -avz /home/maria /home/guest/backup

and I had as the result:

sent 58797801 bytes  received 23050 bytes  4705668.08 bytes/sec
total size is 100202958  speedup is 1.70
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1060) [sender=3.0.7]

I’ve tried once again, with the same result. I have no idea, which files were not transferred, what makes the whole backup useless for me (I wanted to do it automatically in order not to forget about something and loose it).

On both computers I have the same system (Ubuntu 10.04). Rsync version: 3.0.7-1ubuntu1.

Thanks for any tips

jrg's user avatar

jrg

59.5k53 gold badges171 silver badges246 bronze badges

asked Mar 16, 2011 at 19:35

maria's user avatar

Well, because you are running rsync in the verbose mode, you should be able to see in its output where the problem lies. Usually it is a permission denied error.

For example, suppose I want to back up the ~/.gvfs folder:

$ sudo rsync -av /home/arrange/.gvfs /tmp
[sudo] password for arrange: 
sending incremental file list
rsync: link_stat "/home/arrange/.gvfs" failed: Permission denied (13)

sent 12 bytes  received 12 bytes  48.00 bytes/sec
total size is 0  speedup is 0.00
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1060) [sender=3.0.7]

So my advice is to list through the rsync -av output and look for similar errors.

answered Mar 16, 2011 at 19:50

arrange's user avatar

arrangearrange

14.5k4 gold badges42 silver badges32 bronze badges

4

I got this error as well. In my case, rsync threw this error because I passed it a non-existent source directory.

answered Apr 9, 2013 at 17:34

Joel's user avatar

If you transfer files to remote storage (like freeNAS, etc) — don’t forget to set correct rules.
Not only set owner, but include this ownerto read-write list also.

freeNAS example

I’m hooked on this.

answered Feb 27, 2014 at 20:50

skywinder's user avatar

1

In case you running in verbose mode and you want to see where is the «failed: Permission denied» message in all this output, run for a second time the command with grep:

rsync -avzP --exclude 'folderXX' /folder/ /backup-folder/ | grep failed

Now you can see only the files or folders that you cant backup

answered Dec 15, 2020 at 7:35

Dimitrios's user avatar

DimitriosDimitrios

3803 silver badges4 bronze badges

Rsync error: some files could not be transferred (code 23).

Got this error message and looking for a fix?

Basically, the rsync error code 23 denotes ‘partial transfer due to error‘. This happens due to file permission problems.

At Bobcares, we often get requests to fix rsync errors, as a part of our Server Management Services.

Today, let’s see how our Support Engineers fix the rsync error 23 for our customers.

What does rsync error code 23 mean?

Rsync stands for remote sync. Actually, Rsync is a fast, flexible and secure file synchronization tool.

But in many situations, the file transfer via Rsync ends up in errors.

Usually, the error code 23 denotes a partial transfer. This code does not provide the reason for the incomplete transfer.

So, the error code 23 is basically a status code denoting an incomplete file transfer. The reason for this can be permission denial, input/output errors, typos in rsync command and so on.

A typical error shows up as:

How we fix rsync error code 23?

The Dedicated Engineers at Bobcares debug and fix rsync errors for our customers. Now let’s see a few situations were our customers got the rsync error code 23.

1. Error code 23 due to permission denial

In the first instance, a customer executed a rsync command to transfer files within his system.

Here the command was:

rsync -avz /home/user_name /home/guest/backup

But, this command ended up in error code 23. Our Support Engineers re-executed the rsync command with -av options. Then we got an error message:

rsync: link_stat "xxxx/xxxxx/xxx" failed: Permission denied (13).

So, the partial file transfer was because of the permission denied error. Hence we fixed the permissions of the files and folders to resolve the error.

2. To find the files that are not transferred

Again, one of the major challenges in failed Rsync transfer is to find the files that didn’t transfer.

To overcome this problem, users always monitor the rsync operations by executing the command:

rsync -av --progress

Usually, this command gives an entire terminal output along with the errors. The rsync operation ends up in error code 23. But, from a large number of output lines, it may be difficult to find the reason for error code 23.

In this situation, our Support Engineers execute the rsync command again with option-n.

Basically, the option-n denotes dry run, that is, it performs a trial run with no changes made. Thus we could actually see the files that are not transferred. And we could fix errors with these files.

A snippet from one of our servers :

root@awsxxx:~# rsync -azhv -e "ssh -p 2212" --dry-run /home/bobcares/test_200719 --delete-after --dry-run root@5x.136.xxx.121:/home/bobcares/test_200719
building file list ... done
created directory /home/bobcares/test_200719
test_200719/
test_200719/test

sent 79 bytes  received 70 bytes  298.00 bytes/sec
total size is 0  speedup is 0.00 (DRY RUN)

Similarly, we could also use the option-q to suppress non-error messages.

Finally, we also make sure that typos in the rsync command do not cause the error.

[Still having trouble in fixing rsync errors? – We’ll fix it for you.]

Conclusion

In short, the rsync error code 23 denotes partial transfer due to error. The error can be anything from typos in the rsync command to permission denial of files. Today, we saw how our Support Engineers sort out the error code 23.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = «owonCMyG5nEQ0aD71QM»;

  • Печать

Страницы: [1] 2  Все   Вниз

Тема: Ошибка rsync  (Прочитано 21244 раз)

0 Пользователей и 1 Гость просматривают эту тему.

Оффлайн
Ilyinux

После синхронизации с внешним диском всегда вижу такое:

rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1207) [sender=3.1.3]
Как можно понять, что не передано и как решить проблему?

Я просто хочу иметь работающий компьютер, а не решать кучу проблем, но я категорически не хочу обратно на Windows.


Оффлайн
Usermaster

Вы же не написали какие опции задаёте утилите rsync?
Предлагаете телепатией позаниматься?

Видимо утилите было задано копировать файлы с сохранением атрубутов (например rwx).
А копируете на раздел с файловой системой не поддерживающей данные атрибуты.
Вот и получаете ошибку копирования атрибутов.


Оффлайн
Ilyinux

Usermaster, обычно запускаю такую команду:

rsync -azvh --exclude '.*' --delete /home/ilya/ '/media/ilya/24066B2F066B00E2/Мои файлы/' Исключаю скрытые файлы в хомяке и удаляю несуществующее с целевого диска. Копирую на NTFS

Я просто хочу иметь работающий компьютер, а не решать кучу проблем, но я категорически не хочу обратно на Windows.


Оффлайн
Usermaster

Возможно есть файлы в домашнем каталоге принадлежащие root.


Оффлайн
Ilyinux

файлы в домашнем каталоге принадлежащие root

Как найти такие файлы?

Я просто хочу иметь работающий компьютер, а не решать кучу проблем, но я категорически не хочу обратно на Windows.


Онлайн
ALiEN175

Копирую на NTFS

rsync -hruv --inplace --exclude '.*' --delete /home/ilya/ '/media/ilya/24066B2F066B00E2/Мои файлы/'

ASUS P5K-C :: Intel Xeon E5450 @ 3.00GHz :: 8 GB DDR2 :: Radeon R7 260X :: XFCE
ACER 5750G :: Intel Core i5-2450M @ 2.50GHz :: 6 GB DDR3 :: GeForce GT 630M :: XFCE


Оффлайн
Usermaster

find /home/ilya/ -user root

Незнаю как исключить скрытые из поиска, но вывод будет наверное небольшой.


Оффлайн
Ilyinux

Usermaster, в выводе вообще ничегошеньки


Пользователь добавил сообщение 11 Апреля 2022, 13:10:04:


ALiEN175, При вашем варианте стало понятно, с какими файлами проблема. В выводе вижу кучу строк типа:

rsync: recv_generator: mkdir "/media/ilya/24066B2F066B00E2/Мои файлы/Документы/Сохраненные страницы/Руководство пользователя Tor Browser/01 ЗАПУСК БРАУЗЕРА TOR В ПЕРВЫЙ РАЗ | Как стать переводчиком для Tor Project_files" failed: Invalid argument (22)
*** Skipping any contents from this failed directory ***

rsync: open "/media/ilya/24066B2F066B00E2/Мои файлы/Документы/Сохраненные страницы/Руководство пользователя Tor Browser/01 ЗАПУСК БРАУЗЕРА TOR В ПЕРВЫЙ РАЗ | Как стать переводчиком для Tor Project.html" failed: Invalid argument (22)
С этим можно что-то сделать помимо ручного исправления?

Я просто хочу иметь работающий компьютер, а не решать кучу проблем, но я категорически не хочу обратно на Windows.


Оффлайн
Usermaster

А только один из вариантов предположил.
А ведь могут быть ещё и проблемы со слишком длинными именами.
И так далее.


Оффлайн
БТР

failed: Invalid argument (22)
С этим можно что-то сделать помимо ручного исправления?

Используйте опции «—no-owner —no-group»


Онлайн
ALiEN175

С этим можно что-то сделать помимо ручного исправления?

У NTFS это запрещенный символ — |

ASUS P5K-C :: Intel Xeon E5450 @ 3.00GHz :: 8 GB DDR2 :: Radeon R7 260X :: XFCE
ACER 5750G :: Intel Core i5-2450M @ 2.50GHz :: 6 GB DDR3 :: GeForce GT 630M :: XFCE


Оффлайн
Ilyinux

У NTFS это запрещенный символ — |

Да! В общем, спасибо, стало ясно.

Есть еще вопрос. Не получается дважды использовать опцию —exclude. Пишу, например, так:

rsync -azvh --exclude '.*' --exclude '/home/ilya/Видео' --delete .............но работает только первый вариант.

К тому же, там еще обнаружились файлы, с которыми проблема:

skipping non-regular file "snap/foliate/current"
skipping non-regular file "snap/icq-im/current"
и другие.
Их есть смысл пропустить. В общем, как исключить и другие файлы? Вопрос по синтаксису в командной строке.

« Последнее редактирование: 11 Апреля 2022, 14:48:18 от Ilyinux »

Я просто хочу иметь работающий компьютер, а не решать кучу проблем, но я категорически не хочу обратно на Windows.


Оффлайн
AlexDem

rsync -azvh —exclude ‘.*’ —exclude ‘/home/ilya/Видео’ —delete ………….
но работает только первый вариант.

Насколько я помню, для rsync надо указать не абсолютный, а относительный путь, относительно синхронизируемой папки, поэтому если ты запускаешь команду для каталога /home/ilya/ то в exclude надо указывать просто ‘Видео’.


Оффлайн
Ilyinux

надо указать не абсолютный, а относительный путь, относительно синхронизируемой папки

Да! Вопрос решен, всех благодарю!

Я просто хочу иметь работающий компьютер, а не решать кучу проблем, но я категорически не хочу обратно на Windows.


Оффлайн
Ilyinux

Только сейчас заметил, что не копируются метаданные, т. е. вижу: дата создания, дата изменения, дата доступа — только что. Можете подсказать, что добавить в команду?
Запускаю обычно

rsync -hruv --inplace --exclude '.*' /dir1/ /dir2/Мне просто для бекапа файлов, сохранения даты фотографий и т. п.

Я просто хочу иметь работающий компьютер, а не решать кучу проблем, но я категорически не хочу обратно на Windows.


  • Печать

Страницы: [1] 2  Все   Вверх

Понравилась статья? Поделить с друзьями:
  • Rsync error remote command not found
  • Rs9 machinist x99 коды ошибок
  • Rsync error protocol incompatibility code 2
  • Rs 232 framing error
  • Rsync error in socket io code 10