For more linux backups alternatives, which was covered here and here,.
RSnapShot, as mentioned to be a future entry, is now here as an alternative backup tools in linux.
RSnapShot is a linux filesystem snapshot backup utility. One of the nicest thing about rnsnapshot backup utility is that rsnapshot can do incremental snapshots of local and remote file systems for unlimited number of machines as long as the destination storage capacity can handle the backup snapshot output size. Rsnapshot utilizes rsync package to capture a snapshot of a filesystem. Rsync even saves more disk space by using linux hardlinks when creating snapshots.
Rsync becomes more powerful combined with large capacity media and network storage device. Rnapshot can create an exact duplicate of data from partition or folder locally or remotely.
Rsnapshot makes use of /etc/rsnapshot.conf conf file on creating filesystems snapshot backup.
RSNAPSHOT INSTALLATION:
=======================
# yum -y install rsnapshot rsync
This program should work on any reasonably modern UNIX compatible OS. It has been tested successfully on the following operating systems:
- Debian: 3.0 (woody), 3.1 (sarge), unstable (sid)
- Redhat: 7.x, 8.0, Enterprise Linux 3.0 ES
- Fedora Core 1, 3
- CentOS 3, 4
- WhiteBox Enterprise Linux 3.0
- Slackware 9.0
- SuSE: 9.0
- FreeBSD 4.9-STABLE
- OpenBSD 3.x
- Solaris 8 (SPARC and x86)
- Mac OS X
- IRIX 6.5
BINARY EXECUTION
================
Once rsnapshot has been installed, you will need to configure rsnapshot default config file. But first it is highly advisable to backup the original config file before doing any changes. Back it up as usual with the linux copy file command
# cp /etc/rsnapshot.conf /etc/rsnapshot.conf.bak
RSNAPSHOT PARAMETERS
====================
From command line, rsnaphot can be executed like so
# rsnapshot -v -t [interval] -c /var/backup/rsnapshot.conf [number]
Legend:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-t for time interval parameter
interval can be hourly, daily, weekly, monthly backup
Optional arguments:
-v enabled verbosity mode
-c custom config file
-V more verbosity
-q silent mode
-D full blown diagnostic verbose mode
number numerical interval identification number
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
RSNAPSHOT CONFIG FILE SETUP
===========================
Remember that variable and value inside rsnapshot.conf are separated by tab space. All folders are ended by / character.
By default, all snapshots would be stored under /.snapshots/ . For a different snapshot destination, you can edit the line that says
snapshot_root /.snapshots/
If you are backing up to a removable external media, it is advisable to enable this line
no_create_root 1
Now, for backup intervals
interval hourly 6
interval daily 7
interval weekly 4
interval monthly 12
From the above conf lines, hourly interval backups can have 6 snapshots before rotating the snapshot backup file. The daily interval has 7, this means that when rsnapshot is executed, rsnapshot would keep 7 daily snapshots before rotating the backup snapshot files.
For example
interval hourly 8
This means that every time "rsnapshot hourly" is run, it will make a new snapshot, rotate the old ones, and retain the most recent eight (hourly.0 - hourly.7) snapshots. This would be clearer when we combine rsnapshot with cron utility later on.
If you are specifying these intervals from command line, make sure you commented them out from rsnapshot.conf. However, global parameters are supposed to be on a centralized configuration file, that is why it is included from the rsnapshot.conf file as shown with the above sample.
For compatibility issues, leave this line uncommented
cmd_cp /bin/cp
cmd_rm /bin/rm
cmd_rsync /usr/bin/rsync
cmd_logger /usr/bin/logger
cmd_du /usr/bin/du
du_args -csh
If you have specific file glob patterns you can include them using this directive like so
include /home/ver/*.mp3
and excluding file blog patterns for example, like so
exclude /home/hisfolder/*.ISO
Here are the backup points that needs to be modified as an example
backup /home/ localhost/
/home/ is the snapshot destination folder under /.snapshot/ located from my current box. As you have noticed, folder locations are ended with / character and separated by tab key.
localhost would be the snapshot identification folder name that would be stored under the default snapshot destination folder, for this case is /.snapshot/ . For convenience of understanding, an hourly rsnapshot with the config sample shown above would be stored to
/.snapshots/hourly.0/localhost/home
Saving snapshot backup file to a remote host can also be specified from rsnapshot config file. This can be specifed as an example like so
backup user@backup-server2.com:/ backup-server2.com/
Passwordless and passphaseless ssh connection can be helpful here.
At this point, considering the setup above, rsync would create a local backup snapshot of /home and store the backup file to /.snapshots/ as its snapshot destination folder. Snapshots backup file includes /home/ver/*.mp3 files, /home/ partition folder and excluding /home/hisfolder/*.ISO files. Rsync would be run with default verbose logging dumped to /var/log/rsnapshot .
Here's a screenshot of rsnapshot in action considering the above configuration file together with rsnapshot log file:
Here's a rsnapshot disk usage of the above example.
# rsnapshot du localhost/home
~~~~~~~~~~~~~~~~~~
1.3G /.snapshots/hourly.0/localhost/home
1.3G total
~~~~~~~~~~~~~~~~~~
Now, compare it with using du (disk usage linux command) like so
# du -chs /home
~~~~~~~~~~~~~~~~~~
1.3G /home
1.3G total
~~~~~~~~~~~~~~~~~~
VERIFICATION OF RSNAPSHOT CONFIG FILE
======================================
For sanity checking of rsnapshot configuration file, this can be done from command line terminal like so
# rsnapshot configtest
If everything is fine, the below line should appear from executing the above command like so
~~~~~~~~~~~~~~~~
Syntax OK
~~~~~~~~
~~~~~~~~
RSNAPSHOT LOG MONITORING
~~~~~~~~~~~~~~~~~~~~~~~~
To monitor the latest rsnapshot log messages
# tailf /var/log/rsnapshot
RSNAPHOT ON CRONTAB UTILITY
===========================
Backup procedures are effective when done automatically without any user interactions.
Now, let us combine rsnapshot with crontab utility. Here's a sample crontab job with rsnapshot
00 00 * * * /usr/bin/rsnapshot daily
00 04 * * 6 /usr/bin/rsnapshot weekly
00 04 1 * * /usr/bin/rsnapshot monthly
This specifies a daily rsnapshot at midnight, a weekly snapshot on Saturdays at 4:00AM and a monthly rsnapshot at 4AM on the first day of each month.
Rsnapshot just created the first exact replica of /home . You are probably thinking that snapshots are actually exact data replica which just consumes your disk space. No, it is not.
Rsnapshot creates snapshots with differential and incremental algorithm in mind. Only changed contents of file and folder are saved into snapshots destination folders. Linux command du (disk usage) would report the same disk or folder size, which might confuse you later on.
Rsnapshot-diff to the rescue. Here is where rsnapshot-diff disk usage reporting tool comes in.
Try deleting some unimportant files or moving it to different folder location from the source backup location and compare the snapshot using rsnapshot-diff like so
# rsnapshot-diff /home /.snapshots/hourly.3/localhost/home/
which gives you a similar output
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Comparing /home to /.snapshots/hourly.3/localhost/home/
Between /home and /.snapshots/hourly.3/localhost/home/:
13081 were added, taking 1279034992 bytes;
13075 were removed, saving 1162911380 bytes;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
After moving some file, and did the rdiff comparison, you will see the difference from there.
For more FAQs.
Final Note:
Backing up data is critical that it needs critical and detailed attention. Any single byte differences can probably make the backup copy unusable. Implementing proper backup policy, backup documentation and procedures is one good attitude towards attaning an efficient and effective backup and recovery do's and dont's.
Goodluck then. Happy black boxes kicking and happy reading too!
Related Posts:
Linux Backup using Tar
Linux Backup using RDiff
Bandwidth-Effificent and Encrypted Linux Backup
Subscription
Categories
- HowTos (612)
- Linux Devices (40)
- Linux Diggs (620)
- Linux News (1541)
- Linux Videos (24)
Recent Posts
Blog Archive
-
▼
2007
(340)
-
▼
September
(58)
- Dear Linux SysAd Blog Readers
- Proactive monitoring from linux terminal
- deleting new lines and return line from text file
- Google chat setup using PSI howto
- PSI messenger - a truly promising open messaging a...
- Google chat setup using GAIM Pidgin howto
- Linux command line shell variables defined
- ls - displaying directory contents in many ways
- Control of alternative linux executables
- Searching using whereis linux command
- Witchy which linux command
- NeroLinux - diehard Nero burning software
- Google Sky - Explore and Rediscover the Sky
- Celestia - 3D Earth and Sky visualization
- Earth3D - real-time 3D Earth visualization
- GcStar - managing personal collection items
- DStat - resource statistics linux tool
- Bandwidth Monitor-NG - terminal-based interface ba...
- KNemo - KDE network interface monitoring tool
- EtherApe - graphical network activity monitoring tool
- Beauty of Math using Linux
- print leading/trailing lines before/after a matchi...
- Nagios Monitoring - install and generic setup howto
- ChRT- change real-time attribute process scheduling
- squeezed out multiple commented lines
- UNIX to DOS text file format converter
- totally squeezed out multiple blank lines
- squeezed multiple blank lines into single line
- fmt - simple optimal text formatter
- Linux backup powered by RDiff-Backup
- Linux Ping command explained
- read and display text file from terminal
- URLView - URL and email extractor
- TFTP server - setup and install howto
- NMap - Linux port scanning
- removing garbage characters from screen terminal
- invert string match using grep
- RDesktop - remote desktop howto
- Graveman on Linux - burn baby burn burn
- HTOP - interactive process viewer alternative
- Caching DNS server install howto
- BitTorrent - downloading large files made easy
- PHPAlbum - web photo album install howto
- MRTG graph creation with Cisco routers
- Tree view of directories and file listings from co...
- MAC address packet filtering using IPTables
- GTK-based GNOME Linux Tools
- Linux backups powered by RSnapShot
- MRTG tutorial, install and howtos
- FindSMB - view shared folders from network
- Squid - upgrade and install howto
- prompt and press a key between script lines
- Devede - DVD/VCD video authoring and creation tool
- display file and file system status
- determine file type
- GNOME GUI task scheduler install howto
- Linux backups powered by Rsync
- KPackage - GUI package administration and manageme...
-
▼
September
(58)
Tuesday, September 4, 2007
Linux backups powered by RSnapShot
Subscribe to:
Post Comments (Atom)
ILoveTux - howtos and news | About | Contact | TOS | Policy
0 comments:
Post a Comment