How to Use Clonezilla: Comprehensive Disk Imaging and Backup Guide

Clonezilla Comprehensive Guide: Disk Imaging and Backup Solutions

**Created for**: Backup and deployment tasks for the DGX Spark machine **Date**: March 5, 2026

---

What is Clonezilla?

It is a free, open‑source disk imaging and cloning software.

Clonezilla is a free, open-source disk cloning and imaging tool based on Partimage and DRBL (Diskless Remote Boot in LAN). It's designed for system administrators and IT professionals who need to deploy operating systems across multiple machines efficiently.

Key Features:

---

Use Cases

They illustrate how the system can be applied in real‑world scenarios.

1. **Server Backup and Recovery**

2. **Device Migration**

3. **Mass Deployment**

---

Installation and Boot Process

This section covers downloading the ISO, creating boot

Creating Live Media

This section explains how to generate bootable live media for testing and deployment.

Option 1: USB Drive (Recommended)

**On Linux**: ```bash # Download Clonezilla ISO from clonezilla.org wget https://sourceforge.net/projects/clonezilla/files/latest/download -O clonezilla.iso

Create bootable USB (replaces all data on USB!)

sudo dd if=clonezilla.iso of=/dev/sdX bs=4M status=progress && sync ```

**On Windows**: 1. Download Clonezilla ISO 2. Use Rufus (https://rufus.ie) or Win32 Disk Imager 3. Select the ISO file and target USB drive 4. Click "START" to create bootable media

Option 2: Network PXE Boot (For Multiple Machines)

  1. Set up Clonezilla-server on a Debian/Ubuntu machine
  2. Configure DHCP server with TFTP options
  3. Boot target machines via network boot (PXE)

**Example PXE Configuration** (`/etc/dhcp/dhcpd.conf`): ```bash subnet 192.168.1.0 netmask 255.255.255.0 { range 192.168.1.100 192.168.1.200; option routers 192.168.1.1; next-server 192.168.1.10; filename "boot/grpc/boot.sys"; } ```

---

Basic Workflow Modes

It outlines the primary steps for executing tasks efficiently.

Mode 1: Device-to-Device Clone (Direct Copy)

Use cases: Cloning disk A directly to disk B without creating intermediate image.

**Best for**: One-to-one hardware migration, quick disk replacement.

**Interactive Steps**: 1. Boot Clonezilla live media 2. Select language (e.g., "1" for English) 3. Choose display mode (e.g., "1" for text mode) 4. Select "device-device" mode 5. Choose "Beginner mode" for guided interface 6. Select operation: "-k1 -i -r -p" (Skip partition check for non-primary drive) 7. Select source disk (source device) 8. Select target disk (target device) 9. Confirm all operations before executing 10. Clone starts - wait for completion

Mode 2: Device-to-Image Backup (Recommended for Backup)

Use cases: Creating backup images to save for later restoration.

**Best for**: Disaster recovery, backup rotation, archiving system state.

**Interactive Steps**: 1. Boot Clonezilla live media 2. Select language (e.g., "1" for English) 3. Choose Display Mode 1 (text mode) 4. Select "devicedisk" 5. Choose backup mode: "-k1 -i -r -p" (Beginner mode) 6. Select operation: "-r -p" (Save disk/image to local disk) 7. Choose backup location (external USB drive or network mount) 8. Select source disk to back up 9. Name your image (e.g., "dgx-spark-backup-2026-03-05") 10. Choose compression level (0=no compression, 1=fast, 2=balanced, 3=slowest) 11. Start backup - monitor progress

Mode 3: Image-to-Device Restore

This mode restores a disk image directly to a

Use cases: Restoring backup image to disk.

**Interactive Steps**: 1. Boot Clonezilla live media 2. Select language and display mode 3. Choose "device-image" 4. Select "-r -p" (Recover local disk/image from local disk) 5. Select image directory location 6. Choose image file to restore 7. Select target disk 8. Confirm all warnings and continue 9. Restore completes - system ready for reboot

---

Common Options and Explanations

These options allow you to customize the behavior of the tool to fit your specific workflow.

Expert Mode Options (Advanced Users)

| Option | Description | |--------|-------------| | `-s` | Clonezilla saves settings (skip repeated prompts) | | `-n` | Enable NFS server for network backup | | `-j` | RAID/DM device handling options | | `-z` | CPU scaling governor settings | | `-l` | Log level for debugging |

Compression Levels

These levels determine how much the data is reduced while balancing speed and resource usage

``` 1 - z1p0: 10% compression (fastest) 2 - z2p0: 35% compression (balanced) 3 - z3p0: 70% compression (slowest but smallest) ```

Filesystem Options

These options allow you

```bash --partition-map-type: [gpt | msdos] - Partition map type --fs-type: [ext4 | ntfs | fat32 | ...] - Filesystem type --skip-lck: Skip locking check (use with caution) --force: Force operation (risky!) ```

Network Options (for NFS/iSCSI/Samba)

```bash --save-batch: Save batch file for automation --batchfile: Use existing batch file for automated runs --server: Remote server IP for network backup --sharedir: Shared directory for images ```n ---

Backup Rotation Strategies

Common approaches include the grandfather-father-son, Tower of Hanoi, and incremental/differential schemes.

The 3-2-1 Backup Rule

Rotation Schedule Options

These options allow you to customize the frequency and timing of rotations to suit your team's workflow.

Daily Incremental + Weekly Full

Monthly Archive Strategy

Clonezilla Rotation Script Example

```bash #!/bin/bash # Daily backup rotation script DATE=$(date +%Y%m%d) PREV_DATE=$(date -d 'yesterday' +%Y%m%d)

cd /backup/clonezilla/ # Where images are stored

Keep last 7 daily backups

find daily/ -type d -name 'bg_*' -mtime +7 -exec rm -rf {} \;

Keep last 4 weekly backups on Sundays

find weekly/ -type d -name 'bg_*' -mtime +28 -exec rm -rf {} \;

Keep monthly backups for 6 months

find monthly/ -type d -mmin +43200 -exec rm -rf {} \; ```

---

Use Cases for Server/Device Backup

These scenarios illustrate how organizations can mitigate data loss and ensure business continuity.

DGX Spark Machine (AI/ML Workstation)

**Recommended Configuration**: ```bash Mode: Device-to-image (backup to external storage) Compression: Level 2 (balance between speed and size) Schedule: Daily incremental, weekly full Storage: External USB drive + NAS for offsite ```

**Critical Data to Preserve**: - System configuration files (`.bashrc`, network configs) - Installed software and dependencies - Trained ML models and datasets - Project directories and code - SSH keys and credentials (handle separately for security)

Server Deployment Scenarios

These scenarios outline typical configurations for small, medium, and large-scale environments.

1. **Web Server Clone**

2. **Development Environment**

3. **Disaster Recovery**

Best Practices

Always ensure your code is well-documented and follows the project's coding standards.

  1. **Test Restorations Regularly**: A backup that can't be restored is useless
  2. **Verify Backup Integrity**: Use checksums to confirm backup files
  3. **Document Everything**: Keep restoration procedures written down
  4. **Encrypt Sensitive Backups**: Use AES encryption for compliance
  5. **Automate Where Possible**: Schedule regular backups with monitoring

---

Quick Reference: Common Operations

This guide provides concise examples for everyday tasks.

Most Common Beginner Commands

These commands include basic navigation, file manipulation, and

```bash # Full system backup to external drive Clonezilla > device-image > Save disk/image to local disk

Quick disk-to-disk clone

Clonezilla > device-device > Save and restore parted sector-by-sector

Example: To clone /dev/sda to /dev/sdb: 1. Select device-device mode 2. Choose Beginner mode 3. Select source disk (/dev/sda) 4. Select target disk (/dev/sdb) 5. Confirm all operations before executing 6. Clone starts - wait for completion 7. Verify clone: compute checksum of source and target devices (e.g., using sha256sum) and compare.

Verifying the Clone

After cloning, verify the integrity of the clone by comparing checksums of the source and target disks. For example, use `sha256sum` or `md5sum` on corresponding partitions or the whole disk. This ensures that the cloning process completed without errors.

Additional Resources

Further Reading

Further reading

Further reading

Further reading

References

References

Further reading

Further reading

References

References

Further reading

Further Reading

Further reading

References

References

References

References

Visual Themes and Interactive Elements for Websites

To make websites more engaging, consider adding visual themes and interactive elements. A simple theme switcher (light/dark mode) or hover effects can enhance user experience. Since we already have a section on visual themes in the AI money-making guide, we could borrow ideas from there.