System Tar Restore - Feature-rich Backup Script for Linux

"System Tar and Restore" is an open-source program for Linux that offers several options to create backups and restore them. It consists of two scripts: One is the main program and the other one is a GUI wrapper.

It has three different modes: Backup, Restore and Transfer. And it is available in Arch, Debian/Ubuntu, Fedora, OpenSUSE, Gentoo and Mandriva.

Then, you can run the tool by typing the following (from any location):

CLI mode:

$ sudo star.sh

GUI mode:

$ sudo star-gui.sh

Modes

Here is a description of the modes and their options. I'll show you some examples in the next section of the article.

Backup

This mode allows the user to do a tar backup of your system. The following options can be defined:

Archive filename: This is how will the backup archive be named. Default is Backup-$(hostname)-$(date +%Y%m%d-%H%M%S).

Destination directory: The location where the backup archive will be saved. Default is /.

/home directory: You can do three different things: Include it completely, include only hidden files and folders (to keep login and some settings) or exclude it.

Compression: Gzip, bzip2 and xz formats can be used. You can also choose none for no compression. The official documentation recommends gzip.

Encryption method and passphrase: If you want to provide encryption to the archive select between openssl or gpg encryption methods. You should also enter a passphrase.

Archiver options: You can give additional parameters in the archiver. Typing tar --help will give you more information.

The program can read a configuration file, originally located in /etc/backup.conf. You can specify another path and then use it by typing star.sh -i 0 -C /path/backup.conf (CLI mode) or star-gui.sh /path/backup.conf(GUI mode). You can see the sample provided by the dev or generate a configuration file by adding the option -g.

You'll see a backup.log in the same path of the backup archive when the process is finished.

Restore/Transfer

The purpose of the restore mode is to extract the archive created in backup mode to a disk/partition. Transfer mode uses rsync to transfer your system to a disk/partition.

Both in restore and transfer modes, the tool generates the target system's fstab, rebuilds initramfs (for every installed kernel), generates locales and installs and configures the bootloader.

To use this option, you'll have to boot in your target distribution in live mode. You can boot also from other distro, but I recommend the first alternative.

Then, you can set the following options:

Target partitions: It is mandatory to choose a target root partition. Then, you can freely choose other partitions for /home, /boot or swap. If you are using UEFI you can specify a target ESP partition and it's mount point.

Mount options: For the target root partition, you can specify mount options, separated by commas. Defaults are defaults, noatime.

Btrfs subvolumes: You can create subvolumes if target root FS is Btrfs. Enter the paths separated by a space. Recommended root subvolume name is __active.

Bootloader: Grub 2 or Syslinux can be chosen on BIOS systems. If you use a RAID array, the tool will install the bootloader in every device of it. For UEFI you can choose Grub, EFISTUB/efibootmgr or Systemd/bootctl. Additional kernel options can be added too.

Wrapping up

As you could see, System Tar and Restore is a simple tool that gives lots of possibilities at the time of creating and restore/transfer backups. The CLI version is maybe for more experienced users but it allows you to backup or restore something in a very fast way. However, the GUI version can help the newcomers if they don't feel comfortable with the first one.

This is a very interesting tool, I suggest you to try it when you need to make the next backup and explore all its options and combinations.

About Ivo Ursino

I'm an Information Systems Engineering student and Linux enthusiast. I enjoy learning new technologies and testing them so as to give my review and help with their improvement. Staying up to date in the digital world is a must for me.

Related Posts

Linux shell script that will login to server via ssh and get kernel version via uname -r command. List of all the servers are in server_list.txt file, script will take name by name and try to ssh with the root [...]

In this article, we are going show you installation and usage of an awesome tool which is 'tig'. It's a great Git Command Line Tool with ncurses-based text-mode interface for git. Something between the command line and full blown windowed [...]