here a problem with rsync : I try to sync folder A from server A to folder B to server B (from server B) To do that, create special user/ key file / ssh etc.... So my problem is that some files are synchronised and some not (same ownership, folder,...)
I tried multiple option :
rsync -az --stats -e "ssh -p 1980 -i /root/key/keyPraUser" [email protected]:/home/mnt/uploads/ /mnt/uploads/
sudo rsync -az --stats -e "ssh -p 1980 -i /root/key/keyPraUser" [email protected]:/home/mnt/uploads/ /mnt/uploadsBNP/
rsync -rltgoDv --stats -e "ssh -p 1980 -i /root/key/keyPraUser" [email protected]:/home/mnt/uploads/ /mnt/uploadsBNP/
rsync -rtv --force --stats -e "ssh -p 1980 -i /root/key/keyPraUser" [email protected]:/home/mnt/uploads/ /mnt/uploadsBNP/
From server A, to files : file AF1 :
stat 50a3c8cb9aeb88f4846f3c5dd6c4d162f43199ae1728664723.7z
File: 50a3c8cb9aeb88f4846f3c5dd6c4d162f43199ae1728664723.7z
Size: 2438228 Blocks: 4768 IO Block: 4096 regular file
Device: 803h/2051d Inode: 49551490 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 33/www-data) Gid: ( 33/www-data)
Access: 2024-10-16 10:03:29.647959893 +0200
Modify: 2024-10-11 18:38:50.042744204 +0200
Change: 2024-10-11 18:38:50.042744204 +0200
Birth: -
File AF2 :
stat fcf7f81c1971c46c74fb3548480d0deafe2acfc01700573438.7z
File: fcf7f81c1971c46c74fb3548480d0deafe2acfc01700573438.7z
Size: 28602 Blocks: 56 IO Block: 4096 regular file
Device: 803h/2051d Inode: 49056334 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 33/www-data) Gid: ( 33/www-data)
Access: 2024-10-16 10:50:18.573666612 +0200
Modify: 2024-10-16 10:50:04.325538885 +0200
Change: 2024-10-16 10:50:04.325538885 +0200
Birth: -
When i run the rsync cmd, got this message :
rsync: send_files failed to open "/home/mnt/uploads/ac/190/fcf7f81c1971c46c74fb3548480d0deafe2acfc01700573438.7z": Operation not permitted (1)
On server B when I check if both files were copied, here the result :
(AF1)
stat 50a3c8cb9aeb88f4846f3c5dd6c4d162f43199ae1728664723.7z
File: 50a3c8cb9aeb88f4846f3c5dd6c4d162f43199ae1728664723.7z
Size: 2438228 Blocks: 4768 IO Block: 4096 regular file
Device: 903h/2307d Inode: 109445672 Links: 1
Access: (0664/-rw-rw-r--) Uid: ( 33/www-data) Gid: ( 1002/dev_user)
Access: 2024-10-16 11:18:57.901283844 +0200
Modify: 2024-10-11 18:38:50.042744204 +0200
Change: 2024-10-16 11:30:08.254275812 +0200
Birth: -
(AF2)
stat fcf7f81c1971c46c74fb3548480d0deafe2acfc01700573438.7z
stat: cannot stat 'fcf7f81c1971c46c74fb3548480d0deafe2acfc01700573438.7z': No such file or directory
More details about server : server A : Ubuntu 18.04.5 LTS (GNU/Linux 4.15.0-176-generic x86_64) server B : Ubuntu 18.04.5 LTS (GNU/Linux 4.15.0-156-generic x86_64)
If anyone have a clue about this behavior, thanks in advance
Edit :
namei -lx /home/mnt/uploads/ac/190/fcf7f81c1971c46c74fb3548480d0deafe2acfc01700573438.7z
Drwxr-xr-x root root /
Drwxr-xr-x root root home
drwxr-xr-x root root mnt
drwxr-xr-x www-data www-data uploads
drwxr-xr-x www-data www-data ac
drwxr-xr-x www-data www-data 190
-rw-r--r-- www-data www-data fcf7f81c1971c46c74fb3548480d0deafe2acfc01700573438.7z
rsynccommand is being run?rsynccommands ([email protected]and the implied localhost)