Solved

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

Posted on 2010-11-26
4
537 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
  • 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

A customer recently asked me about anti-malware and the different deployment options available for his business. Daily news about cyberattacks, zero-day vulnerabilities, and companies that suffered a security breach made him wonder if the endpoint a…
The next five years are sure to bring developments that are just astonishing, and we will continue to try to find the balance between connectivity and security. Here are five major technological developments from the last five years and some predict…
Both in life and business – not all partnerships are created equal. Spend 30 short minutes with us to learn:   • Key questions to ask when considering a partnership to accelerate your business into the cloud • Pitfalls and mistakes other partners…
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…

840 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