Should use EXT4 or XFS to be able to 'sync'/backup to S3?

Posted by Rafa on Server Fault See other posts from Server Fault or by Rafa
Published on 2010-10-18T13:56:15Z Indexed on 2010/12/30 19:56 UTC
Read the original article Hit count: 289

Filed under:
|
|
|
|

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:

  1. 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.
  2. 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):

  1. Can I safely use XFS for the whole system as the main and only format on the dedicated server?
  2. If not, is it safe to use EXT4? Or should I use something else?
  3. would then be possible to make snapshots of the system to upload to Amazon?
  4. Is it possible/feasible/practical to do what I want to do, anyway?
  5. 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:

  1. With XFS: 1) do xfs_freeze; 2) copy the frozen files via, eg, rsync; 3) unfreeze xfs
  2. 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.

© Server Fault or respective owner

Related posts about webserver

Related posts about ubuntu-server