3

I have set up 2 ubuntu instances in aws. How do I sync /usr/ubuntu in both the machines?

Sampad Mund
  • 125
  • 2
  • 8

3 Answers3

2

You can use rsync command to sync two directories, e.g:

rsync -avzhe "ssh -i yourkey.pem" /usr/ubuntu ubuntu@ec2ip:/usr/ubuntu
Ted Cahall
  • 103
  • 4
Rakesh C
  • 31
  • 4
0

This question has at least two answers.

If you need periodically sync your folders, you can use rsync.

If you need persistent sync and /usr/ubuntu is distinguished disk partition, then you can use DRBD. It's like Net-RAID. Describe and documentation about DRBD - DRBD official site.

Yurij Goncharuk
  • 4,177
  • 2
  • 19
  • 36
0

Set up one of the instances as an NFS server that exports the directory for the other instance to mount.

Kusalananda
  • 320,670
  • 36
  • 633
  • 936