Should use EXT4 or XFS to be able to 'sync'/backup to S3?
- by Rafa
It's my first message here, so bear with me...
(I have already checked quite a few of the "Related Questions" suggested by the editor)
Here's the setup,
a brand new dedicated server (8GB RAM, some 140+ GB disk, Raid 1 via HW controller, 15000 RPM)
it's a production web server (with MySQL in it, too, not just serving web requests); not a personal desktop computer or similar.
Ubuntu Server 64bit 10.04 LTS
We have an Amazon EC2+EBS setup with the EBS volume formatted as XFS for easily taking snapshots to S3, via AWS' console.
We are now migrating to the dedicated server and I want to be able to backup our data to Amazon's S3. The main reason being the possibility of using the latest snapshot from an EC2 instance in case of hardware failure on the dedicated server.
There are two approaches I am thinking of:
do a "simple" file-based backup with rsync, dumping the database' and other files, and uploading to amazon via S3 API commands, or to an EC2 instance, or something.
do a file-system "freeze" (using XFS) with the usual ebs/ec2 snapshot tool to take part of the file system, take a snapshot, and upload it to Amazon.
Here's my question (or series of questions):
Can I safely use XFS for the whole system as the main and only format on the dedicated server?
If not, is it safe to use EXT4? Or should I use something else?
would then be possible to make snapshots of the system to upload to Amazon?
Is it possible/feasible/practical to do what I want to do, anyway?
any recommendations?
When searching around for S3/EBS/XFS, anything relevant to my problem is usually focused on taking snapshots of a XFS system that is already an EBS volume. My intention is to do it in a "real"/metal dedicated server.
Update: I just saw this on Wikipedia:
XFS does not provide direct support for snapshots, as it expects the snapshot process to be implemented by the volume manager.
I had always assumed that I could choose 2 ways of doing snapshots: via LVM or via XFS (without LVM). After reading this, I realize these 2 options are more like it:
With XFS: 1) do xfs_freeze; 2) copy the frozen files via, eg, rsync; 3) unfreeze xfs
With LVM and XFS: 1) do xfs_freeze; 2) make a binary copy of the frozen fs via lvcreate and related commands; 3) unfreeze xfs; 4) somehow backup the LVM snapshot.
Thanks a lot in advance,
Let me know if I need to clarify something.