You are currently viewing the Canada version of the site.
Would you like to switch to your local site?
14 MIN READ TIME

Back up data with ease

Neither music nor love will solve your computing problems, but timely backups just might, feels Shashank Sharma.

RESTIC Credit: https://restic.net

OUR EXPERT Shashank Sharma is a trial lawyer in Delhi and an avid Arch user. He’s been writing about open source software for 20 years and lawyering for over 10.

A good story is one that you can tell repeatedly for everyone’s amusement. It’s even better when you can tell the same story for different purposes. For instance, in a decade long ago, on a computer long since scrapped, he who shall not be named accidentally dd-ed an ISO image into a hard disk partition instead of a USB drive, resulting in the complete loss of data. This is a story that we’ve told repeatedly when talking about the risks of dd, but more importantly, to reiterate the benefit of backing up essential files and data.

While there’s a number of backup solutions to choose from, most feature a graphical interface that might not be to everyone’s liking. For CLI enthusiasts, there’s a featureful alternative. Restic is a fast and robust cross-platform backup solution that can help you create a local or remote copy of all your important files.

Although storage space isn’t much of a consideration for most these days, your chosen backup solution must use available space wisely. Restic does this with the use of deduplication, which ensures single backups of any given file. This means your backups take up less space, with the added advantage that it’s much easier and faster to find files in your backups.

Refer to the documentation to see how you can tweak the CPU usage and compression when performing backups.

With each instance of a backup operation, Restic creates a snapshot, which comprises the current state of the specified files and directories. All subsequent backup operations are incremental, and you can also perform a diff operation to see the differences between the specified snapshots. Restic also encrypts your backups by default, regardless of the destination, whether local storage device, remote host or removable storage media. In addition to these, you can also host your backups on cloud storage solutions such as Amazon, Google Cloud and others.

REMOTE BACKUPS

So far, we’ve only discussed storing backups on a local drive. Restic, however, supports storing backups on remote machines using SSH, in addition to cloud storage devices.

If you wish to store your backup on a remote machine, you have to configure SSH on both your host and remote machines. Ubuntu users can install OpenSSH with the sudo apt install openssh-server openssh-client command. Next, enable the SSH service with the sudo systemctl enable ssh command. If you’re running Fedora, run sudo dnf install openssh-server openssh-client instead, followed by sudo systemctl enable sshd .

Depending on the distro running on the remote machine, you may have to additionally allow incoming SSH connections. To do so, run the firewall-cmd --permanent --zone=public --addservice=ssh command.

With your remote device configured to accept SSH connections, you must first create a repository on the remote machine. You can do so with the sudo restic init -r sftp:username@remoteip:command.

To back up the same /mnt/Stuffsies/AA-Imp-Docs/ directory as from our previous example on to the remote host, we must now run restic backup -rsftp:linuxlala@192.168.0.13:backups/mnt/Stuffsies/AA\ Imp\ Docs .

Essentially, you have to replace the

when specifying the location of the repository with sftp:username@ip-address: .

Unlock this article and much more with
You can enjoy:
Enjoy this edition in full
Instant access to 600+ titles
Thousands of back issues
No contract or commitment
Try for $1.39
SUBSCRIBE NOW
30 day trial, then just $13.99 / month. Cancel anytime. New subscribers only.


Learn more
Pocketmags Plus
Pocketmags Plus

This article is from...


View Issues
Linux Format
April 2025
VIEW IN STORE

Other Articles in this Issue


