Skip to content

8. Backup Root File System

Chad McCue edited this page Dec 31, 2015 · 7 revisions

Backup Root File System

Once you have Debian running just the way you like it. It's a good idea to backup your root file system in case of USB drive failure.

Backup the USB drive

Plug the USB drive into your computer, mount it and create a gzip compressed file of it:

mount /dev/sdb1 /mnt/usbkey
cd /mnt/usbkey
tar zcf /root/McDebian/McDebian-rootfs-baselines/mcdebian-router-WRT-1900-1200-clone.gz ./*
umount /mnt/usbkey

It's a good time to check the files system on the USB drive for errors and have them auto fixed:

fsck.ext4 /dev/sdb1

To restore the McDebian system onto a new USB drive follow the "Make Root File System" instructions but substitute the backup file mcdebian-router-WRT-1900-1200-clone.gz in the commands.