RSS Subscription
Linux Howtos & Tutorials

Enter your email:

Delivered by


NOTE:New tutorials are from LinuxCareer.com

Poll

Do you own or wish to have iPhone?
 


Linux eBooks FREE Download
A guide to programming Linux kernel modules
Introduction to Linux - A Hands on Guide
A Newbie's Getting Started Guide to Linux

Linux from Scratch - Create Your Own Linux System - Free eBook

Linux: The Hacking Solution (v.3.0)

SQLite 3 with PHP Essential Training – Free Video Training Tutorials

This guide will introduce you to the world of GNU/Linux

The GNU/Linux Advanced Administration

A Complete Beginner's Manual for Ubuntu 10.04 (Lucid Lynx)

Advanced Bash-Scripting Guide

Set up, maintain, and secure a small office email server

Partner Linux Sites:
How-To.LinuxCareer.com
Jobs.LinuxCareer.com
TuxMachines
Monsterb
LinuxBloggers
AdamsInfo
LinuxScrew
All For Linux

Creating an Incremental backup with Linux and pax archive tool

pax is an archive utility somewhere between cpio and tar. This is just because is independent of the specific archive format, and supports a wide variety of different archive formats. It can perform simple tasks as creating a compressed archive of a selected directory or it can as much easily create a daily incremental backups. In this short article we will see how to protect our daily work by creating an incremental backup with pax.

First we need to create a directory where we intend to store our daily backups. As a root user create a directory /usr/local/backup/lilo and make an user liloto be an owner:

# mkdir -p /usr/local/backup/lilo
# chown lilo.lilo /usr/local/backup/lilo 

At this point we are ready. Since we do not have any backup yet first we need to create a full backup. Switch back to a user lilo ( use your user name ) and execute:

$ pax -wvf /usr/local/backup/lilo/$(date +%Y%m%d) ~/

The command above will create a directory as a today's date and copy all of your data from your home directory to a new backup directory. The backup for today is done. Next day after work we create an incremental backup ( copy only new or changed files ) with a following command:

$ pax -T 0000 -wvf /usr/local/backup/lilo/$(date +%Y%m%d) ~/

Note that -T option will instruct a pax command to copy only files changed and created since last midnight. You can continue to do an incremental backup indefinitely. However, it is recommended to do a full back at least once a week or month, this depends on the nature of your work. You can also consider to use pax's -z option to create compressed archives if you are concerned about a disk space.

It is obvious that the backup example we have just shown, would not safe us from a hardware failure of our hard drive as we have only copied all data locally within a single file system. From this reason  consider to backup onto your USB removable media or using remotely using NFS and etc.

Share this linux post:

Submit Creating an Incremental backup with Linux and pax archive tool in Delicious Submit Creating an Incremental backup with Linux and pax archive tool in Digg Submit Creating an Incremental backup with Linux and pax archive tool in FaceBook Submit Creating an Incremental backup with Linux and pax archive tool in Google Bookmarks Submit Creating an Incremental backup with Linux and pax archive tool in Stumbleupon Submit Creating an Incremental backup with Linux and pax archive tool in Technorati Submit Creating an Incremental backup with Linux and pax archive tool in Twitter
 
Comments for this page are closed !!!
Please visit our new Linux Forum for additional help or discussion.


Linux eBooks FREE Download