Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Tools used:
- s3fs
- cron
- fstab
- --
- Mounting the file system:
- sudo nano /etc/fstab
- //localnetwork.lan/Shares/X/ /mnt/downloads cifs domain=localnetwork,username=svc_accountsync1,password=abc123,iocharset=utf8,sec=ntlm 0 0
- //localnetwork.lan/Shares/Data/awmReUpload/ /mnt/awmReUpload cifs domain=localnetwork,username=svc_accountsync1,password=abc123,iocharset=utf8,sec=ntlm 0 0
- the above mounts two network shares.
- path/of/share path/of/mount/destination other,params
- Change:
- Domain, username, password = account with permision to access the local shared drive
- --
- creating the move to S3
- sudo nano /etc/cron.d/awsMoveUpload
- */1 * * * * master /usr/bin/aws s3 mv path/of/mount/destination/ s3://bucketName/ --recursive >> /tmp/awsMoveUpload.log
- Displaying all moved files.
- cat /tmp/awmprodreupload.log
- 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