Do you have photos on your Linux PC that haven’t been backed up? Don’t know the first thing about backing up photos on Linux? If so, follow along as we go over how to back up photos on Linux.
Method 1 – Tar backup
The fastest way to create a backup of your photo files on Linux is by using the Tar compression tool. It’s a command-line utility that doesn’t require any installation, and it is highly customizable.
To start the backup process of photos on your Linux PC using Tar, follow the step-by-step instructions below.
Step 1: Launch the Linux file manager and place all images and photo files in your home directory’s “Pictures” folder. By placing all of the files in this directory, you’ll skip the need to create a dedicated “backup” folder.
Once all files are in the directory, open up a terminal window and close the Linux file manager. You’ll then verify that the terminal can see your photo files in the “Pictures” directory by running the ls command below.
Step 2: With all of the picture files in order, it is time to create the backup. Using the tar czvf command, create a new Tar archive of your “Pictures” directory. Keep in mind that this compression process will likely take a bit of time, as image files tend to be large, especially ones taken on DSLR cameras or high-end smartphones.
tar -czvf my-photo-backup.tar.gz Pictures/
Step 3: Once the compression process is complete, a file with the name of “my-photo-backup.tar.gz” will appear in your home directory (~). At this point, feel free to take the file and upload it to your Dropbox, Google Drive, Microsoft OneDrive, Home Server, or external USB storage device for safe-keeping.
Encrypt your files
Pictures can be sensitive and personal. That’s why it’s a good idea to encrypt the backup. Keep in mind, encryption is not required, but it’ll make you feel better if you are backing up highly personal picture files.
To encrypt your backup, you’ll first need to ensure you have the GPG tool installed on your computer by running the gpg –help command. Once you’ve determined that GPG is installed, use the following command below to encrypt the backup file.
gpg -c my-photo-backup.tar.gz
When the encryption is complete, run the rm command to delete the existing unencrypted backup from your computer.
You can then take the encrypted backup file my-photo-backup.tar.gz.gpg and upload it to Dropbox, Google Drive, Microsoft OneDrive, Home Server, or an external USB storage device for safe-keeping.
To decrypt for backup restoration purposes, run the command below.
Restore the backup
To restore the backup, place the “my-photo-backup.tar.gz” archive in the home directory (~) using the Linux file manager. Then, execute the command below to extract and restore your Tar backup automatically.
tar xvf my-photo-backup.tar.gz
Method 2 – Kbackup backup
If you’re not a fan of using the Tar compression tool, another way to create a backup of your photos on Linux is with the Kbackup tool. It’s a simple, straightforward program that allows you to quickly select exactly what you want to save and create a Tar backup.
Before we go over how to use Kbackup on Linux, we must demonstrate how to install it. To install it on your Linux PC, open up a terminal window on the desktop. Then, follow the command-line installation instructions outlined below to get the app set up.
sudo apt install kbackup
sudo apt-get install kbackup
sudo pacman -S kbackup
sudo dnf install kbackup
sudo zypper install kbackup
Once Kbackup is installed, launch it by searching for “Kbackup” in the app menu and clicking on it. Then, with the app open, locate the folder tree on the left-hand side.
In the folder tree on the left, find “home” and click on the arrow next to it to view its contents. Inside of the “home” folder, you’ll see a folder with your username in it. Select the arrow next to it to view the contents of that directory.
In your username folder (home directory), look for the “Pictures” folder, and check the box next to it. By selecting this box, you’re telling Kbackup to create a backup with it.
After selecting the box next to “Pictures,” find the “Target” section and click on the folder icon next to the “Folder:” text box. Upon clicking this button, a pop-up window will appear. Use the pop-up window to tell Kbackup where to save your picture backup.
Once you’ve selected your backup target, locate the “Start Backup” button, and click on it with the mouse to start the backup process. When the process is complete, you will see a notification appear on the screen telling you the backup process is complete.
When you’ve finished backing up your pictures, you’ll be able to upload them to a cloud storage service, home server, or USB device for safe-keeping.