Copy a file from the files directory to all three buckets
# It is easier to work with two terminal tabs open so you can have all the information in one place. Open two tabs and log in to your chosen server in both tabs. # In one tab, do the following (this is our standard directory for storing these config files): cd /home/username/landmark-deployments # Run the following command to find out the current status of the installation you wish to upload to # Replace config_filename_no_extension with the config filename without the extension. # For example, 'corp.xml' would become 'corp': python syncscript.py config_filename_no_extension status # This should give an output like the following: # Live = "landmarkCorp1" # Site is currently Running # Staging = "landmarkCorp2" # Site is currently Running # Being aware of this information, you will need to run the following steps. # 1. cd into your websites' sites directory. cd /var/www/html/krisyoung/landmark-corp/sites # 2. Set ownership on default to yourself. # This isn't a problem as the folder is no longer in use while everything goes through the Buckets. # 3. cd into the sites/default/files directory, go to that same directory in your FTP client # 4. Drag the file you want to copy, into that folder. # 5. Run the following commands, one after the other. export AWS_ACCESS_KEY_ID=AKIAJGQ57M6F7ZVRLXMA export AWS_SECRET_ACCESS_KEY=Wv5ShAOg6m6e5fp0c+v0k+vPe0iaAL6eVae2Gn6o # 6. Run the following commands, being aware of the three Bucket names. aws s3 cp ./file.png s3://[dev bucket]/s3fs-public/file.png aws s3 cp ./file.png s3://[staging bucket]/s3fs-public/file.png aws s3 cp ./file.png s3://[production bucket]/s3fs-public/file.png # 7. Browse to the file in each Bucket (via your web browser) and be sure that in each case, it's copied across correctly.