Alternate backup suggestion

Continuing the discussion from New to ipfire - backup - restore issues:


I’m just glad I know how to back it up properly since their Web GUI is written wrong in that regard.

This is how I would backup my ipfire instance since I have enough space to do so.

With an external drive I create with a Linux install from anyone (Ubuntu, Fedora, Mint, etc) that the free space is bigger than the ipfire hard drive, I mount it as /mnt/usb, then :

dd if=/dev/sda of=/mnt/usb/backup.img

if I want to restore my copy I boot the USB drive that has the backup image and drop to a terminal shell and:

dd if=/backup.img of=/dev/sda

backing up and restoring is not a big issue in Linux.

The web gui doesn’t use the standard method I explain above that normal Linux users do to perform backups.

What they should have wrote in the web gui, is a program that would make a boot usb and backup the system and a little menu when you boot the usb drive is to restore the image or back up the system to update the backup image.

What they have is fine if you just want to backup settings.
But a usb boot maker with an automatic backup image/restore of the whole drive would be nice as well.

But that could be done externally and independent of os too.

But doesn’t this mean the IPFire hard drive is unmounted (not in use) to make this happen?

1 Like

No. As a matter of fact, right now I’m 1/2 way backing up the network’s backup onto a usb drive. No issues.

The only time dd unmounts a drive is when its writing a disk image to a drive. The only thing I would add to the commands is status="progress" so you can see how much is copied.

But if you want to compress the backup you can pipe to gzip like this:

for backup:


dd if=/dev/sda | gzip -c > /mnt/usb/backup.img.gz status="progress"

and restore:

gunzip -c /path/to-your/backup.img.gz | dd of=/dev/sda status="progress"

So, IPFire would be inactive for the duration of the backup? One would have to schedule an outage, manually perform the backup, etc?

1 Like

@dr_techno , you are free to start a discussion about this in the known development channels. This includes taking respnsiveness for the development and maintenance of this feature. The main devs would be grateful about this.

Sure, just got to find where to do that on this site. But there are a few backup strategies that would work with a basic install of isolinux or selinux (I haven’t figured out which core, but I imagine its running selinux rules) with a Perl program managing Linux networking modules.

another approach would be using tar and create a backup of / with excluding system mounts. then restore it after the os install. Theoretically, you could make the distro image and just replace the distro.img file on the install disk since its the files that would copy with tar, but with empty os system mounts folders.

If I was going to do a yearly or monthly backup, I would run a tar command in a shell script file with chron.

If I was going to do a yearly or monthly backup, I would run a tar command in a shell script file with chron.

That is my strategy. Using fcron, I perform a daily backup and a monthly isobackup, then rsync the results to my “daily driver” machine.

Nice approach to incremental backups and there is a few commands to explore which one would do the best.
I know tar would be a good command to use in conjunction with the --one-file-system option, so that the /proc /sys /mnt /media folders are not included in the backup.

Another aspect in backup maintenance is cleaning up log files.

Log summary retention (rotation) may be set from the WUI.

1 Like

I am doing the tar option like i put here: