pdumpfs is a console based simple backup tool written and works with ruby. Pdumpfs constructs the snapshot YYYY/MM/DD in the destination directory. All source files are copied to the snapshot directory for the first time. On and after the second time, pdumpfs copies only updated or newly created files and stores unchanged files as hard links to the files of the previous day’s snapshot for saving a disk space.
pdumpfs Rpm for CentOS / RHEL are availbe at http://packages.sw.be/pdumpfs/
Before installing the pdumpfs rpm make sure you have the ruby pack installed or you can install it using.
- # yum install ruby
Once you have installed the pdumpfs rpm, just use the ‘ pdumpfs -h ‘ to list the help menu. In case if you are planning to backup the whole /var directory to another drive (ie..for example to /backup)
- # pdumpfs /var /backup > /backup/log 2> /backup/error-log
Which will create the backup dump inside the /backup with the year and date (for example /backup/2011/01/24).
The pdumpfs also have an option to ignore certain file/directory or even file extension/size not to backup while dumping for example.
To exclude files and directories matching “spool” or “log” from a backup.
- # pdumpfs –exclude ‘spool|log’ /var /backup
Exclude files larger than 100MB from a backup.
- # pdumpfs –exclude-by-size 10M /var /backup
Exclude wave files (*.jpg) from a backup.
- # pdumpfs –exclude-by-glob “*.jpg” /var /backup
Add your own cron to execute this command with your require syntax to take the snapshot and this tool is for those who are looking for to replace the rsync.
NOTE : This tool not suited for a directory containing large files which update frequently and also no more updates or patch works done after 2004 still few bugs are unfixed. So use this tool on your own risk. You can try the dirsync tool instead which works very similar based on rsync.
Useful Links :
Pdumpfs home page