Guest User

Untitled

a guest
Jan 29th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. #Tools used:
  2. s3fs
  3. cron
  4. fstab
  5.  
  6. --
  7. Mounting the file system:
  8. sudo nano /etc/fstab
  9. //localnetwork.lan/Shares/X/ /mnt/downloads cifs domain=localnetwork,username=svc_accountsync1,password=abc123,iocharset=utf8,sec=ntlm 0 0
  10. //localnetwork.lan/Shares/Data/awmReUpload/ /mnt/awmReUpload cifs domain=localnetwork,username=svc_accountsync1,password=abc123,iocharset=utf8,sec=ntlm 0 0
  11.  
  12. the above mounts two network shares.
  13. path/of/share path/of/mount/destination other,params
  14. Change:
  15. Domain, username, password = account with permision to access the local shared drive
  16.  
  17. --
  18. creating the move to S3
  19. sudo nano /etc/cron.d/awsMoveUpload
  20. */1 * * * * master /usr/bin/aws s3 mv path/of/mount/destination/ s3://bucketName/ --recursive >> /tmp/awsMoveUpload.log
  21.  
  22. Displaying all moved files.
  23. cat /tmp/awmprodreupload.log
  24. WARNING: implement logrotate to the file or it shall grow and eat up disk space, potentally crashing.
Add Comment
Please, Sign In to add comment