Skip to main content

Posts

Showing posts with the label backup

Backup comfortably with rdup

Several days ago, I wanted to make a backup of my home directory to an external HDD connected with USB, and decided to use the "rdup" utility. "Rdup" is a set of commands to manage multiple generations of backups of a certain directory.  What caught my eyes was its feature to make hard links between the generations automatically to save disk space. In order to accomplish a typical backup task, rdup's three commands should be combined appropriately.  But if your backup goes to a local storage straightforward daily, a shell script 'rdup-simple' gives a shortcut to the task like: # rdup-simple /home/mine /media/BACKUPHDD/mypc/ Because rdup is provided as a package in Debian, its installation was also very simple.

Multiple generations of backup and hardlink

I suppose it a common way to preserve multiple generations of backup copy of your important data. To preserve them as much as possible, archiving and compressing the backup copy is one way. But there is another way to save the storage: hard-linking. The basic idea is to share the identical files between different generations of backup copy with hard links. If the target data consist of normal files, rsnapshot does most of the hard-linking management automatically. But I recently encountered the problem with the database files managed by daemon processes. Because they are supposed to be changed asynchronously,  the consistency of th オプション eir copy taken with the cp command is not guaranteed. Because this kind of problems is often aware in the design of the daemon processes, special backup methods are provided to export the consistent backup copy. For example, Subversion provides "svnadmin hotcopy" subcommand, and Trac provides  "trac-admin hotcopy...

Compress log files efficiently with 7zip

 7-zip is a popular compression tool and  famous for high compression ratio. But unfortunately, there is no description in the man pages about switching the compression algorithm to PPMd . Actually, PPMd provides very high compression ratio with lower CPU power consumption with a text data, and I would like to show its efficiency. Here is an example. Below is a comparison of size and CPU time between variety of  compression methods .    command       size      time    7z a -tzip -mx=9    3699 bytes   0m0.410s 7z a -tgzip -mx=9    3610 bytes   0m0.411s 7z a -tbzip2 -mx=9    3363 bytes    0m0.608s 7z a -m0=lzma -mx=9    3406  bytes   0m0.109s 7z a -m0=PPMd -mx=9    2699 bytes   0m0.058s The original file is a 6795 byte text file. As you can see, efficiency of PPMd is outstanding! PPMd helps me a lot to...