≡ 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 )

Q. How do I use rsync command to back up a home directory under Linux operating system?

A. rsync command easily backup your home directory to local secondary hard disk or remote server using ssh protocol. rsync is a software application for Unix systems which synchronizes files and directories from one location to another while minimizing data transfer using delta encoding when appropriate.

Task: Backup /home/tom to /mnt/usbpen

Assuming that USB pen or external USB hard disk is mounted at /mnt/usbpen, enter the following command to backup (sync) new files and changes to existing files but don't remove files in backup directory:
$ rsync -au /home/tom /mnt/usbpen
To delete files in backup directory that no longer exist in directory being backed up, enter:
$ rsync -au --delete /home/tom /mnt/usbpen

See our previous article about using rsync for transferring files under Linux or UNIX from local or remote network computer.

I'd like to configure my Debian box to backup two remote servers using rsnapshot software. It should make incremental snapshots of local and remote filesystems for any number of machines on 2nd hard disk located at /disk1 ( /dev/sdb2).
[click to continue…]

How do I create a tar file under Linux using command line options?
[click to continue…]

How can I keep out certain files when creating a tarball? For example:


How do I exclude zyz and abc file while using a tar command?
[click to continue…]

Q. I made MySQL backup using mysqldump -u user -h localhost -ppassword forumdb | -gzip -9 > forumdb.sql.gz command. How do I restore MySQL database backup using a shell prompt under Linux / UNIX operating system?
[click to continue…]

Linux Tape Backup With mt And tar Command Howto

Magnetic tape is a non-volatile storage medium consisting of a magnetic coating on a thin plastic strip. Nearly all recording tape is of this type, whether used for video, audio storage or general purpose digital data storage using a computer. How do I make backup using tapes under Linux operating systems?
[click to continue…]