Solved

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

Posted on 2010-11-26
4
530 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
Comment Utility
#! /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
Comment Utility
0
 

Author Comment

by:concern_support
Comment Utility
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
Comment Utility
it's up to you, which command you use.  just replace tar commands by suitable s3 commands.....
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

728 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now