≡ Menu

Linux and Unix Backup and Restore

Tutorials, howtos, and general Linux / Unix tips about Backing and restoring the systems. This section guides sys admin with backing up data to enable recovery from data loss. ( rss feed )

FreeBSD Install Rsnapshot Filesystem Snapshot Backup Utility

How do I install rsnapshot a filesystem snapshot utility based on rsync on my FreeBSD server to backup my local/remote Linux and Unix-based desktop, server and laptop system?
[click to continue…]

How To Wakeup Backup Nas Server and Mirror Files Using Rsync in Linux

I've a critical data stored on my small home server. I backup my Desktop, Laptop and a remote VPS server to my home nas server powered by Debian Linux using rsnapshot backup utility. In the event that my main nas server has a hardware (hard disk failure) problem, having mirrored files provides some sort of peace of mind. How do I mirror /backups/personal (total 100GB and growing everyday) to a secondary nas Linux server located in my network?
[click to continue…]

Debian / Ubuntu: Install Duplicity For Encrypted Backup In Cloud

My cloud based backup service provider has ssh access to the backup system. How do I install and configure duplicity software for remote backups in incremental and encrypted format on Debian or Ubuntu Linux based desktop / laptop / server?
[click to continue…]

Rsync: Preserve / Copy Hard Links ( Backup Rsnapshot Directory Tree )

I'm using rsnapshot filesystem snapshot utility to make incremental snapshots of local and remote filesystems for 10 production servers running on RHEL 5.x system. The rsnapshot commands makes extensive use of hard links, so if the file doesn't change, the next snapshot is simply a hard link to the exact same file. How do I use the rsync command to copy my the entire snapshot directory /raid6/rsnapshot/ (around 4TB) to a remote server for mirroring purpose?
[click to continue…]

Linux / UNIX: Encrypt Backup Tape Using Tar & OpenSSL

How do I make sure only authorized person access my backups stored on the tape drives (DAT, DLT, LTO-4 etc) under Linux or UNIX operating systems? How do I backup /array22/vol4/home/ to /dev/rmt/5mn or /dev/st0 in encrypted mode?
[click to continue…]

Rsnapshot WARNING: Could not lchown() symlink "/path/to/file" Error and Solution

I got rsnapshot based backup server up and running for my network under Debian Linux 5.x. But, whenever I run a backup job using the following command:
rsnapshot -v -c /root/rsnapshot.server1.conf hourly
I get the following messages on screen:

WARNING: Could not lchown() symlink "/nas/.rsnapshot/hourly.1/server1.example.com/etc/alternatives/locate"
WARNING: Could not lchown() symlink "/nas/.rsnapshot/hourly.1/server1.example.com/etc/alternatives/nc.1.gz"
WARNING: Could not lchown() symlink "/nas/.rsnapshot/hourly.1/server1.example.com/etc/alternatives/jexec-binfmt"
WARNING: Could not lchown() symlink "/nas/.rsnapshot/hourly.1/server1.example.com/etc/alternatives/servertool"

How do I fix this problem?
[click to continue…]

UNIX / Linux Dump Command Exclude Directories / Files

I'm using dump command to backup file systems to tape and remote server. However, I'm not able to find any option that will allow me to exclude files or directories from backup. How do I force UNIX / Linux / FreeBSD dump command to exclude selected files (such as /var/cache or /usr/basejails) which I don't want to backup?
[click to continue…]

keychain: Set Up Secure Passwordless SSH Access For Backup Scripts

We establish connections to remote systems without supplying a password, however I do not want to store my password less keys ( passphrase-free keys) on my servers. ssh-agent, takes care of keys with passphase, which allowing me to easily have ssh-agent process per system per login session. How do I dramatically reduces the number of times I've to punch my passphrase from once per new login session to once every time my local server is rebooted? How do I use keychain utility for all my backup scripts for secure passwordless login?
[click to continue…]

Freebsd Mount a NAS via SMB / CIFS

Q. I want to use our NAS server to store backups. Our NAS supports FTP and CIFS / SMB sharing technology. How do I mount and store files on NAS using FreeBSD? How do I automate entire procedure using a shell script? Is that doable? If so, what's the easiest solution ftp or CIFS?
[click to continue…]

Tar Extract a Single File(s) From a Large Tarball

Q. I've couple of large tarballs such as www.tar and images.tar. Is it possible to extract a single file or a list of files from a large tarball such as images.tar instead of extracting the entire tarball? How do I extract specific files under Linux / UNIX operating systems?
[click to continue…]