Welcome to SparkyLinux forums
Zapraszamy również na polsko-języczne Forum

HOWTO! Backup Your Newly Created USB Thumb Drive With Persistence

Started by sasdthoh, April 09, 2017, 06:17:00 PM

Previous topic - Next topic


Now that people are starting to enjoy creating a snapshot of their personal installations of Sparky Linux by creating a Hybrid ISO with saved user settings and persistence enabled, the following HOW TO will show you the procedure to make an EXACT bit for bit copy of that usb thumb drive.

Why would we want to do this? ....... Because of the amount of time people have invested in creating a LIVE version of personal installations and the changes that have been saved to the particular usb thumb drive in question. I have friends that use their LIVE usb devices for almost everything they do on laptops, etc. So I decided to make backups and test my own to be certain that my work is protected.

As always, Sparky Linux has no responsibility for my posts. They are for instructional purposes to serve interested parties. You and you alone are responsible for backups, etc., when using information provided.

Ok, let's get started.

Open a Linux terminal. For this instruction, I will use a re-spin of Sparky Linux that I have created for work with older systems in a virtual machine. Once the terminal is open, make it full screen to eliminate distractions, at least while learning.

You may use the SUDO command if you desire but I will assume you have switched to the root user account  for HOW TO purposes by the issue of ....................

~$   su

Once you have a # prompt, issue the following command to identify the usb thumb drive.

#   lsblk

It is important you determine how the system references your usb device. For instruction purposes, the following is how Linux listed my usb thumb drive.

#   /dev/sdb
            /dev/sdb1 (main partition)
            /dev/sdb2 (persistence partition)

We will only need the drive identifier for this procedure. Again, make certain you are working with the correct device. When ready, issue the following command. Remember that the example shows the me working as the root user . Otherwise, you would add the SUDO in the beginning of the command.

#   dd if=/dev/sdb of=/pathtosavethebackup/nameyougiveyourbackup.iso bs=4096 status=progress conv=noerror,sync

This will make a bit for bit copy of the entire usb device including all boot and partition information and store it in the file you name and in the location you desire. The process is not fast but it doesn't take too long. Once created, you are free to make additional copies of your newly created backup should you ever need to create a duplicate.

Should the time come you need to restore your backup to your usb thumb drive or simply make another copy WITH PERSISTENCE and saved settings intact, issue the following command. Remember that when you restore your backup to make certain the usb device is of the same size in capacity. (ie: 8-gigabyes, etc.)

#   dd if=/pathtosavedbackup/nameyougaveyourbackup.iso of=/dev/sdb bs=4096 status=progress conv=noerror,sync

Remember to substitute, if necessary, the device identifier.

Again, the time it takes to complete the process whether making or restoring a backup isn't too long and well worth the effort. Once finished you will be free to test the results. I have performed this procedure a few times with total success.

I hope this HOW TO has been helpful.

Paul ( sasdthoh )

View the most recent posts on the forum