Last active
August 29, 2015 14:17
-
-
Save ngelik/c9fc80a6763b25b0c4ea to your computer and use it in GitHub Desktop.
Revisions
-
ngelik revised this gist
Mar 15, 2015 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,16 +1,16 @@ #!/bin/sh mount_dir=/mnt/artifactory/ remote_dir=/ local_dir=/opt/artifactory_mirror/ art_server=user@ip port=22 passw=your_pws chown_permissions=your_user:your_group echo ${passw} | sshfs ${art_server}:${remote_dir} ${mount_dir} -p ${port} -o password_stdin -o allow_other ls -l ${mount_dir} rsync -ravP ${mount_dir} ${local_dir} chown -R ${chown_permissions} ${local_dir} echo 'SYNC completed' -
ngelik created this gist
Mar 15, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ #!/bin/sh mount_dir=/mnt/artifactory remote_dir=/ local_dir=/opt/artifactory_mirror art_server=user@ip port=22 passw=your_pws chown_permissions=your_user:your_group echo ${passw} | sshfs ${art_server}:${remote_dir} ${mount_dir} -p ${port} -o password_stdin -o allow_other ls -l ${mount_dir} rsync -ravP ${mount_dir} ${local_dir} --delete-after chown -R ${chown_permissions} ${local_dir} echo 'SYNC completed' fusermount -u ${mount_dir}