L replace symlink with actual folder I will try now with K
L is not for me couse it replace symlinks with actual folder K is just copy simlinks file itself I think that I should just add another row in conf file to rsync folders from new hard disk
@Sunka just for curiousity sake though -K was actually correct from quick rsync dummy testing /home/realdir/ is real directory /home/symsource is symlink /home/symtarget is destination directory i.e. remote Code (Text): ls -lah /home/realdir/ total 16K drwxr-xr-x 3 root root 4.0K Aug 2 02:15 . drwxr-xr-x. 9 root root 4.0K Aug 2 02:16 .. drwxr-xr-x 2 root root 4.0K Aug 2 02:21 dir1 -rw-r--r-- 1 root root 4 Aug 2 02:11 test.txt Code (Text): cd /home ln -s /home/realdir/ symsource Code (Text): ls -lah /home | egrep 'realdir|sym' drwxr-xr-x 3 root root 4.0K Aug 2 02:15 realdir lrwxrwxrwx 1 root root 14 Aug 2 02:16 symsource -> /home/realdir/ drwxr-xr-x 3 root root 4.0K Aug 2 02: Code (Text): ls -lah /home/symsource/ total 16K drwxr-xr-x 3 root root 4.0K Aug 2 02:15 . drwxr-xr-x. 9 root root 4.0K Aug 2 02:16 .. drwxr-xr-x 2 root root 4.0K Aug 2 02:11 dir1 -rw-r--r-- 1 root root 4 Aug 2 02:11 test.txt Code (Text): rsync -rpvzinK /home/symsource/ /home/symtarget/ sending incremental file list >f..T...... test.txt >f+++++++++ dir1/file1.txt sent 96 bytes received 19 bytes 230.00 bytes/sec total size is 4 speedup is 0.03 (DRY RUN) Code (Text): rsync -rpvziK /home/symsource/ /home/symtarget/ sending incremental file list >f..T...... test.txt >f+++++++++ dir1/file1.txt sent 170 bytes received 51 bytes 442.00 bytes/sec total size is 4 speedup is 0.02 Code (Text): ls -lah /home/symtarget/ total 16K drwxr-xr-x 3 root root 4.0K Aug 2 02:22 . drwxr-xr-x. 9 root root 4.0K Aug 2 02:16 .. drwxr-xr-x 2 root root 4.0K Aug 2 02:22 dir1 -rw-r--r-- 1 root root 4 Aug 2 02:22 test.txt Code (Text): ls -lahR /home/symtarget/ /home/symtarget/: total 16K drwxr-xr-x 3 root root 4.0K Aug 2 02:22 . drwxr-xr-x. 9 root root 4.0K Aug 2 02:16 .. drwxr-xr-x 2 root root 4.0K Aug 2 02:22 dir1 -rw-r--r-- 1 root root 4 Aug 2 02:22 test.txt /home/symtarget/dir1: total 8.0K drwxr-xr-x 2 root root 4.0K Aug 2 02:22 . drwxr-xr-x 3 root root 4.0K Aug 2 02:22 .. -rw-r--r-- 1 root root 0 Aug 2 02:22 file1.txt Code (Text): stat /home/symtarget/test.txt File: ‘/home/symtarget/test.txt’ Size: 4 Blocks: 8 IO Block: 4096 regular file Device: fd01h/64769d Inode: 656228 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2016-08-02 02:22:14.938387658 +0000 Modify: 2016-08-02 02:22:14.939387657 +0000 Change: 2016-08-02 02:22:14.939387657 +0000 Birth: - stat /home/symtarget/dir1/file1.txt File: ‘/home/symtarget/dir1/file1.txt’ Size: 0 Blocks: 0 IO Block: 4096 regular empty file Device: fd01h/64769d Inode: 1038092 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2016-08-02 02:22:14.939387657 +0000 Modify: 2016-08-02 02:22:14.939387657 +0000 Change: 2016-08-02 02:22:14.939387657 +0000 Birth: -
the above outlined example is if you wanted to rsync symlinked source dir/files but yes you can just rsync the real directory if you want
I want, but I want that symlinked folders sync in absolute path. I am fighting with english language now If I have -folder1 --symlink folder2 -folder2 With K I will get -folder1 --folder2 With L I will get -folder1 --symlink folder2
in above example /home/symsource/dir1 is a symlinked directory, it transferred fine to /home/symtarget/dir1 if i understand you want both symlink --symlink folder2 and the actual real directory perserved ? you don't need that just folder2 is all you need