messageopk.blogg.se

Use amazon s3 as personal backup
Use amazon s3 as personal backup







use amazon s3 as personal backup

The s3cmd command shown above uses the put option, which transfers all files regardless of whether or not there are newer or older versions already stored on the bucket.For information about how to set up a cron job in cPanel, please see this article. You can set up the cron job using the crontab command line program, or by using cPanel (if your account includes cPanel access).You should replace username with your own A2 Hosting account username, and bucket with the name of your own bucket:ģ0 2 * * * source /home/ username/amazon/bin/activate s3cmd put -preserve -recursive /home/ username/public_html s3:// bucket To do this, the cron command must activate the virtual environment and then run the s3cmd program.įor example, the following command demonstrates how to back up the entire public_html directory to an S3 bucket daily at 2:30 AM. For example: 17:48 s3:// bucketnameĪfter you verify that the Amazon S3 bucket was created successfully, you are ready to set up a cron job that backs up files to the bucket automatically. You should see a date/time stamp and the name of the bucket. To verify that the bucket was created successfully, type the following command: If this occurs, run the s3cmd mb command with a different bucket name until the command succeeds. If you try to create a bucket with a name that is already in use (either by you or by someone else), you receive the following error message:ĮRROR: Bucket ' bucketname' already exists









Use amazon s3 as personal backup