-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathebssnapshot.txt
More file actions
77 lines (55 loc) · 1.28 KB
/
ebssnapshot.txt
File metadata and controls
77 lines (55 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
✅ Experiment 4 – EBS Snapshot and Mounting Steps
Switch to root user:
sudo su
Check disk list:
lsblk
Partition the new disk:
fdisk /dev/xvdb
(Inside fdisk, type these keys one by one and press Enter after each)
n
p
1
(Enter)
(Enter)
w
Inform kernel:
partprobe
Format the partition:
mkfs.xfs /dev/xvdb1
Create mount folder:
mkdir /mnt/ece589
Mount the volume:
mount /dev/xvdb1 /mnt/ece589
Go into mount folder:
cd /mnt/ece589
Install git:
yum update -y
yum install git -y
Check git version:
git --version
Clone the Maven Java project:
git clone https://github.com/Arjun7304/MavenJavaProject.git
Go inside project folder:
cd MavenJava
ls
Edit fstab to make mount permanent:
vi /etc/fstab
(Inside file, press i and paste this line)
/dev/xvdb1 /mnt/ece589 xfs defaults 0 0
(Then press Esc → :wq → Enter to save)
Create snapshot from AWS Console
(Go to EC2 → Volumes → Create Snapshot)
Copy snapshot to Oregon region
(Go to Snapshots → Copy Snapshot → Select us-west-2)
Switch to Oregon region
(Verify snapshot copied)
Create volume from snapshot in Oregon
(Use same Availability Zone as new EC2 instance)
Launch new EC2 instance in Oregon
Attach volume as /dev/xvdb
Login to new EC2 instance and run:
sudo su
mkdir /mnt/ece589
mount /dev/xvdb1 /mnt/ece589
cd /mnt/ece589
ls