Discover Centmin Mod today
Register Now

DigitalOcean DigitalOcean Introduces Block Storage Support

Discussion in 'Virtual Private Server (VPS) hosting' started by eva2000, Jul 14, 2016.

  1. Sunka

    Sunka Well-Known Member

    1,140
    312
    83
    Oct 31, 2015
    Pula, Croatia
    Ratings:
    +508
    Local Time:
    4:23 PM
    Nginx 1.17.9
    MariaDB 10.3.22
    L replace symlink with actual folder
    I will try now with K
     
  2. Sunka

    Sunka Well-Known Member

    1,140
    312
    83
    Oct 31, 2015
    Pula, Croatia
    Ratings:
    +508
    Local Time:
    4:23 PM
    Nginx 1.17.9
    MariaDB 10.3.22
    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
     
  3. eva2000

    eva2000 Administrator Staff Member

    44,731
    10,197
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,805
    Local Time:
    12:23 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    Probably best way just to safe guard against broken symlinks :)
     
  4. eva2000

    eva2000 Administrator Staff Member

    44,731
    10,197
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,805
    Local Time:
    12:23 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    @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: -
     
    Last edited: Aug 2, 2016
  5. Sunka

    Sunka Well-Known Member

    1,140
    312
    83
    Oct 31, 2015
    Pula, Croatia
    Ratings:
    +508
    Local Time:
    4:23 PM
    Nginx 1.17.9
    MariaDB 10.3.22
    I am not sure that I can follow you :sorry:
    I ended up without K and L
    Just added another directory to rsync
     
  6. eva2000

    eva2000 Administrator Staff Member

    44,731
    10,197
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,805
    Local Time:
    12:23 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    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
     
  7. Sunka

    Sunka Well-Known Member

    1,140
    312
    83
    Oct 31, 2015
    Pula, Croatia
    Ratings:
    +508
    Local Time:
    4:23 PM
    Nginx 1.17.9
    MariaDB 10.3.22
    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
     
  8. eva2000

    eva2000 Administrator Staff Member

    44,731
    10,197
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,805
    Local Time:
    12:23 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    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
     
  9. eva2000

    eva2000 Administrator Staff Member

    44,731
    10,197
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,805
    Local Time:
    12:23 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    for those interested

     
  10. eva2000

    eva2000 Administrator Staff Member

    44,731
    10,197
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,805
    Local Time:
    12:23 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    DO Block storage gets performance boost Block Storage Volume Gets a Performance Burst