LINUX FORMAT
LINUX FORMAT
The #1 open source mag Future Publishing Limited,
WELCOME
MEET THE TEAM
This month, we’re putting our readers through our Hacking Academy, so which old-school type of hack are you most proud of?
Hacking an education
It’s that time of the year when we
REGULARS AT A GLANCE
Pebble OS returns from the dead as open source
OPERATING SYSTEM
Distrowatch blocked, then allowed by Facebook
Facebook’s Linux ban sparks outrage.
GTK winter 2025 update
Upcoming changes include X11 deprecation.
20 YEARS OF ODF
OPINION
DATA POINTS
OPINION
AI censorship broken with hex
Chinese AI firm DeepSeek’s censorship has been bypassed by a researcher.
Gnome adds HDR configuration
HDR support answers long-standing requests.
Flathub adds new sections
New We Games and On The Go categories make for easier Flatpak browsing.
Distro watch
What’s behind the free software sofa?
MAKING TRACKS
OPINION
BURNT OFFERINGS
OPINION
Kernel Watch
Jon Masters summarises the latest happenings in the Linux kernel, so that you don’t have to.
ONGOING DEVELOPMENT
Updated Kexec HandOver (KHO) patches were posted that
Answers
Got a burning question about open source or the kernel? Whatever your level, email it to answers@linuxformat.com
A QUICK REFERENCE TO… SHELL WILDCARDS
Wildcards are used to match multiple files in
Mailserver
WRITE TO US Do you have a burning
Helpdex
shane_collinge@yahoo.com
YOUR DIGITAL ISSUE ACCESS
Linux Format print subscribers can now access digital back issues two ways! * Who’s a lucky bunch of readers?!
SysD Manager
Version: 1.6 Web: https://github.com/plrigaux/sysd-manager
AdGuard Home
Version: 0.107.55 Web: https://adguard.com/en/adguard-home/overview.html
ExifTool
Version: 13.11 Web: https://exiftool.org
Tuptime
Version: 5.2.4 Web: https://github.com/rfmoz/tuptime
Xournal++
Version: 1.2.5 Web: https://xournalpp.github.io
Hidamari
Version: 3.6 Web: https://github.com/jeffshee/hidamari
PeaZip
Version: 10.2.0 Web: https://peazip.github.io
HeXon
Version: 20241021 Web: https://luckey.games
FeudalTactics
Version: 1.3.1 Web: https://github.com/Sesu8642/FeudalTactics
Lock
Version: 1.3.8 Web: https://konstantintutsch.com/Lock/
Double Commander
Version: 1.1.21 Web: https://doublecmd.sourceforge.io
REVIEWS
Asus ZenWiFi BT8
Brandon Hill finally thinks this is a worthy Wi-Fi 7 router.
Pop!_OS 24.04 Alpha 5
Nate Drake picks apart System76’s pet distro, based on Ubuntu. Does Pop!_OS hit with a bang or a whimper?
Siduction 2024.1.0
Nate Drake has been hobnobbing with Siduction’s developers to inform you about all this Debian-based distro has to offer.
MakuluLinux 2025.1
Nate Drake heads to Vietnam to explore this feature-rich distro with its own Electra AI assistant. What more could you want?
Ditana 0.9.0
Nate Drake delves into the beta version of this Arch-based distro. Is it ready to roll or just played out?
Halls of Torment
Management loves the idea of a vast army hammering away at keys all day – Joshua Wolens thinks that’s his current day job.
ROUNDUP
Power-user distributions
Michael Reed tries some Linux distros that throw ease of installation out of the window in favour of customisation and a learning experience.
Installation procedure
It tends to be a learning experience with distributions like these.
Alternative distro builds
Pre-built and configured options with easy-to-use derivatives.
Following the installation guide
An important aspect of these distros.
Educational value
These distributions offer an opportunity to pick up some useful skills.
As a daily driver distro
Using it as a standard desktop distribution for average users.
Community and support
Getting started and troubleshooting problems.
Scope for customisation
Make your vision for a Linux system a reality rather than using defaults.
The verdict
Power-user distributions
HACKING ACADEMY
Hacking Academy
Erstwhile academic Jonni Bidwell transmuted his ivory tower book smarts into l33t hacker knowledge. And he’s here to pass it on.
Hacking origins
Some musings on the hacker archetype and today’s common misconceptions about the practice. Plus an intro to BackBox.
Port scanning
Get started with port scanning and probe your systems with Nmap – the bread and butter of pentesting.
Network recon
Explore the Zenmap GUI, look at network traffic with EtherApe, and sniff packets with Wireshark.
Metasploit playground
Test your system for known vulnerabilities, try to backdoor it, and almost discover a vulnerability in BackBox. Fun!
Hacker-friendly Wi-Fi
Nate Drake guides you through choosing the right wireless device so you can hack with the best of them.
Pi USER
Raspberry Pi turns green
Now the Foundation is publicly listed, it’s reporting on how it’s reducing its environmental impact.
Pi 5 PCIe 3.0
Double the M.2 fun!
LoRa laughs
Meshtastic BBS.
THANK S FOR THE MEMORY ?
Les Pounder works with groups such as the
MX Linux 23.5
Les Pounder takes his annual spin with MX Linux on the Raspberry Pi 5. Has it improved since 2024? Spoiler: yes!
OrangePi 4A
The ingredients are all there, but this Pi just doesn’t taste sweet enough for Les Pounder.
RASPBERRY PI 5 Get the most from your Raspberry Pi 5
Faster CPU, storage and RAM for your Raspberry Pi 5 has Les Pounder shouting with a raspberry yell, “More! More! More!”
Long-range wireless without pesky bills
Exchanging data over long ranges without paying carriers a fortune sounds like a dream, but Tam Hanna and LoRa technology let you do it!
IN DEPTH
WIRE SHARK to the cloud!
Linux Format talks to Gerald Combs and Loris Degioanni , about creating Wireshark, the origins of network packet analysis, and how they want their shark to fly...
TUTORIALS
Run Android apps on your Linux PC
Nick Peers discovers a fast and relatively easy way to run standard Android apps on your Linux desktop installation.
Self-host remote access with Rust Desk
Remote-control software is useful, but Tam Hanna suggests self-hosted remote control software based on open source technology is even better.
The hardware that made Linux great
To kick off our new series, Mike Bedford delves into the now largely forgotten 80386, which is where Linux first saw the light of day.
Run OnlyOffice from your Synology NAS
Enhance your private Synology cloud with OnlyOffice Docs, as Kseniya Fedoruk walks you through the installation process.
ADMINISTERIA
Managing your Vagrant virtual machines
Laziness is the mother of invention and Stuart Burns is a past master at getting his machines to do all his work for him…
NVME AND RASPBERRY PI: A YUMMY SANDWICH
Raspberry Pis are great but, let’s be honest,
ENEMY WITHIN!
Stuart Burns is a sysadmin for a Fortune
AI security threats
The rise of AI presents cybersecurity challenges for all. Davey Winder explores the dangers – and how to defend against them!
CODING ACADEMY
Coding Cosmic Invaders in BBC Basic
B2 Credit: https://github.com/tom-seddon/b2
How fast can your Rust code run?
David Bolton demonstrates running two Rust programs used to time card shuffling and generate a file full of poker cards.
Chat
X
Pocketmags Support