A backup without a tested restore is not a backup. This episode teaches you how to restore data with borg extract, select files selectively via --path, browse archives with borg mount (FUSE), and the best practices: restoring to a clean directory, dry-run, and verifying the results.

After the first backup in episode 4, it is time to face the real question: can you actually restore that data? Many teams run backups routinely for years but only find out their backups are broken when a disaster actually happens. This episode makes sure you master borg extract and borg mount, plus the restore-testing habit that saves careers.
borg extract reads an archive and writes files to the current working directory (cwd). You cannot choose the destination directory via an argument — so controlling the cwd is the first step:
mkdir -p /tmp/restore
cd /tmp/restore
borg extract /backup/borg::"web-01-2026-08-13T10:30:00"The entire archive contents (/home, /etc) will be pulled into /tmp/restore, with the original path structure.
Before a large extraction, first confirm what will be extracted:
borg extract --dry-run --list /backup/borg::"web-01-2026-08-13T10:30:00" --path home/arman--dry-run writes nothing; --list shows the files that would be restored.
Not every disaster needs a full restore. Losing a single file is handled fine with selective extraction:
cd /tmp/restore
borg extract /backup/borg::"web-01-2026-08-13T10:30:00" \
--path home/arman/dokumen--path can be repeated for multiple paths at once.--strip-components N removes the first N path components — useful if you want to move files to a new location without the full structure:cd /tmp/restore
borg extract /backup/borg::"web-01-2026-08-13T10:30:00" \
--path etc/nginx \
--strip-components 1As a result, the contents of etc/nginx are placed directly in /tmp/restore/nginx.
borg mount maps an archive as a regular directory using FUSE. You can browse, copy specific files, even run search tools — without a full restore. This is the fastest way to answer the question "which file was lost?".
mkdir -p /mnt/borg
borg mount /backup/borg::"web-01-2026-08-13T10:30:00" /mnt/borg
ls /mnt/borgAll archives can also be mounted at once by omitting the archive name:
borg mount /backup/borg /mnt/borg
ls /mnt/borgEach archive appears as a subdirectory. Unmount with:
borg umount /mnt/borgFUSE is a read-only mechanism — you cannot write to an archive, which is a property we actually want (episode 2).
To hand backups to someone else in a universal format, export them as a tarball:
borg export-tar /backup/borg::"web-01-2026-08-13T10:30:00" backup.tar.gzThe resulting tar.gz can be moved anywhere and opened with plain tar.
Never extract an archive into a directory that still contains active files — files deleted from the source will not be deleted from the cwd, and old files can mix with new ones. Always create an empty directory, like the /tmp/restore example, then verify.
After extraction, verify that the result is genuinely usable:
cd /tmp/restore
test -f etc/nginx/nginx.conf && echo "config OK"
ls -la home/arman/dokumen | headFor thorough verification, compare the checksums of important files between the source and the restore result — or simply prove the application can be started from the restored result.
Important
Make restore testing a routine ritual, not a once-in-a-while event. The industry rule: monthly restore drills for critical data. You do not want to be testing your restore ability when the production server is already down and users are waiting.
borg extract always writes to the cwd. Make sure you cd first, then extract.borg extract restores data to the cwd; always cd to a clean directory first.--path and --strip-components give you selective control.borg mount (FUSE) opens an archive as a read-only directory for quick browsing.borg export-tar produces a universal archive for moving around.In episode 6 we optimize storage: zstd, lz4, and zlib compression — understanding the CPU vs space trade-off, choosing compression levels, and reading the compression ratio from borg info.