File: pdumpfs.html

package info (click to toggle)
pdumpfs 1.0-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 184 kB
  • ctags: 11
  • sloc: ruby: 911; sh: 53; makefile: 44
file content (174 lines) | stat: -rw-r--r-- 6,333 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
<?xml version="1.0" encoding="euc-jp"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="ROBOTS" content="NOARCHIVE" />
<link rel="stylesheet" href="http://namazu.org/~satoru/satoru.css" media="all" type="text/css" />
<title>pdumpfs: a daily backup system similar to Plan9's dumpfs</title>
</head>
<body>
<p class="lang-navigator">English | <a href="pdumpfs-ja.html">Japanese</a></p>

<h1>pdumpfs: a daily backup system similar to Plan9's dumpfs</h1>
<p class="last-modified">Last Modified: 2004-06-22 (Since: 2001-02-18)</p>

<hr />

<h2>What's pdumpfs?</h2>
<p>
pdumpfs is a simple daily backup system similar to Plan9's dumpfs which preserves every daily snapshot. pdumpfs is written in <a href="http://www.ruby-lang.org/">Ruby</a>. You can access the past snapshots at any time for retrieving a certain day's file. Let's backup your home directory with pdumpfs!
</p>
<p>
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.
</p>

<h2><a name="news" id="news">What's New</a></h2>

<ul>
<li><em>2004-06-22</em>: <a href="#download">pdumpfs 1.0</a> Released!<br />
<ul>
<li>A Windows GUI is now supported using
<a href="http://www.osk.3web.ne.jp/~nyasu/software/vrproject.html">VisualuRuby</a>.</li>
</ul></li>

<li><em>2004-05-11</em>: <a href="#download">pdumpfs 0.9</a> Released!<br />
<ul>
<li>Some bugs were fixed including "unexpected next" bug.</li>
<li>A Windows binary is now available experimentally using
<a href="http://exerb.sourceforge.jp/">Exerb</a>.</li>
</ul></li>

<li><em>2004-03-31</em>: <a href="#download">pdumpfs 0.8</a> Released!<br />
Ruby 1.6 is now supported again (pdumpfs 0.7 doesn't work with ruby 1.6)</li>

<li><em>2004-03-30</em>: <a href="#download">pdumpfs 0.7</a> Released!<br />
<ul>
<li>Win32/NTFS file system is now supported.</li>
<li>--exclude option is now supported.</li>
<li>Thanks to <a href="http://www.monochrome.jp/~katsuwo/">Takeshi Komiya</a>
for the patches.
</li>
<li>Some small bugs are also fixed.</li>
</ul>
</li>

<li><em>2001-02-19</em>: <a href="#download">pdumpfs 0.1</a> Released!<br /></li>
</ul>

<h3>Installation</h3>

<p>
To install pdumpfs from the source code, unpack the package
and run <code>make</code> and copy the resulting
<code>pdumpfs</code> file to your bin directory such as
<code>/usr/local/bin</code>.
</p>

<h2>Usage</h2>

<h3>Command Line</h3>
<pre>
   % pdumpfs &lt;source directory&gt; &lt;destination directory&gt;
</pre>

<h3>Example</h3>
<p>
To backup your home directory /home/yourname to /backup, run the following command.
</p>
<pre>
   % pdumpfs /home/yourname /backup &gt;/backup/log 2&gt;/backup/error-log
</pre>
<p>
On and after the second day, it is a good idea to invoke the backup command with cron daemon. The following setting allows you to backup your home directory every 5 a.m.
</p>
<pre>
    00 05 * * * pdumpfs /home/yourname /backup &gt;/backup/log 2&gt;/backup/error-log
</pre>
<p>
If the backup system works well, you can retrieve a certain day's file with a file name like /backup/2001/02/19/yourname/...
</p>

<h3>Excluding Files</h3>

<p>
To exclude particular files from a backup, 
you can use the following options.
</p>

<dl>
<dt>--exclude=PATTERN</dt>
<dd>Exclude files or directories matching PATTERN (Regular Expressions in
Ruby) from a backup. You can specify the option as many you like.</dd>
<dt>--exclude-by-size=SIZE</dt>
<dd>Exclude files larger than SIZE from a backup. You can
specify SIZE like 100, 100K, 10M, and 1G. </dd>
<dt>--exclude-by-glob=GLOB</dt>
<dd>Exclude files matching FILE from a backup. fnmatch(3)
(shell globbing) to the basename of a file  is used  for matching.
You can specify the option as many you like. </dd>
</dl>

<h4>Examples</h4>

<pre>
# Exclude files and directories matching "spool" or "log" from a backup.
% pdumpfs --exclude 'spool|log' /var /mnt/backup

# Exclude files larger than 10MB from a backup.
% pdumpfs --exclude-by-size 10M ~/ /mnt/backup

# Exclude wave files (*.wav) from a backup.
% pdumpfs --exclude-by-glob "*.wav" ~/ /mnt/backup
</pre>


<h2>Limitation</h2>

<ul>
<li>pdumpfs can handle only normal files, directories, and symbolic links.</li>

<li>pdumpfs may not work on systems other than UNIX because pdumpfs utilizes hard links.</li>

<li>pdumpfs is not suited for a directory containing large files which update frequently.</li>

<li>If more than 31 days absence occurs, incremental backup would not be performed. So, backup your files everyday.</li>

<li>With pdumpfs, you can easily remove unnecessary files because the past files can be retrieved at any time. However, please do not put too much confidence in pdumpfs. pdumpfs may have serious bugs.</li>
</ul>

<h2>Tips</h2>

<ul>
<li>If files are increased by 10 MB everyday, about 4 GB disk space is consumed by one year. It is not too much, considering the recent evolution of computer resources.</li>

<li>Backup your files to a physically separated device.</li>

<li>With a linux ext2/ext3 filesystem, files can be immutable with chattr command. To make all files in /backup immutable, run <code>chattr -R +i /backup</code> with the root privilege. chattr command keep you from doing rm -rf backup files by accident.</li>
</ul>

<h2><a name="download" id="download">Download</a></h2>
<p>
pdumpfs is a free software with ABSOLUTELY NO WARRANTY under the terms of the <a href="http://www.gnu.org/copyleft/gpl.html">GNU General Public License version 2</a>.
</p>

<ul>
<li><a href="pdumpfs-1.0.tar.gz">pdumpfs-1.0.tar.gz</a></li>
<li><a href="pdumpfs-w32-1.0.zip">pdumpfs-w32-1.0.zip</a></li>

<li><a href="http://sourceforge.net/cvs/?group_id=111004">CVS</a></li>
</ul>

<h2>Links</h2>

<ul>
<li><a href="http://www.igmus.org/code/">glasstree</a><br />
A similar tool written in Perl</li>

<li><a href="http://freshmeat.net/projects/pdumpfs/">freshmeat.net: pdumpfs</a></li>
</ul>

<hr />
<address><a href="http://namazu.org/~satoru/">Satoru Takabayashi</a></address>
</body>
</html>