rsync.sh 2.7 KB

123456789101112131415161718192021222324252627282930313233343536
  1. #!/bin/bash
  2. find . -type d -exec rsync -auz --no-perms --no-owner --no-group *.lsf {} \;
  3. find . -type d -exec rsync -auz --no-perms --no-owner --no-group *.bat {} \;
  4. find . -type d -exec rsync -auz --no-perms --no-owner --no-group *.py {} \;
  5. #remote="/run/user/1000/gvfs/smb-share\:server\=192.168.5.18\,share\=hpc_d/k.ladutenko/0-tig-smuthi"
  6. #remote="/run/user/1000/gvfs/smb-share\:server\=192.168.5.30\,share\=users/z.ladutenko/0-tig-smuthi"
  7. echo $remote/setup.py
  8. mounted=`ls /run/user/1000/gvfs/ | wc -l`
  9. # if [ $mounted = 0 ]; then
  10. # echo Mounting SMB share:
  11. gio mount smb://192.168.5.30/users
  12. # gio mount smb://192.168.5.18/hpc_d
  13. # echo Done!
  14. # fi
  15. if [ ! -f /run/user/1000/gvfs/smb-share\:server\=192.168.5.30\,share\=users/z.ladutenko/0-tig-smuthi/setup.py ]; then
  16. echo "Mounting SMB share failed! If no other errors, you can try to mount it again."
  17. # exit 1
  18. fi
  19. # if [ ! -f /run/user/1000/gvfs/smb-share\:server\=192.168.5.30\,share\=users/z.ladutenko/0-tig-smuthi/setup.py ]; then
  20. # echo "Mounting SMB share failed! If no other errors, you can try to mount it again."
  21. # # exit 1
  22. # fi
  23. # rsync -auz --progress --no-perms --no-owner --no-group --no-times --exclude .git --exclude docs --exclude build_docs --exclude *~ /home/tig/KOsty/Documents/Simulations/Belov/Bogdanov/T-matrix/smuthi/tig-smuthi/ $remote
  24. #rsync -auz --progress --no-perms --no-owner --no-group --exclude .git --exclude docs --exclude build_docs --exclude *~ --exclude '*.lock' --exclude *results* --exclude smuthi_nfmds_bin /home/tig/KOsty/Documents/Simulations/Belov/Bogdanov/dipole-on-surf/ /run/user/1000/gvfs/smb-share\:server\=192.168.5.30\,share\=users/z.ladutenko/dipole-on-surf
  25. echo Ok
  26. rsync -auz --progress --no-perms --no-owner --no-group --exclude .git --exclude docs --exclude build_docs --exclude *~ --exclude '*.lock' --exclude '*results*' /home/tig/KOsty/Documents/Simulations/Belov/Bogdanov/dipole-on-surf/ /run/user/1000/gvfs/smb-share\:server\=192.168.5.30\,share\=users/z.ladutenko/dipole-on-surf
  27. #gio mount smb://192.168.5.30/users
  28. #ls /run/user/1000/gvfs/smb-share\:server\=192.168.5.30\,share\=users/z.ladutenko/
  29. rsync -auz --progress --no-perms --no-owner --no-group --exclude .git --exclude docs --exclude build_docs --exclude *~ --exclude '*.lock' --exclude '*results*' /run/user/1000/gvfs/smb-share\:server\=192.168.5.30\,share\=users/z.ladutenko/dipole-on-surf/ /home/tig/KOsty/Documents/Simulations/Belov/Bogdanov/dipole-on-surf
  30. #rsync -auz --progress --no-perms --no-owner --no-group --exclude .git --exclude docs --exclude build_docs --exclude *~ --exclude *results* /run/user/1000/gvfs/smb-share\:server\=192.168.5.30\,share\=users/z.ladutenko/dipole-on-surf/ /home/tig/KOsty/Documents/Simulations/Belov/Bogdanov/dipole-on-surf