Solved

How do I create backups and restore a linux server on AWS EC2?

Posted on 2010-11-26
4
546 Views
Last Modified: 2014-11-12
I have one LAMP Linux box in Europe on EC2. I would like to be able to take Weekly and Nightly diff backups that overwrite themselves and be able to restore it if any disaster occurs. 2 backups files (weekly and a daily image)
0
Comment
Question by:concern_support
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 6

Accepted Solution

by:
brb6708 earned 250 total points
ID: 34217218
#! /bin/bash
WEEKDAY=`i/usr/bin/date +%w`
BACKUPDIR=«backupdirname»

cd «basedirectory»
tar -czf $BACKUPDIR/backup.$WEEKDAY.tar.gz «filename list»

# This script produces a different backup archive for each weekday
# If you want to overwrite the single days but keep only one "Week"-File and
# one "Day"-File th is overwritten daily, it's like

cd «basedirectory»
if [  $WEEKDAY == 1 ]; then
   tar -czf $BACKUPDIR/backup.weekly.tar.gz «filename list»
else
   tar -czf $BACKUPDIR/backup.daily.tar.gz «filename list»
fi
0
 
LVL 6

Assisted Solution

by:fluk3d
fluk3d earned 250 total points
ID: 34217223
0
 

Author Comment

by:concern_support
ID: 34218209
Thanks brb6708, nice script but this isn't a full image backup. I may use it though in conjunction with the S3 solution.

Thanks fluk3d, I've seen these solutions but find them tricky and a little cumbersome.

AWS would do well to create a backup service...
0
 
LVL 6

Expert Comment

by:brb6708
ID: 34218224
it's up to you, which command you use.  just replace tar commands by suitable s3 commands.....
0

Featured Post

Containers and Docker for Everyone

Containers are an incredibly powerful technology that can provide you and/or your engineering team with huge productivity gains. Using containers, you can deploy, back up, replicate, and move apps and their dependencies quickly and easily.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When speed and performance are vital to revenue, companies must have complete confidence in their cloud environment.
In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller singl…
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question