Amazon S3
I wrote this HOW to on DirectAdmin Forum
Guide is for CENTOS 6.x x32 or x64
yum install s3cmd -y - If you can't install s3cmd then please follow the instructions
cd /etc/yum.repos.d
touch s3cmd.repo
nano s3cmd.repo
COPY THE CODE BELOW -
# and run "yum install s3cmd"
#
name=Tools for managing Amazon S3 - Simple Storage Service (RHEL_6)
type=rpm-md
baseurl=http://s3tools.org/repo/RHEL_6/
gpgcheck=1
gpgkey=http://s3tools.org/repo/RHEL_6/repodata/repomd.xml.key
enabled=1
Code:
s3cmd --configure
Code:
nano /home/admin/user_backups/backup.sh
#!/bin/bash
S3_BUCKET=YOURBUCKETNAMEHERE
DATE=`date +%d%m%Y_%H%M`
BACKUP_LOC=/home/admin/user_backups/
LOG=/tmp/log_$DATE
mysql_backup(){
echo "Syncing files from $BACKUP_LOC to s3 bucket" >> $LOG
s3cmd sync -r $BACKUP_LOC s3://$S3_BUCKET/Directadmin/
}
mysql_backup
exit 0
SK
You might also like
View all
Cloud & Infrastructure
Automate Virtual Machine Creation in Proxmox with Cloud-Init: Complete Guide
SKSohaib Khan

Cloud & Infrastructure
How to Install Bitninja for Cloudpanel Control for Server Security
SKSohaib Khan
U
Cloud & Infrastructure
Unleashing the Power of Hetzner Cloud with Bash and API Magic
SKSohaib Khan
Comments (0)
No comments yet. Be the first to comment!