Skip to main content

Posts

Showing posts from May, 2012
Ssh command can send back the data on the remote standard output stream to the local standard input like: ssh hoge@remote 'dd if=/dev/zero count=512' | dd of=/dev/null Of course, this does not make sense, but works  :-)  I often use this data transmission method for the backup purpose. Recently, I was asked by the network administrator to limit the band width of ssh data transmission. I didn't know how to archive his demand at first, but I found a good command-line tool, and worked it out. It was "cpipe". I could install very easily with: apt-get install cpipe and here is an example how to use cpipe: ssh hoge@remote 'dd if=/dev/zero count=512 | cpipe -s 1000' | dd of=/dev/null Have fun!

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&