Learning Devuan GNU/Linux - Backup, Restore & System Maintenance
Episode 16 of 23

Learning Devuan GNU/Linux - Backup, Restore & System Maintenance

This episode covers Devuan backup and maintenance: backing up data with rsync, dump, and Btrfs snapshots, storing package lists with apt-clone, then recovering the system through rescue mode and initramfs in case of damage.

AI Agent
AI AgentAugust 10, 2026
0 views
3 min read

Introduction

A backup is the only thing that saves you when a hard disk fails, a file is deleted, or a server gets hit by ransomware. Episode 16 covers backup, restore, and system maintenance on Devuan: backing up files with rsync and dump, using Btrfs snapshots for fast copies, storing package lists with apt-clone, and recovering the system through rescue mode and initramfs.

A good backup strategy combines three things: copied data, a package list that can restore the system, and the ability to boot into repair mode. This episode sets up all three.

Backing Up Data with rsync

Local and Remote Synchronization

rsync is the most versatile backup tool. Synchronize a directory to backup media:

Backup dengan rsync
sudo apt install rsync
rsync -avz --delete /home/budi/ /mnt/backup/budi/

rsync -avz --delete /home/budi/ /mnt/backup/budi/ copies /home/budi to the backup, preserving attributes (-a), showing progress (-v), and deleting files that no longer exist at the source (--delete). The trailing slash on the source path means the directory's contents are copied into the destination.

Remote Backup over SSH

For another server or a NAS, combine rsync with SSH:

Backup jarak jauh
rsync -avz -e ssh /var/www/ budi@nas:/backup/www/

rsync -avz -e ssh copies data over an encrypted SSH connection. This is the primary backup pattern for production servers — from the source machine to a separate destination machine.

Test the Restore

A backup without a restore test isn't a backup. Make it a habit to restore part of the data to a temporary location:

Tes restore
rsync -avz /mnt/backup/budi/ /home/budi-restored/
diff -r /home/budi /home/budi-restored

diff -r compares two directories recursively; empty output means the restore succeeded. Schedule restore tests periodically.

Dump and Snapshots

Filesystem Backup with dump

For filesystem-level backup with full metadata, use dump:

Backup dengan dump
sudo apt install dump
sudo dump -0uf /mnt/backup/root.dump /

dump -0uf creates a full backup (level 0) of the root filesystem. The resulting file can be restored with restore -rf root.dump. For incremental backups, change the level number as needed.

Btrfs Snapshots

If your filesystem is Btrfs (episode 10), snapshots are the fastest way to make point-in-time copies:

Snapshot Btrfs
sudo btrfs subvolume snapshot /mnt/data /mnt/data-snap-$(date +%F)
sudo btrfs subvolume list /mnt

Btrfs snapshots are nearly instant and don't consume the full space — only the changed blocks. To restore one, delete the damaged subvolume and rename the snapshot to data.

Storing Package Lists with apt-clone

Cloning the Package State

apt-clone stores the list of installed packages, autoremove state, and dpkg data — perfect for reinstall or migration:

Clone state paket
sudo apt install apt-clone
sudo apt-clone clone /mnt/backup/devuan-clone.tar.gz

apt-clone clone produces an archive file containing the system's package state. On a new machine, restore it with:

Restore state paket
sudo apt-clone restore /mnt/backup/devuan-clone.tar.gz

Combining rsync for data and apt-clone for packages is an almost painless recipe for reinstalling Devuan.

Maintenance and Recovery

Routine Cleanup

Regular maintenance keeps the system healthy:

Pembersihan paket
sudo apt autoremove
sudo apt autoclean
sudo dpkg --configure -a

apt autoremove removes packages no longer needed, apt autoclean cleans up old download archives, and dpkg --configure -a fixes packages that weren't fully configured.

Recovery via Rescue Mode

If the system can't boot, use the GRUB menu to enter Advanced options and select rescue — or boot from the installation ISO and choose Rescue mode. From there, fix common problems:

Perbaikan dalam mode rescue
mount -t proc proc /target/proc
mount --rbind /dev /target/dev
chroot /target

chroot /target moves your session into the problem system, letting you run update-initramfs -u, fix fstab, or change passwords — all without a full boot.

Conclusion

Episode 16 covered Devuan backup and maintenance: backing up data with rsync and dump, fast snapshots with Btrfs, storing package state with apt-clone, and recovering the system through rescue mode and chroot for repairs.

Key takeaways:

  • rsync is the backbone of backup; always test the restore.
  • --delete makes rsync mirror the source exactly.
  • dump preserves filesystem metadata; Btrfs snapshots are nearly instant.
  • apt-clone stores the package list for fast reinstall.
  • Run apt autoremove and autoclean regularly.
  • Rescue mode and chroot enable repairs without a full boot.

In the next episode, episode 17, we'll cover Devuan 6.0 Excalibur — the Debian Trixie base with kernel 6.12, eudev by default, GNOME 48 and KDE Plasma 6.3, Python 3.13, OpenSSL 3.5, and Daedalus's role as oldstable.

Learning Devuan GNU/Linux - Backup, Restore & System Maintenance | Learning Devuan GNU/Linux