Solved

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

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

Threat Trends for MSPs to Watch

See the findings.
Despite its humble beginnings, phishing has come a long way since those first crudely constructed emails. Today, phishing sites can appear and disappear in the length of a coffee break, and it takes more than a little know-how to keep your clients secure.

Question has a verified solution.

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

There is no doubt that cloud is gaining importance. Many of you must have read about this technology and its growing importance. More and more organisations are embracing this technology not forgetting start-ups. The process begins by dipping …
Learn how the use of a bunch of disparate tools requiring a lot of manual attention led to a series of unfortunate backup events for one company.
This tutorial will walk an individual through the process of installing the necessary services and then configuring a Windows Server 2012 system as an iSCSI target. To install the necessary roles, go to Server Manager, and select Add Roles and Featu…
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…

732 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