<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.lustre.org/index.php?action=history&amp;feed=atom&amp;title=Lustre_Backup_Strategies</id>
	<title>Lustre Backup Strategies - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.lustre.org/index.php?action=history&amp;feed=atom&amp;title=Lustre_Backup_Strategies"/>
	<link rel="alternate" type="text/html" href="http://wiki.lustre.org/index.php?title=Lustre_Backup_Strategies&amp;action=history"/>
	<updated>2026-09-01T18:28:20Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.7</generator>
	<entry>
		<id>http://wiki.lustre.org/index.php?title=Lustre_Backup_Strategies&amp;diff=5580&amp;oldid=prev</id>
		<title>Elliswilson: Created page with &quot;Lustre supports three primary backup strategies. Each serves different needs, and most production sites use a combination.  {| class=&quot;wikitable&quot; |- ! Strategy !! Scope !! Speed !! Granularity !! Best For |- | File-level backup || Client-side || Slow for large FS || Individual files || Selective/incremental backups |- | Device-level backup || Per-target (MDT/OST) || Fast (streaming) || Entire device || Disaster recovery, hardware replacement |- | lustre_rsync || Changelog...&quot;</title>
		<link rel="alternate" type="text/html" href="http://wiki.lustre.org/index.php?title=Lustre_Backup_Strategies&amp;diff=5580&amp;oldid=prev"/>
		<updated>2026-07-20T15:27:34Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;Lustre supports three primary backup strategies. Each serves different needs, and most production sites use a combination.  {| class=&amp;quot;wikitable&amp;quot; |- ! Strategy !! Scope !! Speed !! Granularity !! Best For |- | File-level backup || Client-side || Slow for large FS || Individual files || Selective/incremental backups |- | Device-level backup || Per-target (MDT/OST) || Fast (streaming) || Entire device || Disaster recovery, hardware replacement |- | lustre_rsync || Changelog...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Lustre supports three primary backup strategies. Each serves different needs, and most production sites use a combination.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Strategy !! Scope !! Speed !! Granularity !! Best For&lt;br /&gt;
|-&lt;br /&gt;
| File-level backup || Client-side || Slow for large FS || Individual files || Selective/incremental backups&lt;br /&gt;
|-&lt;br /&gt;
| Device-level backup || Per-target (MDT/OST) || Fast (streaming) || Entire device || Disaster recovery, hardware replacement&lt;br /&gt;
|-&lt;br /&gt;
| lustre_rsync || Changelog-based || Incremental || File-level || Continuous replication to second filesystem&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== File-Level Backup (Client-Side) ==&lt;br /&gt;
&lt;br /&gt;
Performed from a mounted Lustre client using standard backup tools (&amp;lt;code&amp;gt;tar&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;rsync&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;cp&amp;lt;/code&amp;gt;, commercial backup software).&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Advantages:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* Integrates with existing backup infrastructure.&lt;br /&gt;
* Selective — back up specific directories, users, or projects.&lt;br /&gt;
* Can run from multiple clients in parallel (each handling different subdirectories).&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Procedure:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Example: tar backup of a subdirectory&lt;br /&gt;
tar czf /backup/project_a.tar.gz /mnt/testfs/project_a&lt;br /&gt;
&lt;br /&gt;
# Example: rsync to a backup server&lt;br /&gt;
rsync -av --xattrs /mnt/testfs/project_a/ backupserver:/backup/project_a/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Key considerations:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* Use &amp;lt;code&amp;gt;--xattrs&amp;lt;/code&amp;gt; with rsync/tar to preserve Lustre extended attributes (striping, project IDs).&lt;br /&gt;
* For very large filesystems, full backups may be impractical. Use incremental backups by date (&amp;lt;code&amp;gt;find -newer&amp;lt;/code&amp;gt;) or changelogs.&lt;br /&gt;
&lt;br /&gt;
== Device-Level Backup ==&lt;br /&gt;
&lt;br /&gt;
Uses &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;e2image&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;zfs send&amp;lt;/code&amp;gt; to create an image of an individual MDT or OST device.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Advantages:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* Streaming speed — much faster than file-level for full backups.&lt;br /&gt;
* Captures entire device state, including internal metadata.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Procedure:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ldiskfs: device image backup&lt;br /&gt;
umount /lustre/testfs/mdt0&lt;br /&gt;
dd if=/dev/sda1 of=/backup/mdt0.img bs=1M&lt;br /&gt;
&lt;br /&gt;
# ldiskfs: space-efficient backup (skips unused blocks)&lt;br /&gt;
e2image -ra /dev/sda1 /backup/mdt0.e2i&lt;br /&gt;
&lt;br /&gt;
# ZFS: send snapshot&lt;br /&gt;
zfs snapshot tank/mdt0@backup-20260429&lt;br /&gt;
zfs send tank/mdt0@backup-20260429 &amp;gt; /backup/mdt0.zfs&lt;br /&gt;
&lt;br /&gt;
# ZFS: incremental send&lt;br /&gt;
zfs send -i tank/mdt0@previous tank/mdt0@backup-20260429 &amp;gt; /backup/mdt0-incr.zfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Key considerations:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* The target should be unmounted or have a consistent snapshot (LVM snapshot or ZFS snapshot) before backup.&lt;br /&gt;
* Device-level backups cannot selectively restore individual files.&lt;br /&gt;
&lt;br /&gt;
== lustre_rsync (Changelog-Based Replication) ==&lt;br /&gt;
&lt;br /&gt;
Uses Lustre changelogs to replicate changes from a source Lustre filesystem to a target filesystem. Ideal for maintaining a warm standby or replicating to a remote site.&lt;br /&gt;
&lt;br /&gt;
See [[Lustre Rsync Replication]] for full setup instructions.&lt;br /&gt;
&lt;br /&gt;
== Decision Tree: Which Strategy to Use ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Need to restore individual files?&lt;br /&gt;
  YES → File-level backup&lt;br /&gt;
  NO  → Continue&lt;br /&gt;
&lt;br /&gt;
Need disaster recovery for a single target device?&lt;br /&gt;
  YES → Device-level backup&lt;br /&gt;
  NO  → Continue&lt;br /&gt;
&lt;br /&gt;
Need continuous replication to a standby filesystem?&lt;br /&gt;
  YES → lustre_rsync&lt;br /&gt;
  NO  → Continue&lt;br /&gt;
&lt;br /&gt;
Default recommendation:&lt;br /&gt;
  - MDT device-level backup (weekly) — CRITICAL&lt;br /&gt;
  - File-level incremental backup (daily) for important data&lt;br /&gt;
  - lustre_rsync for sites that need warm standby&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== MDT Backup Is Critical ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Always maintain regular MDT backups.&amp;#039;&amp;#039;&amp;#039; The MDT contains all filesystem metadata — file names, directory structure, file layouts, permissions, and striping information. Losing the MDT without a backup means losing the entire filesystem namespace, even if all OST data is intact.&lt;br /&gt;
&lt;br /&gt;
An MDT is typically a few TB at most, so device-level backups are fast and practical. Even a week-old MDT backup is vastly preferable to total filesystem loss.&lt;br /&gt;
&lt;br /&gt;
== Target-Level Filesystem Backup ==&lt;br /&gt;
&lt;br /&gt;
An alternative to raw device images: use &amp;lt;code&amp;gt;tar&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;rsync&amp;lt;/code&amp;gt; on the underlying MDT/OST filesystem (mounted as ldiskfs or accessed via ZFS). This preserves the data but allows changing formatting parameters (inode ratio, filesystem features) on restore.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Mount the backend filesystem&lt;br /&gt;
mount -t ldiskfs /dev/sda1 /mnt/mdt0_backend&lt;br /&gt;
&lt;br /&gt;
# Backup with xattrs preserved&lt;br /&gt;
tar cf /backup/mdt0_files.tar -C /mnt/mdt0_backend --xattrs --xattrs-include=&amp;#039;*&amp;#039; .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This takes longer than &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;e2image&amp;lt;/code&amp;gt; due to per-file overhead, but uses less space than a full device image.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[Lustre Rsync Replication]]&lt;br /&gt;
* [[Backing Up a Lustre File System]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Lustre Systems Administration]]&lt;br /&gt;
[[Category:Lustre Backup and Recovery]]&lt;/div&gt;</summary>
		<author><name>Elliswilson</name></author>
	</entry>
</feed>