File: DataManagement.raw.xml

package info (click to toggle)
debian-reference 2.24
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 20,088 kB
  • ctags: 35
  • sloc: xml: 70,510; sh: 616; makefile: 352; perl: 221; sed: 3
file content (4953 lines) | stat: -rw-r--r-- 196,031 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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
<?xml version="1.0"?>
<article>
  <articleinfo>
    <title>DebianReference/DataManagement</title>
  </articleinfo>
  <para/>
  <section>
    <title>Do not use Edit(GUI) button.</title>
    <para> </para>
    <para>Copyright 2007, 2008  Osamu Aoki GPL, (Please agree to GPL, GPL2, and any version of GPL which is compatible with DSFG if you update any part of wiki page) </para>
    <para>Generated HTML is at "<ulink url="http://people.debian.org/~osamu/pub/getwiki/html/ch11.en.html">Debian Reference: Chapter 11. Data management</ulink>". </para>
    <para>I welcome your contributions to update this wiki page. You must follow these rules: </para>
    <itemizedlist>
      <listitem>
        <para>Do not use Edit(GUI) button of <ulink url="/MoinMoin">MoinMoin</ulink>. </para>
      </listitem>
      <listitem>You can update anytime for: <itemizedlist><listitem>grammar errors </listitem><listitem>spelling errors </listitem><listitem>moved URL location </listitem><listitem>package name transition adjustment (emacs23 etc.) </listitem><listitem>clearly broken script. </listitem></itemizedlist></listitem>
      <listitem>Before updating this wiki content: <itemizedlist><listitem><para>Read "<ulink url="http://wiki.debian.org/DebianReference/Test">Guide for contributing to Debian Reference</ulink>". </para></listitem></itemizedlist></listitem>
    </itemizedlist>
    <para/>
  </section>
  <section>
    <title>Data management</title>
    <para/>
    <section>
      <title>Sharing, copying, and archiving</title>
      <para>The security of the data and its controlled sharing have several aspects: </para>
      <itemizedlist>
        <listitem>the creation of data archive, </listitem>
        <listitem>the remote storage access, </listitem>
        <listitem>the duplication, </listitem>
        <listitem>the tracking of the modification history, </listitem>
        <listitem>the facilitation of data sharing, </listitem>
        <listitem>the prevention of unauthorized file access, and </listitem>
        <listitem>the detection of unauthorized file modification. </listitem>
      </itemizedlist>
      <para>These can be realized by using some combination of: </para>
      <itemizedlist>
        <listitem>the archive and compression tools, </listitem>
        <listitem>the copy and synchronization tools, </listitem>
        <listitem>the network file system, </listitem>
        <listitem>the removable storage media, </listitem>
        <listitem>the secure shell, </listitem>
        <listitem>the authentication system, </listitem>
        <listitem>the version control system tools, and </listitem>
        <listitem>hash and cryptographic encryption tools. </listitem>
      </itemizedlist>
      <para/>
      <section>
        <title>Archive and compression tools</title>
        <para>Here is a summary of archive and compression tools available on the Debian system: </para>
        <table>
          <caption/>
          <tgroup cols="6">
            <colspec colname="xxx1"/>
            <colspec colname="xxx2"/>
            <colspec colname="xxx3"/>
            <colspec colname="xxx4"/>
            <colspec colname="xxx5"/>
            <colspec colname="xxx6"/>
            <tbody>
              <row>
                <entry>
                  <para> List of archive and compression tools. </para>
                </entry>
                <entry>
                  <para> 1 </para>
                </entry>
                <entry>
                  <para> 2 </para>
                </entry>
                <entry>
                  <para> 3 </para>
                </entry>
                <entry>
                  <para> </para>
                </entry>
                <entry>
                  <para> </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <emphasis role="strong">package</emphasis>
                  </para>
                </entry>
                <entry>
                  <para>
                    <emphasis role="strong">popcon</emphasis>
                  </para>
                </entry>
                <entry>
                  <para>
                    <emphasis role="strong">size</emphasis>
                  </para>
                </entry>
                <entry>
                  <para>
                    <emphasis role="strong">command</emphasis>
                  </para>
                </entry>
                <entry>
                  <para>
                    <emphasis role="strong">comment</emphasis>
                  </para>
                </entry>
                <entry>
                  <para>
                    <emphasis role="strong">extension</emphasis>
                  </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>tar</code>
                  </para>
                </entry>
                <entry>
                  <para> 29915 </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para><code>tar</code>(1) </para>
                </entry>
                <entry>
                  <para> the standard archiver (de facto standard) </para>
                </entry>
                <entry>
                  <para>
                    <code>.tar</code>
                  </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>cpio</code>
                  </para>
                </entry>
                <entry>
                  <para> 15940 </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para><code>cpio</code>(1) </para>
                </entry>
                <entry>
                  <para> Unix System V style archiver, use with <code>find</code> command </para>
                </entry>
                <entry>
                  <para>
                    <code>.cpio</code>
                  </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>binutils</code>
                  </para>
                </entry>
                <entry>
                  <para> 15167 </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para><code>ar</code>(1) </para>
                </entry>
                <entry>
                  <para> archiver for the creation of static libraries </para>
                </entry>
                <entry>
                  <para>
                    <code>.ar</code>
                  </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>fastjar</code>
                  </para>
                </entry>
                <entry>
                  <para> 2307 </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para><code>fastjar</code>(1) </para>
                </entry>
                <entry>
                  <para> archiver for Java (zip like) </para>
                </entry>
                <entry>
                  <para>
                    <code>.jar</code>
                  </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>pax</code>
                  </para>
                </entry>
                <entry>
                  <para> 530 </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para><code>pax</code>(1) </para>
                </entry>
                <entry>
                  <para> new POSIX standard archiver, compromise between <code>tar</code> and <code>cpio</code> </para>
                </entry>
                <entry>
                  <para>
                    <code>.pax</code>
                  </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>afio</code>
                  </para>
                </entry>
                <entry>
                  <para> 308 </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para><code>afio</code>(1) </para>
                </entry>
                <entry>
                  <para> extended <code>cpio</code> with per-file compression etc. </para>
                </entry>
                <entry>
                  <para>
                    <code>.afio</code>
                  </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>gzip</code>
                  </para>
                </entry>
                <entry>
                  <para> 38002 </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para><code>gzip</code>(1), <code>zcat</code>(1), ... </para>
                </entry>
                <entry>
                  <para> GNU <ulink url="http://en.wikipedia.org/wiki/LZ77_and_LZ78">LZ77</ulink> compression utility (de facto standard) </para>
                </entry>
                <entry>
                  <para>
                    <code>.gz</code>
                  </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>bzip2</code>
                  </para>
                </entry>
                <entry>
                  <para> 25807 </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para><code>bzip2</code>(1), <code>bzcat</code>(1), ... </para>
                </entry>
                <entry>
                  <para><ulink url="http://en.wikipedia.org/wiki/Burrows-Wheeler_transform">Burrows-Wheeler block-sorting compression</ulink> utility with higher compression ratio than <code>gzip</code>(1) (slower than <code>gzip</code> with similar syntax) </para>
                </entry>
                <entry>
                  <para>
                    <code>.bz2</code>
                  </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>lzma</code>
                  </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para><code>lzma</code>(1) </para>
                </entry>
                <entry>
                  <para><ulink url="http://en.wikipedia.org/wiki/Lempel-Ziv-Markov_chain_algorithm">LZMA</ulink> compression utility with higher compression ratio than <code>gzip</code>(1)  (slower than <code>gzip</code> with similar syntax) </para>
                </entry>
                <entry>
                  <para>
                    <code>.lzma</code>
                  </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>p7zip</code>
                  </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para><code>7zr</code>(1), <code>p7zip</code>(1) </para>
                </entry>
                <entry>
                  <para><ulink url="http://en.wikipedia.org/wiki/7-Zip">7-Zip</ulink> file archiver with high compression ratio (<ulink url="http://en.wikipedia.org/wiki/Lempel-Ziv-Markov_chain_algorithm">LZMA</ulink> compression) </para>
                </entry>
                <entry>
                  <para>
                    <code>.7z</code>
                  </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>p7zip-full</code>
                  </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para><code>7z</code>(1), <code>7za</code>(1) </para>
                </entry>
                <entry>
                  <para><ulink url="http://en.wikipedia.org/wiki/7-Zip">7-Zip</ulink> file archiver with high compression ratio (<ulink url="http://en.wikipedia.org/wiki/Lempel-Ziv-Markov_chain_algorithm">LZMA</ulink> compression and others) </para>
                </entry>
                <entry>
                  <para>
                    <code>.7z</code>
                  </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>lzop</code>
                  </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para><code>lzop</code>(1) </para>
                </entry>
                <entry>
                  <para><ulink url="http://en.wikipedia.org/wiki/Lempel-Ziv-Oberhumer">LZO</ulink> compression utility with higher compression and decompression speed than <code>gzip</code>(1) (lower compression ratio than <code>gzip</code> with similar syntax) </para>
                </entry>
                <entry>
                  <para>
                    <code>.lzo</code>
                  </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>zip</code>
                  </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para><code>zip</code>(1) </para>
                </entry>
                <entry>
                  <para><ulink url="http://en.wikipedia.org/wiki/Info-ZIP">InfoZIP</ulink>: DOS archive and compression tool </para>
                </entry>
                <entry>
                  <para>
                    <code>.zip</code>
                  </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>unzip</code>
                  </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para><code>unzip</code>(1) </para>
                </entry>
                <entry>
                  <para><ulink url="http://en.wikipedia.org/wiki/Info-ZIP">InfoZIP</ulink>: DOS unarchive and decompression tool </para>
                </entry>
                <entry>
                  <para>
                    <code>.zip</code>
                  </para>
                </entry>
              </row>
            </tbody>
          </tgroup>
        </table>
        <para><inlinemediaobject><imageobject><imagedata width="15" fileref="/htdocs/rightsidebar/img/idea.png" depth="15"/></imageobject><textobject><phrase>(!)</phrase></textobject></inlinemediaobject> The gzipped <code>.tar</code> archive sometimes uses the file extension <code>.tgz</code>. </para>
        <para><inlinemediaobject><imageobject><imagedata width="15" fileref="/htdocs/rightsidebar/img/idea.png" depth="15"/></imageobject><textobject><phrase>(!)</phrase></textobject></inlinemediaobject> The <code>cp</code>, <code>scp</code> and <code>tar</code> may have some limitation for special files.  The <code>cpio</code> and <code>afio</code> are most versatile. </para>
        <para><inlinemediaobject><imageobject><imagedata width="15" fileref="/htdocs/rightsidebar/img/idea.png" depth="15"/></imageobject><textobject><phrase>(!)</phrase></textobject></inlinemediaobject> The <code>cpio</code> and <code>afio</code> commands are designed to be used with the <code>find</code> and other commands and suitable for creating backup scripts since the file selection part of the script can be tested independently. </para>
        <para><inlinemediaobject><imageobject><imagedata width="15" fileref="/htdocs/rightsidebar/img/idea.png" depth="15"/></imageobject><textobject><phrase>(!)</phrase></textobject></inlinemediaobject><code>afio</code> compresses each file in the archive.  This makes <code>afio</code> to be much safer for the file corruption than the globally compressed <code>tar</code> or <code>cpio</code> archives and to be <emphasis role="strong">the best archive engine</emphasis> for the backup script. </para>
        <para><inlinemediaobject><imageobject><imagedata width="15" fileref="/htdocs/rightsidebar/img/idea.png" depth="15"/></imageobject><textobject><phrase>(!)</phrase></textobject></inlinemediaobject> Internal structure of <ulink url="/OpenOffice">OpenOffice</ulink> data files are <code>.jar</code> file. </para>
        <para/>
      </section>
      <section>
        <title>Copy and synchronization tools</title>
        <para>Here is a summary of simple copy and backup tools available on the Debian system: </para>
        <table>
          <caption/>
          <tgroup cols="5">
            <colspec colname="xxx1"/>
            <colspec colname="xxx2"/>
            <colspec colname="xxx3"/>
            <colspec colname="xxx4"/>
            <colspec colname="xxx5"/>
            <tbody>
              <row>
                <entry>
                  <para> List of copy and synchronization tools. </para>
                </entry>
                <entry>
                  <para> 1 </para>
                </entry>
                <entry>
                  <para> 2 </para>
                </entry>
                <entry>
                  <para> 3 </para>
                </entry>
                <entry>
                  <para> </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <emphasis role="strong">package</emphasis>
                  </para>
                </entry>
                <entry>
                  <para>
                    <emphasis role="strong">popcon</emphasis>
                  </para>
                </entry>
                <entry>
                  <para>
                    <emphasis role="strong">size</emphasis>
                  </para>
                </entry>
                <entry>
                  <para>
                    <emphasis role="strong">tool</emphasis>
                  </para>
                </entry>
                <entry>
                  <para>
                    <emphasis role="strong">function</emphasis>
                  </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>coreutils</code>
                  </para>
                </entry>
                <entry>
                  <para> 37945 </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> GNU cp </para>
                </entry>
                <entry>
                  <para> Locally copy files and directories ("-a" for recursive). </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>openssh-client</code>
                  </para>
                </entry>
                <entry>
                  <para> 29037 </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> scp </para>
                </entry>
                <entry>
                  <para> Remotely copy files and directories (client). "-r" for recursive. </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>openssh-server</code>
                  </para>
                </entry>
                <entry>
                  <para> 22918 </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> sshd </para>
                </entry>
                <entry>
                  <para> Remotely copy files and directories (remote server). </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>rsync</code>
                  </para>
                </entry>
                <entry>
                  <para> 6383 </para>
                </entry>
                <entry>
                  <para> Rsync </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> 1-way remote synchronization and backup. </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>unison</code>
                  </para>
                </entry>
                <entry>
                  <para> 634 </para>
                </entry>
                <entry>
                  <para> Unison </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> 2-way remote synchronization and backup. </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>pdumpfs</code>
                  </para>
                </entry>
                <entry>
                  <para> 51 </para>
                </entry>
                <entry>
                  <para> pdumpfs </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> Daily local backup using hardlinks, similar to Plan9's <code>dumpfs</code>. </para>
                </entry>
              </row>
            </tbody>
          </tgroup>
        </table>
        <para/>
        <para/>
        <para><inlinemediaobject><imageobject><imagedata width="16" fileref="/htdocs/rightsidebar/img/icon-info.png" depth="16"/></imageobject><textobject><phrase>{i}</phrase></textobject></inlinemediaobject> Execution of the <code>bkup</code> script mentioned in @{@acopyscriptforthedatabackup@}@ with the "<code>-gl</code>" option under <code>cron</code>(8) should provide very similar functionality as <code>pdumpfs</code> for the static data archive. </para>
        <para><inlinemediaobject><imageobject><imagedata width="16" fileref="/htdocs/rightsidebar/img/icon-info.png" depth="16"/></imageobject><textobject><phrase>{i}</phrase></textobject></inlinemediaobject> Version control system (VCS) tools in @{@listofversioncontrolsystemtools@}@ can function as the multi-way copy and synchronization tools. </para>
        <para/>
      </section>
      <section>
        <title>Idioms for the archive</title>
        <para>Here are several ways to archive and unarchive the entire contents of the directory <code>/source</code>. </para>
        <para>With GNU <code>tar</code>: </para>
        <screen><![CDATA[$ tar cvzf archive.tar.gz /source
$ tar xvzf archive.tar.gz
]]></screen>
        <para>With <code>cpio</code>: </para>
        <screen><![CDATA[$ find /source -xdev -print0 | cpio -ov --null > archive.cpio; gzip archive.cpio
$ zcat archive.cpio.gz | cpio -i
]]></screen>
        <para>With <code>afio</code>: </para>
        <screen><![CDATA[$ find /source -xdev -print0 | afio -ovZ0 archive.afio
$ afio -ivZ archive.afio
]]></screen>
        <para/>
      </section>
      <section>
        <title>Idioms for the copy</title>
        <para>Here are several ways to copy the entire contents of the directory </para>
        <itemizedlist>
          <listitem>
            <para>from <code>/source</code> to <code>/dest</code> , and </para>
          </listitem>
          <listitem>
            <para>from <code>/source</code> at local to <code>/dest</code> at <code>user@host.dom</code>. </para>
          </listitem>
        </itemizedlist>
        <para>With GNU <code>cp</code> and openSSH <code>scp</code>: </para>
        <screen><![CDATA[# cp -a /source /dest
# scp -pr /source user@host.dom:/dest
]]></screen>
        <para>With GNU <code>tar</code>: </para>
        <screen><![CDATA[# (cd /source && tar cf - . ) | (cd /dest && tar xvfp - )
# (cd /source && tar cf - . ) | ssh user@host.dom '(cd /dest && tar xvfp - )'
]]></screen>
        <para>With <code>cpio</code>: </para>
        <screen><![CDATA[# cd /source; find . -print0 | cpio -pvdm --null --sparse /dest
]]></screen>
        <para>With <code>afio</code>: </para>
        <screen><![CDATA[# cd /source; find . -print0 | afio -pv0a /dest
]]></screen>
        <para>The <code>scp</code> command can even copy files between remote hosts: </para>
        <screen><![CDATA[# scp -pr user1@host1.dom:/source user2@host2.dom:/dest
]]></screen>
        <para/>
      </section>
      <section>
        <title>Idioms for the selection of files</title>
        <para>The <code>find</code>(1) command is used to select files for archive and copy commands (see @{@idiomsforthearchive@}@ and @{@idiomsforthecopy@}@) or for the <code>xargs</code>(1) command (see @{@repeatingacommandloopingoverfiles@}@).  This can be enhanced by using its command arguments. </para>
        <para>Basic syntax of <code>find</code>(1) can be summarized as: </para>
        <itemizedlist>
          <listitem>Its conditional arguments are evaluated from left to right. </listitem>
          <listitem>This evaluation stops once its outcome is determined. </listitem>
          <listitem>
            <para>"Logical <emphasis role="strong">OR</emphasis>" (specified by "<code>-o</code>" between conditionals) has lower precedence than "logical <emphasis role="strong">AND</emphasis>" (specified by "<code>-a</code>" or nothing between conditionals). </para>
          </listitem>
          <listitem>
            <para>"Logical <emphasis role="strong">NOT</emphasis>" (specified by "<code>!</code>" before a conditional) has higher precedence than "logical <emphasis role="strong">AND</emphasis>". </para>
          </listitem>
          <listitem>
            <para>"<code>-prune</code>" always returns logical <emphasis role="strong">TRUE</emphasis> and, if it is a directory, searching of file is stopped beyond this point. </para>
          </listitem>
          <listitem>
            <para>"<code>-name</code>" matches the base of the filename with shell glob (see @{@shellglob@}@) but it also matches its initial "." with metacharacters such as "<code>*</code>" and "<code>?</code>". (New <ulink url="http://en.wikipedia.org/wiki/POSIX">POSIX</ulink> feature) </para>
          </listitem>
          <listitem>
            <para>"<code>-regex</code>" matches the full path with emacs style <emphasis role="strong">BRE</emphasis> (see @{@regularexpressions@}@) as default. </para>
          </listitem>
          <listitem>
            <para>"<code>-size</code>" matches the file based on the file size (value precedented with "<code>+</code>" for larger, precedented with "<code>-</code>" for smaller) </para>
          </listitem>
          <listitem>
            <para>"<code>-newer</code>" matches the file newer than the one specified in its argument. </para>
          </listitem>
          <listitem>
            <para>"<code>-print0</code>" always returns logical <emphasis role="strong">TRUE</emphasis> and print the full filename (null-terminated) on the standard output. </para>
          </listitem>
        </itemizedlist>
        <para>This <code>find</code>(1) command is often used with an idiomatic style.  For example: </para>
        <screen><![CDATA[# find /path/to \
    -xdev -regextype posix-extended \
    -type f -regex ".*\.afio|.*~" -prune -o \
    -type d -regex ".*/\.git" -prune -o \
    -type f -size +99M -prune -o \
    -type f -newer /path/to/timestamp -print0
]]></screen>
        <para>This means to do following actions: </para>
        <itemizedlist>
          <listitem>
            <para>search all files starting from "<code>/path/to</code>" </para>
          </listitem>
          <listitem>
            <para>globally limit its search within its starting filesystem and uses <emphasis role="strong">ERE</emphasis> (see @{@regularexpressions@}@) instead, </para>
          </listitem>
          <listitem>
            <para>exclude files matching regex of "<code>.*\.afio</code>" or "<code>.*~</code>" from search by stop processing, </para>
          </listitem>
          <listitem>
            <para>exclude directories matching regex of "<code>.*/\.git</code>" from search by stop processing, </para>
          </listitem>
          <listitem>exclude files larger than 99 Megabytes (units of 1048576 bytes) from search by stop processing, and </listitem>
          <listitem>
            <para>print filenames which satisfy above search conditions and newer than "<code>/path/to/timestamp</code>". </para>
          </listitem>
        </itemizedlist>
        <para>Please note the idiomatic use of "<code>-prune -o</code>" to exclude files in the above example. </para>
        <para><inlinemediaobject><imageobject><imagedata width="15" fileref="/htdocs/rightsidebar/img/idea.png" depth="15"/></imageobject><textobject><phrase>(!)</phrase></textobject></inlinemediaobject> For non-Debian unix-like system, some options may not be supported for <code>find</code>(1). In such a case, please consider to adjust matching methods and replace "<code>-print0</code>" with "<code>-print</code>".  You may need to adjust related commands too. </para>
        <para/>
      </section>
      <section>
        <title>Backup and recovery</title>
        <para>We all know that computers fail sometime or human errors cause system and data damages.  Backup and recovery operations are the essential part of successful system administration.  All possible failure modes will hit you some day. </para>
        <para>There are 3 key factors which determine actual backup and recovery policy: </para>
        <orderedlist numeration="arabic">
          <listitem>Knowing what to backup and recover. <itemizedlist><listitem><para>Data files directly created by you: data in <code>/$HOME/</code> </para></listitem><listitem><para>Data files created by applications used by you: data in <code>/var/</code> (except <code>/var/cache/</code>, <code>/var/run/</code>, and <code>/var/tmp/</code>). </para></listitem><listitem><para>System configuration files: data in <code>/etc/</code> </para></listitem><listitem><para>Local softwares: data in <code>/usr/local/</code> or <code>/opt/</code> </para></listitem><listitem>System installation information: a memo in plain text on key steps (partition, ...). </listitem><listitem>Proven set of data: experimenting with recovery operations in advance. </listitem></itemizedlist></listitem>
          <listitem>Knowing how to backup and recover. <itemizedlist><listitem>Secure storage of data: protection from overwrite and system failure. </listitem><listitem>Frequent backup: scheduled backup. </listitem><listitem>Redundant backup: data mirroring. </listitem><listitem>Fool proof process: easy single command backup. </listitem></itemizedlist></listitem>
          <listitem>Assessing risks and costs involved. <itemizedlist><listitem>Failure mode and their possibility. </listitem><listitem>Value of data when lost. </listitem><listitem>Required resources for backup: human, hardware, software, ... </listitem></itemizedlist></listitem>
        </orderedlist>
        <para>As for secure storage of data, data should be at least on different disk partitions preferably on different disks and machines to withstand the filesystem corruption.  Important data are best stored on a write-once media such as CD/DVD-R to prevent overwrite accidents.  (See @{@thebinarydata@}@ for how to write to the storage media from the shell commandline.  Gnome desktop GUI environment gives you easy access via menu: "Places-&gt;CD/DVD Creator".) </para>
        <para><inlinemediaobject><imageobject><imagedata width="15" fileref="/htdocs/rightsidebar/img/idea.png" depth="15"/></imageobject><textobject><phrase>(!)</phrase></textobject></inlinemediaobject> You may wish to stop some application daemons such as MTA (see @{@mta@}@) while backing up data. </para>
        <para><inlinemediaobject><imageobject><imagedata width="15" fileref="/htdocs/rightsidebar/img/idea.png" depth="15"/></imageobject><textobject><phrase>(!)</phrase></textobject></inlinemediaobject> You should pay extra care to the backup and restoration of identity related data files such as <code>/etc/ssh/ssh_host_dsa_key</code>, <code>/etc/ssh/ssh_host_rsa_key</code>, <code>$HOME/.gnupg/*</code>, <code>$HOME/.ssh/*</code>, <code>/etc/passwd</code>, <code>/etc/shadow</code>, <code>/etc/fetchmailrc</code>, <code>popularity-contest.conf</code>, <code>/etc/ppp/pap-secrets</code>, and <code>/etc/exim4/passwd.client</code>.  Some of these data can not be regenerated by entering the same input string to the system. </para>
        <para><inlinemediaobject><imageobject><imagedata width="15" fileref="/htdocs/rightsidebar/img/idea.png" depth="15"/></imageobject><textobject><phrase>(!)</phrase></textobject></inlinemediaobject> If you run a cron job as a user process, you need to restart it after the system restoration.  See @{@scheduletasksregularly@}@ for <code>cron</code>(8) and <code>crontab</code>(1). </para>
        <para/>
      </section>
      <section>
        <title>Backup utility suites</title>
        <para>Here is a select list of notable backup utility suites available on the Debian system: </para>
        <table>
          <caption/>
          <tgroup cols="4">
            <colspec colname="xxx1"/>
            <colspec colname="xxx2"/>
            <colspec colname="xxx3"/>
            <colspec colname="xxx4"/>
            <tbody>
              <row>
                <entry>
                  <para> List of backup suite utilities. </para>
                </entry>
                <entry>
                  <para> 1 </para>
                </entry>
                <entry>
                  <para> 2 </para>
                </entry>
                <entry>
                  <para> 3 </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <emphasis role="strong">package</emphasis>
                  </para>
                </entry>
                <entry>
                  <para>
                    <emphasis role="strong">popcon</emphasis>
                  </para>
                </entry>
                <entry>
                  <para>
                    <emphasis role="strong">size</emphasis>
                  </para>
                </entry>
                <entry>
                  <para>
                    <emphasis role="strong">description</emphasis>
                  </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>sbackup</code>
                  </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> Simple Backup Suite for Gnome desktop </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>keep</code>
                  </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> backup system for KDE </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>rdiff-backup</code>
                  </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> remote incremental backup </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>backupninja</code>
                  </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> lightweight, extensible <emphasis role="strong">meta-backup</emphasis> system </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>mondo</code>
                  </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para><ulink url="http://en.wikipedia.org/wiki/Mondo_Rescue">Mondo Rescue</ulink>: disaster recovery backup suite </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>bacula-common</code>
                  </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para><ulink url="http://en.wikipedia.org/wiki/Bacula">Bacula</ulink>: network backup, recovery and verification - common support files </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>bacula-client</code>
                  </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para><ulink url="http://en.wikipedia.org/wiki/Bacula">Bacula</ulink>: network backup, recovery and verification - client meta-package </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>bacula-console</code>
                  </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para><ulink url="http://en.wikipedia.org/wiki/Bacula">Bacula</ulink>: network backup, recovery and verification - text console </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>bacula-server</code>
                  </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para><ulink url="http://en.wikipedia.org/wiki/Bacula">Bacula</ulink>: network backup, recovery and verification - server meta-package </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>amanda-common</code>
                  </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para><ulink url="http://en.wikipedia.org/wiki/Advanced_Maryland_Automatic_Network_Disk_Archiver">Amanda</ulink>: Advanced Maryland Automatic Network Disk Archiver (Libs) </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>amanda-client</code>
                  </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para><ulink url="http://en.wikipedia.org/wiki/Advanced_Maryland_Automatic_Network_Disk_Archiver">Amanda</ulink>: Advanced Maryland Automatic Network Disk Archiver (Client) </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>amanda-server</code>
                  </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para><ulink url="http://en.wikipedia.org/wiki/Advanced_Maryland_Automatic_Network_Disk_Archiver">Amanda</ulink>: Advanced Maryland Automatic Network Disk Archiver (Server) </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>cdrw-taper</code>
                  </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> taper replacement for <ulink url="http://en.wikipedia.org/wiki/Advanced_Maryland_Automatic_Network_Disk_Archiver">Amanda</ulink> to support backups to CD-RW or DVD+RW </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>backuppc</code>
                  </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para><ulink url="http://en.wikipedia.org/wiki/Backuppc">BackupPC</ulink> is a high-performance, enterprise-grade system for backing up PCs (disk based) </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>backup-manager</code>
                  </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> command-line backup tool </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>backup2l</code>
                  </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> low-maintenance backup/restore tool for mountable media (disk based) </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>faubackup</code>
                  </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> backup system using a filesystem for storage (disk based) </para>
                </entry>
              </row>
            </tbody>
          </tgroup>
        </table>
        <para>The <code>sbackup</code> and <code>keep</code> packages provide easy GUI access to regular backups of user data for desktop users. An equivalent function can be realized by a simple script (@{@anexamplescriptforthesystembackup@}@) and <code>cron</code>(8). </para>
        <para><ulink url="http://en.wikipedia.org/wiki/Mondo_Rescue">Mondo Rescue</ulink> facilitates restoration of complete system from backup CD/DVD etc. without going through normal system installation processes. </para>
        <para><ulink url="http://en.wikipedia.org/wiki/Bacula">Bacula</ulink>, <ulink url="http://en.wikipedia.org/wiki/Advanced_Maryland_Automatic_Network_Disk_Archiver">Amanda</ulink>, and <ulink url="http://en.wikipedia.org/wiki/Backuppc">BackupPC</ulink> are full featured backup suite utilities which are focused on regular backups over network. </para>
        <para/>
      </section>
      <section>
        <title>An example script for the system backup</title>
        <para>For a personal Debian desktop system running <code>unstable</code> suite, I only need to protect personal and critical data.  I reinstall system once a year anyway.  Thus I see no reason to backup the whole system or to install a full featured backup utility. </para>
        <para>I use a simple script to make a backup archive and burn it into CD/DVD using GUI.  Here is an example script for this. </para>
        <screen><![CDATA[#!/bin/sh -e
# Copyright (C) 2007-2008 Osamu Aoki <osamu@debian.org>, Public Domain
BUUID=1000; USER=osamu # UID and name of a user who accesses backup files
BUDIR="/var/backups"
XDIR0=".+/Mail|.+/Desktop"
XDIR1=".+/\.thumbnails|.+/\.?Trash|.+/\.?[cC]ache|.+/\.gvfs|.+/sessions"
XDIR2=".+/CVS|.+/\.git|.+/\.svn|.+/Downloads|.+/Archive|.+/Checkout|.+/tmp"
XSFX=".+\.iso|.+\.tgz|.+\.tar\.gz|.+\.tar\.bz2|.+\.afio|.+\.tmp|.+\.swp|.+~"
SIZE="+99M"
DATE=$(date --utc +"%Y%m%d-%H%M")
[ -d "$BUDIR" ] || mkdir -p "BUDIR"
umask 077
dpkg --get-selections \* > /var/lib/dpkg/dpkg-selections.list
debconf-get-selections > /var/cache/debconf/debconf-selections

{
find /etc /usr/local /opt /var/lib/dpkg/dpkg-selections.list \
     /var/cache/debconf/debconf-selections -xdev -print0
find /home/$USER /root -xdev -regextype posix-extended \
  -type d -regex "$XDIR0|$XDIR1" -prune -o -type f -regex "$XSFX" -prune -o \
  -type f -size  "$SIZE" -prune -o -print0
find /home/$USER/Mail/Inbox /home/$USER/Mail/Outbox -print0
find /home/$USER/Desktop  -xdev -regextype posix-extended \
  -type d -regex "$XDIR2" -prune -o -type f -regex "$XSFX" -prune -o \
  -type f -size  "$SIZE" -prune -o -print0
} | cpio -ov --null -O $BUDIR/BU$DATE.cpio
chown $BUUID $BUDIR/BU$DATE.cpio
touch $BUDIR/backup.stamp
]]></screen>
        <para>This is meant to be a script example executed from root: </para>
        <itemizedlist>
          <listitem>Edit this script to cover all your important data (see @{@idiomsfortheselectionoffiles@}@ and @{@backupandrecovery@}@). </listitem>
          <listitem>
            <para>Replace "<code>find ... -print0</code>" with "<code>find ... -newer $BUDIR/backup.stamp -print0</code>" to make a differential backup. </para>
          </listitem>
          <listitem>
            <para>Transfer backup files to the remote host using <code>scp</code>(1) or <code>rsync</code>(1) or burn them to CD/DVD for extra data security.  (I use Gnome desktop GUI for burning CD/DVD. See @{@shellscriptexamplewithzenity@}@ for extra redundancy.) </para>
          </listitem>
          <listitem>Keep it simple! </listitem>
        </itemizedlist>
        <para><inlinemediaobject><imageobject><imagedata width="16" fileref="/htdocs/rightsidebar/img/icon-info.png" depth="16"/></imageobject><textobject><phrase>{i}</phrase></textobject></inlinemediaobject> You can recover debconf configuration data with "<code>debconf-set-selections debconf-selections</code>" and dpkg selection data with "<code>dpkg --set-selection &lt;dpkg-selections.list</code>". </para>
        <para/>
      </section>
      <section>
        <title>A copy script for the data backup</title>
        <para>For the set of data under a directory tree, the copy with "<code>cp -a</code>" provides the normal backup. </para>
        <para>For the set of large non-overwritten static data under a directory tree such as the data under the <code>/var/cache/apt/packages/</code> directory, hardlinks with "<code>cp -al</code>" provide an alternative to the normal backup with efficient use of the disk space. </para>
        <para>Here is a copy script, which I named as <code>bkup</code>, for the data backup. This script copies all (non-VCS) files under the current directory to the dated directory on the parent directory or on a remote host. </para>
        <para/>
        <screen><![CDATA[#!/bin/sh -e
# Copyright (C) 2007-2008 Osamu Aoki <osamu@debian.org>, Public Domain
function fdot(){ find . -type d \( -iname ".?*" -o -iname "CVS" \) -prune -o -print0;}
function fall(){ find . -print0;}
function mkdircd(){ mkdir -p "$1";chmod 700 "$1";cd "$1">/dev/null;}
FIND="fdot";OPT="-a";MODE="CPIOP";HOST="localhost";EXTP="$(hostname -f)"
BKUP="$(basename $(pwd)).bkup";TIME="$(date  +%Y%m%d-%H%M%S)";BU="$BKUP/$TIME"
while getopts gcCsStrlLaAxe:h:T f; do case $f in
g)  MODE="GNUCP";; # cp (GNU)
c)  MODE="CPIOP";; # cpio -p
C)  MODE="CPIOI";; # cpio -i
s)  MODE="CPIOSSH";; # cpio/ssh
S)  MODE="AFIOSSH";; # afio/ssh
t)  MODE="TARSSH";; # tar/ssh
r)  MODE="RSYNCSSH";; # rsync/ssh
l)  OPT="-alv";; # hardlink (GNU cp)
L)  OPT="-av";;  # copy (GNU cp)
a)  FIND="fall";; # find all
A)  FIND="fdot";; # find non CVS/ .???/
x)  set -x;; # trace
e)  EXTP="${OPTARG}";; # hostname -f
h)  HOST="${OPTARG}";; # user@remotehost.example.com
T)  MODE="TEST";; # test find mode
\?) echo "use -x for trace."
esac; done
shift $(expr $OPTIND - 1)
if [ $# -gt 0 ]; then
  for x in $@; do cp $OPT $x $x.$TIME; done
elif [ $MODE = GNUCP ]; then
  mkdir -p "../$BU";chmod 700 "../$BU";cp $OPT . "../$BU/"
elif [ $MODE = CPIOP ]; then
  mkdir -p "../$BU";chmod 700 "../$BU"
  $FIND|cpio --null --sparse -pvd ../$BU
elif [ $MODE = CPIOI ]; then
  $FIND|cpio -ov --null | ( mkdircd "../$BU"&&cpio -i )
elif [ $MODE = CPIOSSH ]; then
  $FIND|cpio -ov --null|ssh -C $HOST "( mkdircd \"$EXTP/$BU\"&&cpio -i )"
elif [ $MODE = AFIOSSH ]; then
  $FIND|afio -ov -0 -|ssh -C $HOST "( mkdircd \"$EXTP/$BU\"&&afio -i - )"
elif [ $MODE = TARSSH ]; then
  (tar cvf - . )|ssh -C $HOST "( mkdircd \"$EXTP/$BU\"&& tar xvfp - )"
elif [ $MODE = RSYNCSSH ]; then
  rsync -rlpt ./ "${HOST}:${EXTP}-${BKUP}-${TIME}"
else
  echo "Any other idea to backup?"
  $FIND |xargs -0 -n 1 echo
fi
]]></screen>
        <para>This is meant to be command examples.  Please read script and test it by yourself. </para>
        <para><inlinemediaobject><imageobject><imagedata width="16" fileref="/htdocs/rightsidebar/img/icon-info.png" depth="16"/></imageobject><textobject><phrase>{i}</phrase></textobject></inlinemediaobject> I keep this <code>bkup</code> in my <code>/usr/local/bin/</code> directory.  I issue <code>bkup</code> command without any option in the working directory whenever I need a temporary snapshot backup. </para>
        <para><inlinemediaobject><imageobject><imagedata width="16" fileref="/htdocs/rightsidebar/img/icon-info.png" depth="16"/></imageobject><textobject><phrase>{i}</phrase></textobject></inlinemediaobject> For making snapshot history of a source file tree or a configuration file tree, it is easier and space efficient to use <code>git</code>(7) (see @{@gitforrecordingcigurationhistory@}@). </para>
        <para/>
      </section>
      <section>
        <title>Removable mass storage device</title>
        <para>Removable mass storage devices may be any one of </para>
        <itemizedlist>
          <listitem>harddisk, </listitem>
          <listitem>any format of flash memory devices, or </listitem>
          <listitem>digital camera, </listitem>
        </itemizedlist>
        <para>which are connected via <ulink url="http://en.wikipedia.org/wiki/Universal_Serial_Bus">USB</ulink>, <ulink url="http://en.wikipedia.org/wiki/IEEE_1394_interface">IEEE 1394 / Firewire</ulink>, <ulink url="http://en.wikipedia.org/wiki/PC_card">PC Card</ulink>, etc. </para>
        <para>These removable mass storage devices can be automatically mounted as a user under modern desktop environment, such as Gnome using <code>gnome-mount</code>(1).   </para>
        <itemizedlist>
          <listitem>
            <para>Mount point under Gnome is chosen as <code>/media/&lt;disk_label&gt;</code> which can be customized  </para>
            <itemizedlist>
              <listitem>
                <para>by the <code>mlabel</code>(1) command for FAT filesystem, </para>
              </listitem>
              <listitem>
                <para>by the <code>genisoimage</code>(1) command with "<code>-V</code>" option for ISO9660 filesystem, and  </para>
              </listitem>
              <listitem>
                <para>by the <code>tune2fs</code>(1) command with "<code>-L</code>" option for ext2/ext3 filesystem.   </para>
              </listitem>
            </itemizedlist>
          </listitem>
          <listitem>The choice of encoding may need to be provided as mount option (see @{@filenameencoding@}@). </listitem>
          <listitem>The ownership of the mounted filesystem may need to be adjusted for use by the normal user.  </listitem>
        </itemizedlist>
        <para><inlinemediaobject><imageobject><imagedata width="16" fileref="/htdocs/rightsidebar/img/icon-info.png" depth="16"/></imageobject><textobject><phrase>{i}</phrase></textobject></inlinemediaobject> When providing wrong mount option causes problem, erase its corresponding setting under <code>/system/storage/</code> via <code>gconf-editor</code>(1). </para>
        <para><inlinemediaobject><imageobject><imagedata width="15" fileref="/htdocs/rightsidebar/img/idea.png" depth="15"/></imageobject><textobject><phrase>(!)</phrase></textobject></inlinemediaobject> Automounting under modern desktop environment happens only when those removable media devices are not listed in <code>/etc/fstab</code>. </para>
        <table>
          <caption/>
          <tgroup cols="4">
            <colspec colname="xxx1"/>
            <colspec colname="xxx2"/>
            <colspec colname="xxx3"/>
            <colspec colname="xxx4"/>
            <tbody>
              <row>
                <entry>
                  <para> List of packages which permit normal users to mount removable devices without a matching <code>/etc/fstab</code> entry. </para>
                </entry>
                <entry>
                  <para> 1 </para>
                </entry>
                <entry>
                  <para> 2 </para>
                </entry>
                <entry>
                  <para> 3 </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <emphasis role="strong">package</emphasis>
                  </para>
                </entry>
                <entry>
                  <para>
                    <emphasis role="strong">popcon</emphasis>
                  </para>
                </entry>
                <entry>
                  <para>
                    <emphasis role="strong">size</emphasis>
                  </para>
                </entry>
                <entry>
                  <para>
                    <emphasis role="strong">description</emphasis>
                  </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>gnome-mount</code>
                  </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> wrapper for (un)mounting and ejecting storage devices (used by Gnome) </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>pmount</code>
                  </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> mount removable devices as normal user (used by KDE) </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>cryptmount</code>
                  </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> Management and user-mode mounting of encrypted file systems </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>usbmount</code>
                  </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> automatically mount and unmount USB mass storage devices </para>
                </entry>
              </row>
            </tbody>
          </tgroup>
        </table>
        <para>When sharing data with other system via removable mass storage device, you should format it with common <ulink url="http://en.wikipedia.org/wiki/File_system">filesystem</ulink> supported by both systems. Here is a list of filesystem choices. </para>
        <table>
          <caption/>
          <tgroup cols="2">
            <colspec colname="xxx1"/>
            <colspec colname="xxx2"/>
            <tbody>
              <row>
                <entry>
                  <para> List of filesystem choices for removable storage devices with typical usage scenarios. </para>
                </entry>
                <entry>
                  <para> </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <emphasis role="strong">filesystem</emphasis>
                  </para>
                </entry>
                <entry>
                  <para>
                    <emphasis role="strong">typical usage scenario</emphasis>
                  </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <ulink url="http://en.wikipedia.org/wiki/File_allocation_table">FAT12</ulink>
                  </para>
                </entry>
                <entry>
                  <para> Cross platform sharing of data on the floppy disk. (&lt;=32MiB) </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <ulink url="http://en.wikipedia.org/wiki/File_allocation_table">FAT16</ulink>
                  </para>
                </entry>
                <entry>
                  <para> Cross platform sharing of data on the small harddisk like device. (&lt;=2GiB) </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <ulink url="http://en.wikipedia.org/wiki/File_allocation_table">FAT32</ulink>
                  </para>
                </entry>
                <entry>
                  <para> Cross platform sharing of data on the large harddisk like device. (&lt;=8TiB, supported by newer than MS Windows95 OSR2) </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <ulink url="http://en.wikipedia.org/wiki/NTFS">NTFS</ulink>
                  </para>
                </entry>
                <entry>
                  <para> Cross platform sharing of data on the large harddisk like device. (supported natively on <ulink url="http://en.wikipedia.org/wiki/Windows_NT">MS Windows NT</ulink> and later version, and supported by <ulink url="http://en.wikipedia.org/wiki/NTFS-3G">NTFS-3G</ulink> via <ulink url="http://en.wikipedia.org/wiki/Filesystem_in_Userspace">FUSE</ulink> on Linux) </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <ulink url="http://en.wikipedia.org/wiki/ISO_9660">ISO9660</ulink>
                  </para>
                </entry>
                <entry>
                  <para> Cross platform sharing of static data on CD-R and DVD+/-R </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <ulink url="http://en.wikipedia.org/wiki/Universal_Disk_Format">UDF</ulink>
                  </para>
                </entry>
                <entry>
                  <para> Incremental data writing on CD-R and DVD+/-R (new) </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <ulink url="http://en.wikipedia.org/wiki/Minix_file_system">MINIX filesystem</ulink>
                  </para>
                </entry>
                <entry>
                  <para> Space efficient unix file data storage on the floppy disk. </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <ulink url="http://en.wikipedia.org/wiki/Ext2">ext2 filesystem</ulink>
                  </para>
                </entry>
                <entry>
                  <para> Sharing of data on the harddisk like device with older Linux systems. </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <ulink url="http://en.wikipedia.org/wiki/Ext3">ext3 filesystem</ulink>
                  </para>
                </entry>
                <entry>
                  <para> Sharing of data on the harddisk like device with current Linux systems. (Journaling file system) </para>
                </entry>
              </row>
            </tbody>
          </tgroup>
        </table>
        <para><inlinemediaobject><imageobject><imagedata width="16" fileref="/htdocs/rightsidebar/img/icon-info.png" depth="16"/></imageobject><textobject><phrase>{i}</phrase></textobject></inlinemediaobject> See @{@removablediskencnwithdmcryptluks@}@ for cross platform sharing of data using device level encryption. </para>
        <para>The FAT filesystem is supported by almost all modern operating systems and is quite useful for the data exchange purpose via removable harddisk like media (. </para>
        <para>When formatting removable harddisk like devices for cross platform sharing of data with the FAT filesystem, the following should be safe choices: </para>
        <itemizedlist>
          <listitem>
            <para>Partitioning them with <code>fdisk</code>, <code>cfdisk</code> or <code>parted</code> command (see @{@partitionconfiguration@}@) into a single primary partition and to mark it as: </para>
            <itemizedlist>
              <listitem>type-"6" for FAT16 for media smaller than 2GB or </listitem>
              <listitem>type-"c" for FAT32 (LBA) for larger media. </listitem>
            </itemizedlist>
          </listitem>
          <listitem>
            <para>Formatting the primary partition with the <code>mkfs.vfat</code> command </para>
            <itemizedlist>
              <listitem>
                <para>with just its device name, e.g. "<code>/dev/sda1</code>" for FAT16, or </para>
              </listitem>
              <listitem>
                <para>with the explicit option and its device name, e.g. "<code>-F 32 /dev/sda1</code>" for FAT32. </para>
              </listitem>
            </itemizedlist>
          </listitem>
        </itemizedlist>
        <para>When using the FAT or ISO9660 filesystems for sharing data, the following should be the safe considerations: </para>
        <itemizedlist>
          <listitem>
            <para>Archiving files into an archive file first using the <code>tar</code>(1), <code>cpio</code>(1), or <code>afio</code>(1) command to retain the long filename, the symbolic link, the original Unix file permission and the owner information. </para>
          </listitem>
          <listitem>
            <para>Splitting the archive file size into less than 2 GiB chunks with the "<code>split</code>(1)" command to protect it from the file size limitation. </para>
          </listitem>
          <listitem>Encrypting the archive file to secure its contents from the unauthorized access. </listitem>
        </itemizedlist>
        <para><inlinemediaobject><imageobject><imagedata width="15" fileref="/htdocs/rightsidebar/img/idea.png" depth="15"/></imageobject><textobject><phrase>(!)</phrase></textobject></inlinemediaobject> For FAT filesystems by its design, the maximum file size is <code>(2^32 - 1) bytes = (4GiB - 1 byte)</code>. For some applications on the older 32 bit OSs, the maximum file size was even smaller <code>(2^31 - 1) bytes = (42GiB - 1 byte)</code>.  Debian does not suffer the latter problem. </para>
        <para><inlinemediaobject><imageobject><imagedata width="15" fileref="/htdocs/rightsidebar/img/idea.png" depth="15"/></imageobject><textobject><phrase>(!)</phrase></textobject></inlinemediaobject> Microsoft itself does not recommend to use FAT for drives or partitions of over 200 MB.  Microsoft highlights its short comings such as inefficient disk space usage in their "<ulink url="http://support.microsoft.com/kb/100108/EN-US/">Overview of FAT, HPFS, and NTFS File Systems</ulink>".  Of course for the Linux, we should normally use the ext3 filesystem. </para>
        <para><inlinemediaobject><imageobject><imagedata width="16" fileref="/htdocs/rightsidebar/img/icon-info.png" depth="16"/></imageobject><textobject><phrase>{i}</phrase></textobject></inlinemediaobject> For more on filesystems and accessing filesystems, please read "<ulink url="http://tldp.org/HOWTO/Filesystems-HOWTO.html">Filesystems HOWTO</ulink>". </para>
        <para/>
      </section>
      <section>
        <title>Sharing data via network</title>
        <para>When sharing data with other system via network, you should use common service. Here are some hints. </para>
        <table>
          <caption/>
          <tgroup cols="2">
            <colspec colname="xxx1"/>
            <colspec colname="xxx2"/>
            <tbody>
              <row>
                <entry>
                  <para> List of the network service to chose with the typical usage scenario. </para>
                </entry>
                <entry>
                  <para> </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <emphasis role="strong">network service</emphasis>
                  </para>
                </entry>
                <entry>
                  <para>
                    <emphasis role="strong">typical usage scenario</emphasis>
                  </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para><ulink url="http://en.wikipedia.org/wiki/Server_Message_Block">SMB/CIFS</ulink> network mounted filesystem with <ulink url="http://en.wikipedia.org/wiki/Samba_(software)">Samba</ulink> </para>
                </entry>
                <entry>
                  <para> Sharing files via "Microsoft Windows Network". See <code>smb.conf</code>(5) and <ulink url="http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/">The Official Samba 3.2.x HOWTO and Reference Guide</ulink> or the <code>samba-doc</code> package. </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para><ulink url="http://en.wikipedia.org/wiki/Network_File_System_(protocol)">NFS</ulink> network mounted filesystem with the Linux kernel </para>
                </entry>
                <entry>
                  <para> Sharing files via "Unix/Linux Network". See <code>exports</code>(5) and <ulink url="http://tldp.org/HOWTO/NFS-HOWTO/index.html">Linux NFS-HOWTO</ulink>. </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para><ulink url="http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol">HTTP</ulink> service </para>
                </entry>
                <entry>
                  <para> Sharing file between the web server/client. </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para><ulink url="http://en.wikipedia.org/wiki/Https">HTTPS</ulink> service </para>
                </entry>
                <entry>
                  <para> Sharing file between the web server/client with encrypted Secure Sockets Layer (SSL) or <ulink url="http://en.wikipedia.org/wiki/Transport_Layer_Security">Transport Layer Security</ulink> (TLS). </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para><ulink url="http://en.wikipedia.org/wiki/File_Transfer_Protocol">FTP</ulink> service </para>
                </entry>
                <entry>
                  <para> Sharing file between the FTP server/client. </para>
                </entry>
              </row>
            </tbody>
          </tgroup>
        </table>
        <para>Although these filesystems mounted over network or file transfer methods over network are quite convenient for sharing data, these may be insecure.  Their network connection must be secured by: </para>
        <itemizedlist>
          <listitem>
            <para>encrypting it with <ulink url="http://en.wikipedia.org/wiki/Transport_Layer_Security">SSL/TLS</ulink>, </para>
          </listitem>
          <listitem>
            <para>tunneling it via <ulink url="http://en.wikipedia.org/wiki/Secure_Shell">SSH</ulink>, </para>
          </listitem>
          <listitem>
            <para>tunneling it via <ulink url="http://en.wikipedia.org/wiki/Virtual_private_network">VPN</ulink> or, </para>
          </listitem>
          <listitem>limiting it behind the secure firewall.  </listitem>
        </itemizedlist>
        <para>See also @{@othernetworkapplicationservers@}@ and @{@othernetworkapplicationclients@}@. </para>
        <para/>
      </section>
      <section>
        <title>Archive media</title>
        <para>When choosing <ulink url="http://en.wikipedia.org/wiki/Computer_data_storage">computer data storage media</ulink> for important data archive, you should be careful about their limitations.  For small personal data back up, I use CD-R and DVD-R by the brand name company and store in a cool, dry, clean environment.  (Tape archive media seem to be popular for professional use.) </para>
        <para><inlinemediaobject><imageobject><imagedata width="15" fileref="/htdocs/rightsidebar/img/idea.png" depth="15"/></imageobject><textobject><phrase>(!)</phrase></textobject></inlinemediaobject><ulink url="http://en.wikipedia.org/wiki/Safe">A fire-resistant safe</ulink> are usually meant for paper documents.  Most of the computer data storage media have less temperature tolerance than paper. I usually rely on multiple secure encrypted copies stored in multiple secure locations. </para>
        <para>Optimistic storage life of archive media seen on the net (mostly from vendor info): </para>
        <itemizedlist>
          <listitem>100+ years : acid free paper with ink </listitem>
          <listitem>100  years : optical storage  (CD/DVD, CD/DVD-R) </listitem>
          <listitem>30  years : magnetic storage (tape, floppy) </listitem>
          <listitem>20  years : phase change optical storage (CD-RW) </listitem>
        </itemizedlist>
        <para>These do not count on the mechanical failures due to handling etc. </para>
        <para>Optimistic write cycle of archive media seen on the net (mostly from vendor info): </para>
        <itemizedlist>
          <listitem>250,000+ cycles : Harddisk drive </listitem>
          <listitem>10,000+ cycles : Flash memory </listitem>
          <listitem>1,000  cycles : CD/DVD-RW </listitem>
          <listitem>1  cycles : CD/DVD-R, paper </listitem>
        </itemizedlist>
        <para><inlinemediaobject><imageobject><imagedata width="15" fileref="/htdocs/rightsidebar/img/attention.png" depth="15"/></imageobject><textobject><phrase>&lt;!&gt;</phrase></textobject></inlinemediaobject> Figures of storage life and write cycle here should not be used for decisions on any critical data storage.   Please consult the specific product information provided by the manufacture. </para>
        <para><inlinemediaobject><imageobject><imagedata width="16" fileref="/htdocs/rightsidebar/img/icon-info.png" depth="16"/></imageobject><textobject><phrase>{i}</phrase></textobject></inlinemediaobject> Since CD/DVD-R and paper have only 1 write cycle, they inherently prevent accidental data loss by overwriting.  This is advantage! </para>
        <para><inlinemediaobject><imageobject><imagedata width="16" fileref="/htdocs/rightsidebar/img/icon-info.png" depth="16"/></imageobject><textobject><phrase>{i}</phrase></textobject></inlinemediaobject> If you need fast and frequent backup of large amount of data, a harddisk on a remote host linked by a fast network connection, may be the only realistic option. </para>
        <para/>
      </section>
    </section>
    <section>
      <title>The binary data</title>
      <para>Here, we discuss direct manipulation of the binary data on storage media.  See @{@datastoragetips@}@, too. </para>
      <para/>
      <section>
        <title>Make the disk image file</title>
        <para>The disk image file, <code>disk.img</code>, of an unmounted device, e.g., the second SCSI drive <code>/dev/sdb</code>, can be made using <code>cp</code>(1) or <code>dd</code>(1): </para>
        <screen><![CDATA[# cp /dev/sda disk.img
# dd if=/dev/sda of=disk.img
]]></screen>
        <para>The disk image of the traditional PC's <ulink url="http://en.wikipedia.org/wiki/Master_boot_record">master boot record (MBR)</ulink> (see @{@partitionconfiguration@}@) which reside on the first sector on the primary IDE disk partial disk can be made by using <code>dd</code>(1): </para>
        <screen><![CDATA[# dd if=/dev/hda of=mbr.img bs=512 count=1
# dd if=/dev/hda of=mbr-nopart.img bs=446 count=1
# dd if=/dev/hda of=mbr-part.img skip=446 bs=1 count=66
]]></screen>
        <itemizedlist>
          <listitem>
            <para><code>mbr.img</code> : the MBR with the partition table. </para>
          </listitem>
          <listitem>
            <para><code>mbr-nopart.img</code> : the MBR without the partition table. </para>
          </listitem>
          <listitem>
            <para><code>part.img</code> : the partition table of the MBR only.. </para>
          </listitem>
        </itemizedlist>
        <para>If you have a SCSI device (including the new serial ATA drive) as the boot disk, substitute "<code>/dev/hda</code>" with "<code>/dev/sda</code>". </para>
        <para>If you are making an image of a disk partition of the original disk, substitute "<code>/dev/hda</code>" with "<code>/dev/hda1</code>" etc. </para>
        <para/>
      </section>
      <section>
        <title>Writing directly to the disk</title>
        <para>The disk image file, <code>disk.img</code> can be written to an unmounted device, e.g., the second SCSI drive <code>/dev/sdb</code> with matching size, by <code>dd</code>(1): </para>
        <screen><![CDATA[# dd if=disk.img of=/dev/sda
]]></screen>
        <para>Similarly, the disk partition image file, <code>disk.img</code> can be written to an unmounted partition, e.g., the first partition of the second SCSI drive <code>/dev/sdb1</code> with matching size, by <code>dd</code>(1): </para>
        <screen><![CDATA[# dd if=disk.img of=/dev/sda1
]]></screen>
        <para/>
      </section>
      <section>
        <title>View and edit binary data</title>
        <para>The most basic viewing method of binary data is to use "<code>od -t x1</code>" command. </para>
        <table>
          <caption/>
          <tgroup cols="4">
            <colspec colname="xxx1"/>
            <colspec colname="xxx2"/>
            <colspec colname="xxx3"/>
            <colspec colname="xxx4"/>
            <tbody>
              <row>
                <entry>
                  <para> List of packages which view and edit binary data. </para>
                </entry>
                <entry>
                  <para> 1 </para>
                </entry>
                <entry>
                  <para> 2 </para>
                </entry>
                <entry>
                  <para> 3 </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <emphasis role="strong">package</emphasis>
                  </para>
                </entry>
                <entry>
                  <para>
                    <emphasis role="strong">popcon</emphasis>
                  </para>
                </entry>
                <entry>
                  <para>
                    <emphasis role="strong">size</emphasis>
                  </para>
                </entry>
                <entry>
                  <para>
                    <emphasis role="strong">description</emphasis>
                  </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>coreutils</code>
                  </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> This basic package has <code>od</code>(1) command to dump files in octal and other formats. </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>bsdmainutils</code>
                  </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> This utility package has <code>hd</code>(1) command to dump files in ASCII, decimal, hexadecimal, and octal formats. </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>hexedit</code>
                  </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> View and edit files in hexadecimal or in ASCII </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>bless</code>
                  </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> Full featured hexadecimal editor (Gnome) </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>khexedit</code>
                  </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> Full featured hexadecimal editor (KDE). </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>ncurses-hexedit</code>
                  </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> Edit files/disks in HEX, ASCII and EBCDIC </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>lde</code>
                  </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> Linux Disk Editor </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>beav</code>
                  </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> Binary editor and viewer for HEX, ASCII, EBCDIC, OCTAL, DECIMAL, and BINARY formats. </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>hexcat</code>
                  </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> Hexadecimal dumping utility </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>hex</code>
                  </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> Hexadecimal dumping tool for Japanese </para>
                </entry>
              </row>
            </tbody>
          </tgroup>
        </table>
        <para><inlinemediaobject><imageobject><imagedata width="16" fileref="/htdocs/rightsidebar/img/icon-info.png" depth="16"/></imageobject><textobject><phrase>{i}</phrase></textobject></inlinemediaobject> HEX is used as an acronym for hexadecimal format. </para>
        <para/>
      </section>
      <section>
        <title>Mount the disk image file</title>
        <para>If <code>disk.img</code> contains an image of the disk contents and the original disk had a disk configuration which gives xxxx = (bytes/sector) * (sectors/cylinder), then the following will mount it to <code>/mnt</code>: </para>
        <para/>
        <screen><![CDATA[# mount -o loop,offset=xxxx disk.img /mnt
]]></screen>
        <para>Note that most hard disks have 512 bytes/sector.  This offset is to skip MBR of the hard disk. You can skip offset in the above example, if <code>disk.img</code> contains </para>
        <itemizedlist>
          <listitem>only an image of a disk partition of the original hard disk, or </listitem>
          <listitem>only an image of the original floppy disk. </listitem>
        </itemizedlist>
        <para/>
      </section>
      <section>
        <title>Manipulating files without mounting disk</title>
        <para>There are tools to write files without mounting disk. </para>
        <table>
          <caption/>
          <tgroup cols="4">
            <colspec colname="xxx1"/>
            <colspec colname="xxx2"/>
            <colspec colname="xxx3"/>
            <colspec colname="xxx4"/>
            <tbody>
              <row>
                <entry>
                  <para> List of packages to manipulate files without mounting. </para>
                </entry>
                <entry>
                  <para> 1 </para>
                </entry>
                <entry>
                  <para> 2 </para>
                </entry>
                <entry>
                  <para> 3 </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <emphasis role="strong">package</emphasis>
                  </para>
                </entry>
                <entry>
                  <para>
                    <emphasis role="strong">popcon</emphasis>
                  </para>
                </entry>
                <entry>
                  <para>
                    <emphasis role="strong">size</emphasis>
                  </para>
                </entry>
                <entry>
                  <para>
                    <emphasis role="strong">description</emphasis>
                  </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>mtools</code>
                  </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> Utilities for MSDOS files without mounting them. </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>hfsutils</code>
                  </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> Utilities for HFS and HFS+ files without mounting them. </para>
                </entry>
              </row>
            </tbody>
          </tgroup>
        </table>
        <para/>
      </section>
      <section>
        <title>Make the ISO9660 image file</title>
        <para>The <ulink url="http://en.wikipedia.org/wiki/ISO_9660">ISO9660</ulink> image file, <code>cd.iso</code>, from the source directory tree at <code>source_directory</code> can be made using <code>genisoimage</code>(1) command: </para>
        <screen><![CDATA[#  genisoimage -r -J -T -V volume_id -o cd.iso source_directory
]]></screen>
        <para>Similary, the bootable ISO9660 image file, <code>cdboot.iso</code>, can be made from <code>debian-installer</code> like directory tree at <code>source_directory</code>: </para>
        <screen><![CDATA[#  genisoimage -r -o cdboot.iso -V volume_id \
   -b isolinux/isolinux.bin -c isolinux/boot.cat \
   -no-emul-boot -boot-load-size 4 -boot-info-table source_directory
]]></screen>
        <para>Here <ulink url="http://en.wikipedia.org/wiki/SYSLINUX">Isolinux boot loader</ulink> (see @{@stagecthebootloader@}@) is used for booting. </para>
        <para>To make the disk image directly from the CD-ROM device using <code>cp</code>(1) or <code>dd</code>(1) has a few problems. The first run of the <code>dd</code>(1) command may cause an error message and may yield a shorter disk image with a lost tail-end. The second run of the <code>dd</code>(1) command may yield a larger disk image with garbage data attached at the end on some systems if the data size is not specified. Only the second run of the <code>dd</code>(1) command with the correct data size specified, and without ejecting the CD after an error message, seems to avoid these problems. If for example the image size displayed by <code>df</code>(1) is 46301184 blocks, use the following command twice to get the right image (this is my empirical information): </para>
        <screen><![CDATA[# dd if=/dev/cdrom of=cd.iso bs=2048 count=$((46301184/2))
]]></screen>
        <para/>
      </section>
      <section>
        <title>Writing directly to the CD/DVD-R/RW</title>
        <para><inlinemediaobject><imageobject><imagedata width="16" fileref="/htdocs/rightsidebar/img/icon-info.png" depth="16"/></imageobject><textobject><phrase>{i}</phrase></textobject></inlinemediaobject> DVD is only a large CD to <code>wodim</code>(1). </para>
        <para>You can find a usable device by: </para>
        <screen><![CDATA[# wodim --devices
]]></screen>
        <para>Then the blank CD-R is inserted to the device, and the ISO9660 image file, <code>cd.iso</code> is written to this device, e.g., <code>/dev/hda</code>, by <code>wodim</code>(1): </para>
        <screen><![CDATA[# wodim -v -eject dev=/dev/hda cd.iso
]]></screen>
        <para>If CD-RW is used instead of CD-R, do this instead: </para>
        <screen><![CDATA[# wodim -v -eject blank=fast dev=/dev/hda cd.iso
]]></screen>
        <para><inlinemediaobject><imageobject><imagedata width="16" fileref="/htdocs/rightsidebar/img/icon-info.png" depth="16"/></imageobject><textobject><phrase>{i}</phrase></textobject></inlinemediaobject> If your desktop system mounts CD automatically, unmount it before issuing the <code>wodim</code>(1) command by "<code>sudo unmount /dev/hda</code>". </para>
        <para/>
      </section>
      <section>
        <title>Mount the ISO9660 image file</title>
        <para>If <code>cd.iso</code> contains an ISO9660 image, then the following will manually mount it to <code>/cdrom</code>: </para>
        <para/>
        <screen><![CDATA[# mount -t iso9660 -o ro,loop cd.iso /cdrom
]]></screen>
        <para><inlinemediaobject><imageobject><imagedata width="16" fileref="/htdocs/rightsidebar/img/icon-info.png" depth="16"/></imageobject><textobject><phrase>{i}</phrase></textobject></inlinemediaobject> Modern desktop system mounts removable media automatically (see @{@removablemassstoragedevice@}@). </para>
        <para/>
      </section>
      <section>
        <title>Split a large file into small files</title>
        <para>When a data is too big to backup, you can back up a large file into, e.g. 2000MiB chunks and merge those files into a large file. </para>
        <screen><![CDATA[$ split -b 2000m large_file
$ cat x* >large_file
]]></screen>
        <para><inlinemediaobject><imageobject><imagedata width="15" fileref="/htdocs/rightsidebar/img/attention.png" depth="15"/></imageobject><textobject><phrase>&lt;!&gt;</phrase></textobject></inlinemediaobject> Please make sure you do not have any file starting with "<code>x</code>" to avoid the file name crash. </para>
        <para/>
      </section>
      <section>
        <title>Clear file contents</title>
        <para>In order to clear the contents of a file such as a log file, do not use <code>rm</code> to delete the file and then create a new empty file, because the file may still be accessed in the interval between commands.  The following is the safe way to clear the contents of the file. </para>
        <screen><![CDATA[$ :>file_to_be_cleared
]]></screen>
        <para/>
      </section>
      <section>
        <title>Dummy files</title>
        <para>The following commands will create dummy or empty files: </para>
        <screen><![CDATA[$ dd if=/dev/zero    of=5kb.file bs=1k count=5
$ dd if=/dev/urandom of=7mb.file bs=1M count=7
$ touch zero.file
$ : > alwayszero.file
]]></screen>
        <itemizedlist>
          <listitem>
            <para><code>5kb.file</code> is 5KB of zeros. </para>
          </listitem>
          <listitem>
            <para><code>7mb.file</code> is 7MB of random data. </para>
          </listitem>
          <listitem>
            <para><code>zero.file</code> is 0 byte file (if file exists, the file contents are kept while updating mtime.) </para>
          </listitem>
          <listitem>
            <para><code>alwayszero.file</code> is always 0 byte file (if file exists, the file contents are not kept while updating mtime.) </para>
          </listitem>
        </itemizedlist>
        <para/>
      </section>
      <section>
        <title>Erase entire harddisk</title>
        <para>There are several ways to completely erase data from an entire harddisk-like device, e.g., USB memory stick at <code>/dev/sda</code>. </para>
        <para><inlinemediaobject><imageobject><imagedata width="15" fileref="/htdocs/rightsidebar/img/attention.png" depth="15"/></imageobject><textobject><phrase>&lt;!&gt;</phrase></textobject></inlinemediaobject> Check your USB memory stick location with the "<code>mount</code>" command first before executing commands here.  The device pointed by <code>/dev/sda</code> may be SCSI harddisk or serial-ATA harddisk where your entire system resides. </para>
        <itemizedlist>
          <listitem>Erase all by resetting data to 0: </listitem>
        </itemizedlist>
        <para/>
        <screen><![CDATA[dd if=/dev/zero of=/dev/sda
]]></screen>
        <itemizedlist>
          <listitem>Erase all by overwriting random data: </listitem>
        </itemizedlist>
        <para/>
        <screen><![CDATA[# dd if=/dev/urandom of=/dev/sda
]]></screen>
        <itemizedlist>
          <listitem>Erase all by overwriting random data very efficiently (fast): </listitem>
        </itemizedlist>
        <para/>
        <screen><![CDATA[# shred -v -n 1 /dev/sda
]]></screen>
        <para>Since the <code>dd</code> command is available from the shell of many bootable Linux CDs such as Debian installer CD, you can erase your installed system completely by running an erase command from such media on the system hard disk, e.g., <code>/dev/hda</code>, <code>/dev/sda</code>, etc. </para>
        <para/>
        <para/>
        <para/>
        <para/>
        <para/>
        <para/>
        <para/>
        <para/>
        <para/>
        <para/>
        <para/>
        <para/>
        <para/>
        <para/>
        <para/>
        <para/>
        <para/>
        <para/>
        <para/>
      </section>
      <section>
        <title>Undelete deleted but still open file</title>
        <para>Even if you have accidentally deleted a file, as long as that file is still being used by some application (read or write mode), it is possible to recover such a file. </para>
        <itemizedlist>
          <listitem>On one terminal: </listitem>
        </itemizedlist>
        <para/>
        <screen><![CDATA[$ echo foo > bar
$ less bar
]]></screen>
        <itemizedlist>
          <listitem>Then on another terminal: </listitem>
        </itemizedlist>
        <para/>
        <screen><![CDATA[$ ps aux | grep ' less[ ]'
osamu    4775  0.0  0.0  92200   884 pts/8    S+   00:18   0:00 less bar
$ rm bar
$ ls -l /proc/4775/fd | grep bar
lr-x------ 1 osamu osamu 64 2008-05-09 00:19 4 -> /home/osamu/bar (deleted)
$ cat /proc/4775/fd/4 >bar
$ ls -l
-rw-r--r-- 1 osamu osamu 4 2008-05-09 00:25 bar
$ cat bar
foo
]]></screen>
        <itemizedlist>
          <listitem>
            <para>Alternatively, when you have the <code>lsof</code> command installed, on another terminal: </para>
          </listitem>
        </itemizedlist>
        <para/>
        <screen><![CDATA[$ ls -li bar
2228329 -rw-r--r-- 1 osamu osamu 4 2008-05-11 11:02 bar
$ lsof |grep bar|grep less
less 4775 osamu 4r REG 8,3 4 2228329 /home/osamu/bar
$ rm bar
$ lsof |grep bar|grep less
less 4775 osamu 4r REG 8,3 4 2228329 /home/osamu/bar (deleted)
$ cat /proc/4775/fd/4 >bar
$ ls -li bar
2228302 -rw-r--r-- 1 osamu osamu 4 2008-05-11 11:05 bar
$ cat bar
foo
]]></screen>
        <para/>
      </section>
      <section>
        <title>Searching all hardlinks</title>
        <para>Files with hardlinks can be identified by "<code>ls -li</code>", e.g.: </para>
        <screen><![CDATA[$ ls -li
total 0
2738405 -rw-r--r-- 1 root root 0 2008-09-15 20:21 bar
2738404 -rw-r--r-- 2 root root 0 2008-09-15 20:21 baz
2738404 -rw-r--r-- 2 root root 0 2008-09-15 20:21 foo
]]></screen>
        <para>Both "<code>baz</code>" and "<code>foo</code>" have link count of "2" (&gt;1) showing them to have hardlinks.  Their inode numbers are common "2738404".  This means they are the same hardlinked file.  If you do not happen to find all hardlinked files by chance, you can search it by the inode, e.g., "2738404": </para>
        <screen><![CDATA[# find /path/to/mount/point -xdev -inum 2738404 
]]></screen>
        <para/>
      </section>
      <section>
        <title>Invisible disk space consumption</title>
        <para>All deleted but open files consumes disk space although they are not visible from normal <code>du</code>(1).  They can be listed with their size by: </para>
        <screen><![CDATA[# lsof -s -X / |grep deleted
]]></screen>
        <para/>
      </section>
    </section>
    <section>
      <title>Data security infrastructure</title>
      <para>The data security infrastructure is provided by the combination of data encryption tool, message digest tool, and signature tool. </para>
      <table>
        <caption/>
        <tgroup cols="4">
          <colspec colname="xxx1"/>
          <colspec colname="xxx2"/>
          <colspec colname="xxx3"/>
          <colspec colname="xxx4"/>
          <tbody>
            <row>
              <entry>
                <para> List of data security infrastructure tools. </para>
              </entry>
              <entry>
                <para> 1 </para>
              </entry>
              <entry>
                <para> 2 </para>
              </entry>
              <entry>
                <para> 3 </para>
              </entry>
            </row>
            <row>
              <entry>
                <para>
                  <emphasis role="strong">package</emphasis>
                </para>
              </entry>
              <entry>
                <para>
                  <emphasis role="strong">popcon</emphasis>
                </para>
              </entry>
              <entry>
                <para>
                  <emphasis role="strong">size</emphasis>
                </para>
              </entry>
              <entry>
                <para>
                  <emphasis role="strong">function</emphasis>
                </para>
              </entry>
            </row>
            <row>
              <entry>
                <para>
                  <code>gnupg</code>
                </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para><ulink url="http://en.wikipedia.org/wiki/GNU_Privacy_Guard">GNU privacy guard</ulink> -  OpenPGP encryption and signing tool. <code>gpg</code>(1) </para>
              </entry>
            </row>
            <row>
              <entry>
                <para>
                  <code>gnupg-doc</code>
                </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para> GNU Privacy Guard documentation </para>
              </entry>
            </row>
            <row>
              <entry>
                <para>
                  <code>gpgv</code>
                </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para> GNU privacy guard - signature verification tool </para>
              </entry>
            </row>
            <row>
              <entry>
                <para>
                  <code>cryptsetup</code>
                </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para> Utilities for <ulink url="http://en.wikipedia.org/wiki/Dm-crypt">dm-crypto</ulink> block device encryption supporting <ulink url="http://en.wikipedia.org/wiki/Linux_Unified_Key_Setup">LUKS</ulink> </para>
              </entry>
            </row>
            <row>
              <entry>
                <para>
                  <code>ecryptfs-utils</code>
                </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para> Utilities for <ulink url="http://ecryptfs.sourceforge.net/">ecryptfs</ulink> stacked filesystem encryption </para>
              </entry>
            </row>
            <row>
              <entry>
                <para>
                  <code>coreutils</code>
                </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para> The <code>md5sum</code> command computes and checks MD5 message digest </para>
              </entry>
            </row>
            <row>
              <entry>
                <para>
                  <code>coreutils</code>
                </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para> The  <code>sha1sum</code> command computes and checks SHA1 message digest </para>
              </entry>
            </row>
            <row>
              <entry>
                <para>
                  <code>openssl</code>
                </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para> The "<code>openssl dgst</code>" command computes message digest (OpenSSL). <code>dgst</code>(1ssl) </para>
              </entry>
            </row>
          </tbody>
        </tgroup>
      </table>
      <para>See @{@dataencryptiontips@}@ on <ulink url="http://en.wikipedia.org/wiki/Dm-crypt">dm-crypto</ulink> and <ulink url="http://ecryptfs.sourceforge.net/">ecryptfs</ulink> which implement automatic data encryption infrastructure via Linux kernel modules. </para>
      <para/>
      <section>
        <title>Key management for Gnupg</title>
        <para>Here are <ulink url="http://en.wikipedia.org/wiki/GNU_Privacy_Guard">GNU Privacy Guard</ulink> commands for the basic key management: </para>
        <table>
          <caption/>
          <tgroup cols="1">
            <colspec colname="xxx1"/>
            <tbody>
              <row>
                <entry>
                  <para> List of GNU Privacy Guard commands for the key management </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <emphasis role="strong">command</emphasis>
                  </para>
                </entry>
                <entry>
                  <para>
                    <emphasis role="strong">effects</emphasis>
                  </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para> gpg --gen-key </para>
                </entry>
                <entry>
                  <para> generate a new key </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para> gpg --gen-revoke my_user_ID </para>
                </entry>
                <entry>
                  <para> generate revoke key for my_user_ID </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para> gpg --edit-key user_ID               </para>
                </entry>
                <entry>
                  <para> "help" for help, interactive </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para> gpg -o file --exports                </para>
                </entry>
                <entry>
                  <para> export all keys to file </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para> gpg --imports file                   </para>
                </entry>
                <entry>
                  <para> import all keys from file </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para> gpg --send-keys user_ID              </para>
                </entry>
                <entry>
                  <para> send key of user_ID to keyserver </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para> gpg --recv-keys user_ID              </para>
                </entry>
                <entry>
                  <para> recv. key of user_ID from keyserver </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para> gpg --list-keys user_ID              </para>
                </entry>
                <entry>
                  <para> list keys of user_ID </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para> gpg --list-sigs user_ID              </para>
                </entry>
                <entry>
                  <para> list sig. of user_ID </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para> gpg --check-sigs user_ID             </para>
                </entry>
                <entry>
                  <para> check sig. of user_ID </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para> gpg --fingerprint user_ID            </para>
                </entry>
                <entry>
                  <para> check fingerprint of "user_ID" </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para> gpg --refresh-keys                   </para>
                </entry>
                <entry>
                  <para> update local keyring </para>
                </entry>
              </row>
            </tbody>
          </tgroup>
        </table>
        <para/>
        <para/>
        <para>Here is the meaning of trust code: </para>
        <table>
          <caption/>
          <tgroup cols="2">
            <colspec colname="xxx1"/>
            <colspec colname="xxx2"/>
            <tbody>
              <row>
                <entry>
                  <para> List of the meaning of trust code. </para>
                </entry>
                <entry>
                  <para> </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <emphasis role="strong">code</emphasis>
                  </para>
                </entry>
                <entry>
                  <para>
                    <emphasis role="strong">trust</emphasis>
                  </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> No owner trust assigned / not yet calculated. </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para> e </para>
                </entry>
                <entry>
                  <para> Trust calculation has failed. </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para> q </para>
                </entry>
                <entry>
                  <para> Not enough information for calculation. </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para> n </para>
                </entry>
                <entry>
                  <para> Never trust this key. </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para> m </para>
                </entry>
                <entry>
                  <para> Marginally trusted. </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para> f </para>
                </entry>
                <entry>
                  <para> Fully trusted. </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para> u </para>
                </entry>
                <entry>
                  <para> Ultimately trusted. </para>
                </entry>
              </row>
            </tbody>
          </tgroup>
        </table>
        <para>The following will upload my key "<ulink url="/A8061F32">A8061F32</ulink>" to the popular keyserver <code>hkp://subkeys.pgp.net</code>: </para>
        <para/>
        <screen><![CDATA[$ gpg --keyserver hkp://subkeys.pgp.net --send-keys A8061F32
]]></screen>
        <para>A good default keyserver set up in <code>$HOME/.gnupg/gpg.conf</code> (or old location <code>$HOME/.gnupg/options</code>) contains: </para>
        <screen><![CDATA[keyserver hkp://subkeys.pgp.net
]]></screen>
        <para>The following will obtain unknown keys from the keyserver: </para>
        <screen><![CDATA[$ gpg --list-sigs | \
  sed -n '/^sig.*\[User ID not found\]/s/^sig..........\(\w\w*\)\W.*/\1/p' |\
  sort | uniq | xargs gpg --recv-keys
]]></screen>
        <para>There was a bug in <ulink url="http://sourceforge.net/projects/pks/">OpenPGP Public Key Server</ulink> (pre version 0.9.6) which corrupted key with more than 2 sub-keys.  The newer <code>gnupg</code> (&gt;1.2.1-2) can handle these corrupted subkeys.  See <code>gpg</code>(1) manpage under <code>--repair-pks-subkey-bug</code> option. </para>
        <para/>
      </section>
      <section>
        <title>Using GnuPG with files</title>
        <para>File handling: </para>
        <table>
          <caption/>
          <tgroup cols="1">
            <colspec colname="xxx1"/>
            <tbody>
              <row>
                <entry>
                  <para> List of gnu privacy guard commands on files </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <emphasis role="strong">command</emphasis>
                  </para>
                </entry>
                <entry>
                  <para>
                    <emphasis role="strong">effects</emphasis>
                  </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para> gpg -a -s file </para>
                </entry>
                <entry>
                  <para> sign file into ascii armored file.asc </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para> gpg --armor --sign file </para>
                </entry>
                <entry>
                  <para> , , </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para> gpg --clearsign file          </para>
                </entry>
                <entry>
                  <para> clear-sign message </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para> gpg --clearsign --not-dash-escaped patchfile  </para>
                </entry>
                <entry>
                  <para> clear-sign patchfile </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para> gpg --verify file                 </para>
                </entry>
                <entry>
                  <para> verify clear-signed file </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para> gpg -o file.sig -b file </para>
                </entry>
                <entry>
                  <para> create detached signature </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para> gpg -o file.sig --detach-sig file </para>
                </entry>
                <entry>
                  <para> , , </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para> gpg --verify file.sig file        </para>
                </entry>
                <entry>
                  <para> verify file with file.sig </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para> gpg -o crypt_file.gpg -r name -e file </para>
                </entry>
                <entry>
                  <para> public-key encryption intended for name from file to binary crypt_file.gpg </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para> gpg -o crypt_file.gpg --recipient name --encrypt file </para>
                </entry>
                <entry>
                  <para> , , </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para> gpg -o crypt_file.asc -a -r name -e file </para>
                </entry>
                <entry>
                  <para> public-key encryption intended for name from file to ASCII armored crypt_file.asc </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para> gpg -o crypt_file.gpg -c file </para>
                </entry>
                <entry>
                  <para> symmetric encryption from file to crypt_file.gpg </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para> gpg -o crypt_file.gpg --symmetric file </para>
                </entry>
                <entry>
                  <para> , , </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para> gpg -o crypt_file.asc -a -c file </para>
                </entry>
                <entry>
                  <para> symmetric encryption intended for name from file to ASCII armored crypt_file.asc </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para> gpg -o file -d crypt_file.gpg -r name </para>
                </entry>
                <entry>
                  <para> decryption </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para> gpg -o file --decrypt crypt_file.gpg  </para>
                </entry>
                <entry>
                  <para> , , </para>
                </entry>
              </row>
            </tbody>
          </tgroup>
        </table>
        <para/>
      </section>
      <section>
        <title>Using GnuPG with Mutt</title>
        <para>Add the following to <code>~/.muttrc</code> to keep a slow GnuPG from automatically starting, while allowing it to be used by typing "<code>S</code>" at the index menu. </para>
        <para/>
        <screen><![CDATA[macro index S ":toggle pgp_verify_sig\n"
set pgp_verify_sig=no
]]></screen>
        <para/>
      </section>
      <section>
        <title>Using GnuPG with Vim</title>
        <para>The <code>gnupg</code> plugin let you run GnuPG transparently for files with extension <code>.gpg</code>, <code>.asc</code>, and <code>.ppg</code>. </para>
        <para/>
        <screen><![CDATA[# aptitude install vim-scripts vim-addon-manager
$ vim-addons install gnupg
]]></screen>
        <para/>
      </section>
      <section>
        <title>The MD5 sum</title>
        <para>The <code>md5sum</code> program provides utility to make a digest file using the method in <ulink url="http://tools.ietf.org/html/rfc1321">rfc1321</ulink> and verifying each file with it. </para>
        <screen><![CDATA[$ md5sum foo bar >baz.md5
$ cat baz.md5
d3b07384d113edec49eaa6238ad5ff00  foo
c157a79031e1c40f85931829bc5fc552  bar
$ md5sum -c baz.md5
foo: OK
bar: OK
]]></screen>
        <para><inlinemediaobject><imageobject><imagedata width="15" fileref="/htdocs/rightsidebar/img/idea.png" depth="15"/></imageobject><textobject><phrase>(!)</phrase></textobject></inlinemediaobject> The computation for the MD5 sum is less CPU intensive than the one for the cryptographic signature by the Gnupg. Usually, only the top level digest file is cryptographically signed to ensure data integrity. </para>
        <para/>
      </section>
    </section>
    <section>
      <title>Source code merge tools</title>
      <para>There are many merge tools for the source code.  Following commands caught my eyes.: </para>
      <table>
        <caption/>
        <tgroup cols="4">
          <colspec colname="xxx1"/>
          <colspec colname="xxx2"/>
          <colspec colname="xxx3"/>
          <colspec colname="xxx4"/>
          <tbody>
            <row>
              <entry>
                <para> List of source code merge tools. </para>
              </entry>
              <entry>
                <para> 2 </para>
              </entry>
              <entry>
                <para> 3 </para>
              </entry>
              <entry>
                <para> 4 </para>
              </entry>
            </row>
            <row>
              <entry>
                <para>
                  <emphasis role="strong">command</emphasis>
                </para>
              </entry>
              <entry>
                <para>
                  <emphasis role="strong">package</emphasis>
                </para>
              </entry>
              <entry>
                <para>
                  <emphasis role="strong">popcon</emphasis>
                </para>
              </entry>
              <entry>
                <para>
                  <emphasis role="strong">size</emphasis>
                </para>
              </entry>
              <entry>
                <para>
                  <emphasis role="strong">description</emphasis>
                </para>
              </entry>
            </row>
            <row>
              <entry>
                <para><code>diff</code>(1) </para>
              </entry>
              <entry>
                <para>
                  <code>diff</code>
                </para>
              </entry>
              <entry>
                <para> 37745 </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para> This compares files line by line. </para>
              </entry>
            </row>
            <row>
              <entry>
                <para><code>diff3</code>(1) </para>
              </entry>
              <entry>
                <para>
                  <code>diff</code>
                </para>
              </entry>
              <entry>
                <para> 37745 </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para> This compares and merges three files line by line. </para>
              </entry>
            </row>
            <row>
              <entry>
                <para><code>vimdiff</code>(1) </para>
              </entry>
              <entry>
                <para>
                  <code>vim</code>
                </para>
              </entry>
              <entry>
                <para> 15655 </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para> This compares 2 files side by side in vim. </para>
              </entry>
            </row>
            <row>
              <entry>
                <para><code>patch</code>(1) </para>
              </entry>
              <entry>
                <para>
                  <code>patch</code>
                </para>
              </entry>
              <entry>
                <para> 8068 </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para> This applies a diff file to an original. </para>
              </entry>
            </row>
            <row>
              <entry>
                <para><code>dpatch</code>(1) </para>
              </entry>
              <entry>
                <para>
                  <code>dpatch</code>
                </para>
              </entry>
              <entry>
                <para> 1446 </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para> This manage series of patches for Debian package. </para>
              </entry>
            </row>
            <row>
              <entry>
                <para><code>diffstat</code>(1) </para>
              </entry>
              <entry>
                <para>
                  <code>diffstat</code>
                </para>
              </entry>
              <entry>
                <para> 1008 </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para> This produces a histogram of changes by the diff. </para>
              </entry>
            </row>
            <row>
              <entry>
                <para><code>combinediff</code>(1) </para>
              </entry>
              <entry>
                <para>
                  <code>patchutils</code>
                </para>
              </entry>
              <entry>
                <para> 759 </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para> This creates a cumulative patch from two incremental patches. </para>
              </entry>
            </row>
            <row>
              <entry>
                <para><code>dehtmldiff</code>(1) </para>
              </entry>
              <entry>
                <para>
                  <code>patchutils</code>
                </para>
              </entry>
              <entry>
                <para> x </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para> This extracts a diff from an HTML page. </para>
              </entry>
            </row>
            <row>
              <entry>
                <para><code>filterdiff</code>(1) </para>
              </entry>
              <entry>
                <para>
                  <code>patchutils</code>
                </para>
              </entry>
              <entry>
                <para> x </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para> This extracts or excludes diffs from a diff file. </para>
              </entry>
            </row>
            <row>
              <entry>
                <para><code>fixcvsdiff</code>(1) </para>
              </entry>
              <entry>
                <para>
                  <code>patchutils</code>
                </para>
              </entry>
              <entry>
                <para> x </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para> This fixes diff files created by CVS that "patch" mis-interprets. </para>
              </entry>
            </row>
            <row>
              <entry>
                <para><code>flipdiff</code>(1) </para>
              </entry>
              <entry>
                <para>
                  <code>patchutils</code>
                </para>
              </entry>
              <entry>
                <para> x </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para> This exchanges the order of two patches. </para>
              </entry>
            </row>
            <row>
              <entry>
                <para><code>grepdiff</code>(1) </para>
              </entry>
              <entry>
                <para>
                  <code>patchutils</code>
                </para>
              </entry>
              <entry>
                <para> x </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para> This shows which files are modified by a patch matching a regex. </para>
              </entry>
            </row>
            <row>
              <entry>
                <para><code>interdiff</code>(1) </para>
              </entry>
              <entry>
                <para>
                  <code>patchutils</code>
                </para>
              </entry>
              <entry>
                <para> x </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para> This shows differences between two unified diff files. </para>
              </entry>
            </row>
            <row>
              <entry>
                <para><code>lsdiff</code>(1) </para>
              </entry>
              <entry>
                <para>
                  <code>patchutils</code>
                </para>
              </entry>
              <entry>
                <para> x </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para> This shows which files are modified by a patch. </para>
              </entry>
            </row>
            <row>
              <entry>
                <para><code>recountdiff</code>(1) </para>
              </entry>
              <entry>
                <para>
                  <code>patchutils</code>
                </para>
              </entry>
              <entry>
                <para> x </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para> This recomputes counts and offsets in unified context diffs. </para>
              </entry>
            </row>
            <row>
              <entry>
                <para><code>rediff</code>(1) </para>
              </entry>
              <entry>
                <para>
                  <code>patchutils</code>
                </para>
              </entry>
              <entry>
                <para> x </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para> This fixes offsets and counts of a hand-edited diff. </para>
              </entry>
            </row>
            <row>
              <entry>
                <para><code>splitdiff</code>(1) </para>
              </entry>
              <entry>
                <para>
                  <code>patchutils</code>
                </para>
              </entry>
              <entry>
                <para> x </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para> This separates out incremental patches. </para>
              </entry>
            </row>
            <row>
              <entry>
                <para><code>unwrapdiff</code>(1) </para>
              </entry>
              <entry>
                <para>
                  <code>patchutils</code>
                </para>
              </entry>
              <entry>
                <para> x </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para> This demangles patches that have been word-wrapped. </para>
              </entry>
            </row>
            <row>
              <entry>
                <para><code>wiggle</code>(1) </para>
              </entry>
              <entry>
                <para>
                  <code>wiggle</code>
                </para>
              </entry>
              <entry>
                <para> 451 </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para> This applies rejected patches. </para>
              </entry>
            </row>
            <row>
              <entry>
                <para><code>quilt</code>(1) </para>
              </entry>
              <entry>
                <para>
                  <code>quilt</code>
                </para>
              </entry>
              <entry>
                <para> 430 </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para> This manage series of patches. </para>
              </entry>
            </row>
            <row>
              <entry>
                <para><code>meld</code>(1) </para>
              </entry>
              <entry>
                <para>
                  <code>meld</code>
                </para>
              </entry>
              <entry>
                <para> 256 </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para> This is a GTK graphical file comparator and merge tool. </para>
              </entry>
            </row>
            <row>
              <entry>
                <para><code>xxdiff</code>(1) </para>
              </entry>
              <entry>
                <para>
                  <code>xxdiff</code>
                </para>
              </entry>
              <entry>
                <para> 182 </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para> This is a plain X graphical file comparator and merge tool. </para>
              </entry>
            </row>
            <row>
              <entry>
                <para><code>dirdiff</code>(1) </para>
              </entry>
              <entry>
                <para>
                  <code>dirdiff</code>
                </para>
              </entry>
              <entry>
                <para> 61 </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para> This displays and merges changes between directory trees. </para>
              </entry>
            </row>
            <row>
              <entry>
                <para><code>docdiff</code>(1) </para>
              </entry>
              <entry>
                <para>
                  <code>docdiff</code>
                </para>
              </entry>
              <entry>
                <para> 38 </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para> This compares two files word by word / char by char. </para>
              </entry>
            </row>
            <row>
              <entry>
                <para><code>imediff2</code>(1) </para>
              </entry>
              <entry>
                <para>
                  <code>imediff2</code>
                </para>
              </entry>
              <entry>
                <para> 24 </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para>  This is an interactive full screen 2-way merge tool. </para>
              </entry>
            </row>
            <row>
              <entry>
                <para><code>makepatch</code>(1) </para>
              </entry>
              <entry>
                <para>
                  <code>makepatch</code>
                </para>
              </entry>
              <entry>
                <para> 20 </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para> This generates extended patch files. </para>
              </entry>
            </row>
            <row>
              <entry>
                <para><code>applypatch</code>(1) </para>
              </entry>
              <entry>
                <para>
                  <code>makepatch</code>
                </para>
              </entry>
              <entry>
                <para> 20 </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para> This applies extended patch files. </para>
              </entry>
            </row>
            <row>
              <entry>
                <para><code>wdiff</code>(1) </para>
              </entry>
              <entry>
                <para>
                  <code>wdiff</code>
                </para>
              </entry>
              <entry>
                <para> 16 </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para> This displays word differences between text files. </para>
              </entry>
            </row>
          </tbody>
        </tgroup>
      </table>
      <para/>
      <section>
        <title>Extract differences for source files</title>
        <para>Following one of these procedures will extract differences between two source files and create unified diff files <code>file.patch0</code> or <code>file.patch1</code> depending on the file location: </para>
        <para/>
        <screen><![CDATA[$ diff -u file.old file.new > file.patch0
$ diff -u old/file new/file > file.patch1
]]></screen>
        <para/>
      </section>
      <section>
        <title>Merge updates for source files</title>
        <para>The diff file (alternatively called patch file) is used to send a program update.  The receiving party will apply this update to another file by: </para>
        <para/>
        <screen><![CDATA[$ patch -p0 file < file.patch0
$ patch -p1 file < file.patch1
]]></screen>
        <para/>
      </section>
      <section>
        <title>3 way merge updates</title>
        <para>If you have three versions of source code, you can merge them more effectively using <code>diff3</code>: </para>
        <para/>
        <screen><![CDATA[$ diff3 -m file.mine file.old file.yours > file
]]></screen>
        <para/>
      </section>
    </section>
    <section>
      <title>Version control systems</title>
      <para>Here is a summary of the <ulink url="http://en.wikipedia.org/wiki/Revision_control">version control systems (VCS)</ulink> on the Debian system: </para>
      <para><inlinemediaobject><imageobject><imagedata width="15" fileref="/htdocs/rightsidebar/img/idea.png" depth="15"/></imageobject><textobject><phrase>(!)</phrase></textobject></inlinemediaobject> If you are new to VCS systems, you should start learning with <emphasis role="strong">Git</emphasis>, which is growing fast in popularity. </para>
      <table>
        <caption/>
        <tgroup cols="4">
          <colspec colname="xxx1"/>
          <colspec colname="xxx2"/>
          <colspec colname="xxx3"/>
          <colspec colname="xxx4"/>
          <tbody>
            <row>
              <entry>
                <para> List of version control system tools. </para>
              </entry>
              <entry>
                <para> 1 </para>
              </entry>
              <entry>
                <para> 2 </para>
              </entry>
              <entry>
                <para> 3 </para>
              </entry>
            </row>
            <row>
              <entry>
                <para>
                  <emphasis role="strong">package</emphasis>
                </para>
              </entry>
              <entry>
                <para>
                  <emphasis role="strong">popcon</emphasis>
                </para>
              </entry>
              <entry>
                <para>
                  <emphasis role="strong">size</emphasis>
                </para>
              </entry>
              <entry>
                <para>
                  <emphasis role="strong">tool</emphasis>
                </para>
              </entry>
              <entry>
                <para>
                  <emphasis role="strong">VCS type</emphasis>
                </para>
              </entry>
              <entry>
                <para>
                  <emphasis role="strong">comment</emphasis>
                </para>
              </entry>
            </row>
            <row>
              <entry>
                <para>
                  <code>cssc</code>
                </para>
              </entry>
              <entry>
                <para> 7 </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para>
                  <ulink url="http://cssc.sourceforge.net/">CSSC</ulink>
                </para>
              </entry>
              <entry>
                <para> local </para>
              </entry>
              <entry>
                <para> Clone of the <ulink url="http://en.wikipedia.org/wiki/Source_Code_Control_System">Unix SCCS</ulink> (deprecated)  </para>
              </entry>
            </row>
            <row>
              <entry>
                <para>
                  <code>rcs</code>
                </para>
              </entry>
              <entry>
                <para> 1658 </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para>
                  <ulink url="http://en.wikipedia.org/wiki/Revision_Control_System">RCS</ulink>
                </para>
              </entry>
              <entry>
                <para> local </para>
              </entry>
              <entry>
                <para> "<ulink url="http://en.wikipedia.org/wiki/Source_Code_Control_System">Unix SCCS</ulink> done right" </para>
              </entry>
            </row>
            <row>
              <entry>
                <para>
                  <code>cvs</code>
                </para>
              </entry>
              <entry>
                <para> 4265 </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para>
                  <ulink url="http://en.wikipedia.org/wiki/Concurrent_Versions_System">CVS</ulink>
                </para>
              </entry>
              <entry>
                <para> remote </para>
              </entry>
              <entry>
                <para> The previous standard remote VCS </para>
              </entry>
            </row>
            <row>
              <entry>
                <para>
                  <code>subversion</code>
                </para>
              </entry>
              <entry>
                <para> 5276 </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para>
                  <ulink url="http://en.wikipedia.org/wiki/Subversion_(software)">Subversion</ulink>
                </para>
              </entry>
              <entry>
                <para> remote </para>
              </entry>
              <entry>
                <para> "CVS done right", the new de facto standard remote VCS </para>
              </entry>
            </row>
            <row>
              <entry>
                <para>
                  <code>git-core</code>
                </para>
              </entry>
              <entry>
                <para> 512 </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para>
                  <ulink url="http://en.wikipedia.org/wiki/Git_(software)">Git</ulink>
                </para>
              </entry>
              <entry>
                <para> distributed </para>
              </entry>
              <entry>
                <para> fast DVCS in C (used by the Linux kernel and others) </para>
              </entry>
            </row>
            <row>
              <entry>
                <para>
                  <code>mercurial</code>
                </para>
              </entry>
              <entry>
                <para> 256 </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para>
                  <ulink url="http://en.wikipedia.org/wiki/Mercurial_(software)">Mercurial</ulink>
                </para>
              </entry>
              <entry>
                <para> distributed </para>
              </entry>
              <entry>
                <para> DVCS in python and some C. </para>
              </entry>
            </row>
            <row>
              <entry>
                <para>
                  <code>bzr</code>
                </para>
              </entry>
              <entry>
                <para> 158 </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para>
                  <ulink url="http://en.wikipedia.org/wiki/Bazaar_(software)">Bazaar</ulink>
                </para>
              </entry>
              <entry>
                <para> distributed </para>
              </entry>
              <entry>
                <para> DVCS influenced by <code>tla</code> written in python (used by <ulink url="http://www.ubuntu.com/">Ubuntu</ulink>) </para>
              </entry>
            </row>
            <row>
              <entry>
                <para>
                  <code>darcs</code>
                </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para>
                  <ulink url="http://en.wikipedia.org/wiki/Darcs">Darcs</ulink>
                </para>
              </entry>
              <entry>
                <para> distributed </para>
              </entry>
              <entry>
                <para> DVCS with smart algebra of patches (slow). </para>
              </entry>
            </row>
            <row>
              <entry>
                <para>
                  <code>tla</code>
                </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para>
                  <ulink url="http://en.wikipedia.org/wiki/GNU_arch">GNU arch</ulink>
                </para>
              </entry>
              <entry>
                <para> distributed </para>
              </entry>
              <entry>
                <para> DVCS mainly by Tom Lord. (Historic) </para>
              </entry>
            </row>
            <row>
              <entry>
                <para>
                  <code>monotone</code>
                </para>
              </entry>
              <entry>
                <para> 88 </para>
              </entry>
              <entry>
                <para> - </para>
              </entry>
              <entry>
                <para>
                  <ulink url="http://en.wikipedia.org/wiki/Monotone_(software)">Monotone</ulink>
                </para>
              </entry>
              <entry>
                <para> distributed </para>
              </entry>
              <entry>
                <para> DVCS in C++ </para>
              </entry>
            </row>
          </tbody>
        </tgroup>
      </table>
      <para/>
      <para>VCS is sometimes known as revision control system (RCS), or software configuration management (SCM). </para>
      <para>Distributed VCS such as Git is the tool of choice these days.  CVS and Subversion may still be useful to join some existing open source program activities. </para>
      <para>Debian provides free VCS services via <ulink url="http://alioth.debian.org/">Debian Alioth service</ulink>.  It supports practically all VCSs. Its documentation can be found at <ulink url="http://wiki.debian.org/Alioth">http://wiki.debian.org/Alioth</ulink> . </para>
      <para><inlinemediaobject><imageobject><imagedata width="15" fileref="/htdocs/rightsidebar/img/attention.png" depth="15"/></imageobject><textobject><phrase>&lt;!&gt;</phrase></textobject></inlinemediaobject> The <code>git</code> package is "GNU Interactive Tools" which is not the DVCS. </para>
      <para/>
      <section>
        <title>Native VCS commands</title>
        <para>Here is an oversimplified comparison of native VCS commands to provide the big picture. The typical command sequence may require options and arguments. </para>
        <table>
          <caption/>
          <tgroup cols="4">
            <colspec colname="xxx1"/>
            <colspec colname="xxx2"/>
            <colspec colname="xxx3"/>
            <colspec colname="xxx4"/>
            <tbody>
              <row>
                <entry>
                  <para> Comparison of native VCS commands. </para>
                </entry>
                <entry>
                  <para> </para>
                </entry>
                <entry>
                  <para> </para>
                </entry>
                <entry>
                  <para> </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <emphasis role="strong">CVS</emphasis>
                  </para>
                </entry>
                <entry>
                  <para>
                    <emphasis role="strong">Subversion</emphasis>
                  </para>
                </entry>
                <entry>
                  <para>
                    <emphasis role="strong">Git</emphasis>
                  </para>
                </entry>
                <entry>
                  <para>
                    <emphasis role="strong">function</emphasis>
                  </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>cvs init</code>
                  </para>
                </entry>
                <entry>
                  <para>
                    <code>svn create</code>
                  </para>
                </entry>
                <entry>
                  <para>
                    <code>git init</code>
                  </para>
                </entry>
                <entry>
                  <para> create the (local) repository  </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>cvs login</code>
                  </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> login to the remote repository </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>cvs co</code>
                  </para>
                </entry>
                <entry>
                  <para>
                    <code>svn co</code>
                  </para>
                </entry>
                <entry>
                  <para>
                    <code>git clone</code>
                  </para>
                </entry>
                <entry>
                  <para> check out the remote repository as the working tree </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>cvs up</code>
                  </para>
                </entry>
                <entry>
                  <para>
                    <code>svn up</code>
                  </para>
                </entry>
                <entry>
                  <para>
                    <code>git pull</code>
                  </para>
                </entry>
                <entry>
                  <para> update the working tree by merging the remote repository </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>cvs add</code>
                  </para>
                </entry>
                <entry>
                  <para>
                    <code>svn add</code>
                  </para>
                </entry>
                <entry>
                  <para>
                    <code>git add .</code>
                  </para>
                </entry>
                <entry>
                  <para> add file(s) in the working tree to the VCS </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>cvs rm</code>
                  </para>
                </entry>
                <entry>
                  <para>
                    <code>svn rm</code>
                  </para>
                </entry>
                <entry>
                  <para>
                    <code>git rm</code>
                  </para>
                </entry>
                <entry>
                  <para> remove file(s) in working tree from the VCS </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>cvs ci</code>
                  </para>
                </entry>
                <entry>
                  <para>
                    <code>svn ci</code>
                  </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> commit changes to the remote repository </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para>
                    <code>git commit -a</code>
                  </para>
                </entry>
                <entry>
                  <para> commit changes to the local repository </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para>
                    <code>git push</code>
                  </para>
                </entry>
                <entry>
                  <para> update the remote repository by the local repository </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>cvs status</code>
                  </para>
                </entry>
                <entry>
                  <para>
                    <code>svn status</code>
                  </para>
                </entry>
                <entry>
                  <para>
                    <code>git status</code>
                  </para>
                </entry>
                <entry>
                  <para> display the working tree status from the VCS </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <code>cvs diff</code>
                  </para>
                </entry>
                <entry>
                  <para>
                    <code>svn diff</code>
                  </para>
                </entry>
                <entry>
                  <para>
                    <code>git diff</code>
                  </para>
                </entry>
                <entry>
                  <para> diff &lt;reference_repository&gt; &lt;working_tree&gt; </para>
                </entry>
              </row>
              <row>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para> - </para>
                </entry>
                <entry>
                  <para>
                    <code>git repack -a -d; git prune</code>
                  </para>
                </entry>
                <entry>
                  <para> repack the local repository into single pack. </para>
                </entry>
              </row>
            </tbody>
          </tgroup>
        </table>
        <para><inlinemediaobject><imageobject><imagedata width="15" fileref="/htdocs/rightsidebar/img/attention.png" depth="15"/></imageobject><textobject><phrase>&lt;!&gt;</phrase></textobject></inlinemediaobject> Invoking a <code>git</code> subcommand as "<code>git-xyzzy</code>" from the command line has been deprecated since early 2006. </para>
        <para/>
        <para/>
        <para/>
        <para/>
        <para/>
        <para/>
        <para/>
        <para><inlinemediaobject><imageobject><imagedata width="16" fileref="/htdocs/rightsidebar/img/icon-info.png" depth="16"/></imageobject><textobject><phrase>{i}</phrase></textobject></inlinemediaobject> Git can work directly with different VCS repositories such as ones provided by CVS and Subversion, and provides the local repository for local changes with the <code>git-cvs</code> and <code>git-svn</code> packages.  See <ulink url="http://www.kernel.org/pub/software/scm/git/docs/gitcvs-migration.html">git for CVS users</ulink>, <ulink url="http://live.gnome.org/GitForGnomeDevelopers">Git for GNOME developers</ulink> and @{@git@}@. </para>
        <para/>
        <para/>
        <para/>
        <para/>
        <para/>
        <para><inlinemediaobject><imageobject><imagedata width="15" fileref="/htdocs/rightsidebar/img/idea.png" depth="15"/></imageobject><textobject><phrase>(!)</phrase></textobject></inlinemediaobject> Git has commands which have no equivalents in CVS and Subversion.  "Fetch", "Rebase", "Cherrypick", ... </para>
        <para/>
        <para/>
      </section>
      <section>
        <title>CVS</title>
        <para>Check </para>
        <itemizedlist>
          <listitem>
            <para>"<code>sensible-browser file:///usr/share/doc/cvs/html-cvsclient</code>", </para>
          </listitem>
          <listitem>
            <para>"<code>sensible-browser file:///usr/share/doc/cvs/html-info</code>", </para>
          </listitem>
          <listitem>
            <para>"<code>sensible-browser file:///usr/share/doc/cvsbook</code>", </para>
          </listitem>
          <listitem>
            <para>"<code>info cvs</code>", and </para>
          </listitem>
          <listitem>
            <para>"<code>man cvs</code>" </para>
          </listitem>
        </itemizedlist>
        <para>for detailed information. </para>
        <para/>
        <section>
          <title>Installing a CVS server</title>
          <para>The following setup will allow commits to the CVS repository only by a member of the "src" group, and administration of CVS only by a member of the "staff" group, thus reducing the chance of shooting oneself. </para>
          <para/>
          <screen><![CDATA[# cd /var/lib; umask 002; mkdir cvs
# export CVSROOT=/var/lib/cvs
# cd $CVSROOT
# chown root:src .
# chmod 2775 .
# cvs -d $CVSROOT init
# cd CVSROOT
# chown -R root:staff .
# chmod 2775 .
# touch val-tags
# chmod 664 history val-tags
# chown root:src history val-tags
]]></screen>
          <para>You may restrict creation of new project by changing the owner of <code>$CVSROOT</code> directory to "<code>root:staff</code>  and its permission to "<code>3775</code>". </para>
          <para/>
        </section>
        <section>
          <title>Use local CVS server</title>
          <para>The following will set up shell environments for the local access to the CVS repository: </para>
          <para/>
          <screen><![CDATA[$ export CVSROOT=/var/lib/cvs
]]></screen>
          <para/>
        </section>
        <section>
          <title>Use remote CVS pserver</title>
          <para>The following will set up shell environments for the read-only remote access to the CVS repository without SSH (use RSH protocol capability in <code>cvs</code>): </para>
          <para/>
          <screen><![CDATA[$ export CVSROOT=:pserver:account@cvs.foobar.com:/var/lib/cvs
$ cvs login
]]></screen>
          <para>This is prone to eavesdropping attack. </para>
          <para/>
        </section>
        <section>
          <title>Anonymous CVS (download only)</title>
          <para>The following will set up shell environments for the read-only remote access to the CVS repository: </para>
          <para/>
          <screen><![CDATA[$ export CVSROOT=:pserver:anonymous@cvs.sf.net:/cvsroot/qref
$ cvs login
$ cvs -z3 co qref
]]></screen>
          <para/>
        </section>
        <section>
          <title>Use remote CVS through ssh</title>
          <para>The following will set up shell environments for the read-only remote access to the CVS repository with SSH: </para>
          <para/>
          <screen><![CDATA[$ export CVSROOT=:ext:account@cvs.foobar.com:/var/lib/cvs
]]></screen>
          <para>or for <ulink url="/SourceForge">SourceForge</ulink>: </para>
          <para/>
          <screen><![CDATA[$ export CVSROOT=:ext:account@cvs.sf.net:/cvsroot/qref
]]></screen>
          <para>You can also use public key authentication for SSH which eliminates the password prompt. </para>
          <para/>
        </section>
        <section>
          <title>Create a new CVS archive</title>
          <para>For, </para>
          <table>
            <caption/>
            <tgroup cols="3">
              <colspec colname="xxx1"/>
              <colspec colname="xxx2"/>
              <colspec colname="xxx3"/>
              <tbody>
                <row>
                  <entry>
                    <para> Assumption for the CVS archive. </para>
                  </entry>
                  <entry>
                    <para> </para>
                  </entry>
                  <entry>
                    <para> </para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>
                      <emphasis role="strong">ITEM</emphasis>
                    </para>
                  </entry>
                  <entry>
                    <para>
                      <emphasis role="strong">VALUE</emphasis>
                    </para>
                  </entry>
                  <entry>
                    <para>
                      <emphasis role="strong">MEANING</emphasis>
                    </para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para> source tree  </para>
                  </entry>
                  <entry>
                    <para>
                      <code>~/project-x</code>
                    </para>
                  </entry>
                  <entry>
                    <para> All source codes </para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para> Project name </para>
                  </entry>
                  <entry>
                    <para>
                      <code>project-x</code>
                    </para>
                  </entry>
                  <entry>
                    <para> Name for this project </para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para> Vendor Tag   </para>
                  </entry>
                  <entry>
                    <para>
                      <code>Main-branch</code>
                    </para>
                  </entry>
                  <entry>
                    <para> Tag for the entire branch </para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para> Release Tag  </para>
                  </entry>
                  <entry>
                    <para>
                      <code>Release-initial</code>
                    </para>
                  </entry>
                  <entry>
                    <para> Tag for a specific release </para>
                  </entry>
                </row>
              </tbody>
            </tgroup>
          </table>
          <para>Then, </para>
          <para/>
          <screen><![CDATA[$ cd ~/project-x
]]></screen>
          <itemizedlist>
            <listitem>create a source tree ... </listitem>
          </itemizedlist>
          <para/>
          <screen><![CDATA[$ cvs import -m "Start project-x" project-x Main-branch Release-initial
$ cd ..; rm -R ~/project-x
]]></screen>
          <para/>
        </section>
        <section>
          <title>Work with CVS</title>
          <para>To work with <code>project-x</code> using the local CVS repository: </para>
          <para/>
          <screen><![CDATA[$ mkdir -p /path/to; cd /path/to
$ cvs co project-x
]]></screen>
          <itemizedlist>
            <listitem>get sources from CVS to local </listitem>
          </itemizedlist>
          <para/>
          <screen><![CDATA[$ cd project-x
]]></screen>
          <itemizedlist>
            <listitem>make changes to the content ... </listitem>
          </itemizedlist>
          <para/>
          <screen><![CDATA[$ cvs diff -u
]]></screen>
          <itemizedlist>
            <listitem>
              <para>similar to "<code>diff -u repository/ local/</code>" </para>
            </listitem>
          </itemizedlist>
          <para/>
          <screen><![CDATA[$ cvs up -C modified_file
]]></screen>
          <itemizedlist>
            <listitem>undo changes to a file </listitem>
          </itemizedlist>
          <para/>
          <screen><![CDATA[$ cvs ci -m "Describe change"
]]></screen>
          <itemizedlist>
            <listitem>save local sources to CVS </listitem>
          </itemizedlist>
          <para/>
          <screen><![CDATA[$ vi newfile_added
$ cvs add newfile_added
$ cvs ci -m "Added newfile_added"
$ cvs up
]]></screen>
          <itemizedlist>
            <listitem>merge latest version from CVS. </listitem>
            <listitem>
              <para>To create all newly created subdirectories from CVS, use "<code>cvs up -d -P</code>" instead. </para>
            </listitem>
            <listitem>
              <para>Watch out for lines starting with "<code>C filename</code>" which indicates conflicting changes. </para>
            </listitem>
            <listitem>unmodified code is moved to .#filename.version . </listitem>
            <listitem>
              <para>search for "&lt;&lt;&lt;&lt;&lt;&lt;&lt;" and "&gt;&gt;&gt;&gt;&gt;&gt;&gt;" in the files for conflicting changes. </para>
            </listitem>
            <listitem>edit file to fix conflicts. </listitem>
          </itemizedlist>
          <para/>
          <screen><![CDATA[$ cvs tag Release-1
]]></screen>
          <itemizedlist>
            <listitem>add release tag </listitem>
            <listitem>edit further ... </listitem>
          </itemizedlist>
          <para/>
          <screen><![CDATA[$ cvs tag -d Release-1
]]></screen>
          <itemizedlist>
            <listitem>remove release tag </listitem>
          </itemizedlist>
          <para/>
          <screen><![CDATA[$ cvs ci -m "more comments"
$ cvs tag Release-1
]]></screen>
          <para>* re-add release tag {{ $ cd /path/to $ cvs co -r Release-initial -d old project-x }}} </para>
          <itemizedlist>
            <listitem>
              <para>get original version to "<code>/path/to/old</code>" directory </para>
            </listitem>
          </itemizedlist>
          <para/>
          <screen><![CDATA[$ cd old
$ cvs tag -b Release-initial-bugfixes
]]></screen>
          <itemizedlist>
            <listitem>
              <para>create branch (-b) tag "<code>Release-initial-bugfixes</code>" </para>
            </listitem>
            <listitem>now you can work on the old version (Tag is sticky) </listitem>
          </itemizedlist>
          <para/>
          <screen><![CDATA[$ cvs update -d -P
]]></screen>
          <itemizedlist>
            <listitem>don't create empty directories </listitem>
            <listitem>source tree now has sticky tag "Release-initial-bugfixes" </listitem>
            <listitem>work on this branch ... while someone else making changes too </listitem>
          </itemizedlist>
          <para/>
          <screen><![CDATA[$ cvs up -d -P
]]></screen>
          <itemizedlist>
            <listitem>sync with files modified by others on this branch </listitem>
          </itemizedlist>
          <para/>
          <screen><![CDATA[$ cvs ci -m "check into this branch"
$ cvs update -kk -A -d -P
]]></screen>
          <itemizedlist>
            <listitem>remove sticky tag and forget contents </listitem>
            <listitem>update from main trunk without keyword expansion </listitem>
          </itemizedlist>
          <para/>
          <screen><![CDATA[$ cvs update -kk -d -P -j Release-initial-bugfixes
]]></screen>
          <itemizedlist>
            <listitem>merge from Release-initial-bugfixes branch into the main </listitem>
            <listitem>trunk without keyword expansion.  Fix conflicts with editor. </listitem>
          </itemizedlist>
          <para/>
          <screen><![CDATA[$ cvs ci -m "merge Release-initial-bugfixes"
$ cd
$ tar -cvzf old-project-x.tar.gz old
]]></screen>
          <itemizedlist>
            <listitem>
              <para>make archive. use "<code>-j</code>" if you want <code>.tar.bz2</code> . </para>
            </listitem>
          </itemizedlist>
          <para/>
          <screen><![CDATA[$ cvs release -d old
]]></screen>
          <itemizedlist>
            <listitem>remove local source (optional) </listitem>
          </itemizedlist>
          <table>
            <caption/>
            <tgroup cols="2">
              <colspec colname="xxx1"/>
              <colspec colname="xxx2"/>
              <tbody>
                <row>
                  <entry>
                    <para> Notable options for <code>CVS</code> commands  (use as first argument(s) to <code>cvs</code>). </para>
                  </entry>
                  <entry>
                    <para> </para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>
                      <emphasis role="strong">option</emphasis>
                    </para>
                  </entry>
                  <entry>
                    <para>
                      <emphasis role="strong">meaning</emphasis>
                    </para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>
                      <code>-n</code>
                    </para>
                  </entry>
                  <entry>
                    <para> dry run, no effect </para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>
                      <code>-t</code>
                    </para>
                  </entry>
                  <entry>
                    <para> display messages showing steps of cvs activity </para>
                  </entry>
                </row>
              </tbody>
            </tgroup>
          </table>
          <para/>
        </section>
        <section>
          <title>Export files from CVS</title>
          <para>To get the latest version from CVS, use "tomorrow": </para>
          <para/>
          <screen><![CDATA[$ cvs ex -D tomorrow module_name
]]></screen>
          <para/>
        </section>
        <section>
          <title>Administer CVS</title>
          <para>Add alias to a project (local server): </para>
          <para/>
          <screen><![CDATA[$ export CVSROOT=/var/lib/cvs
$ cvs co CVSROOT/modules
$ cd CVSROOT
$ echo "px -a project-x" >>modules
$ cvs ci -m "Now px is an alias for project-x"
$ cvs release -d .
$ cvs co -d project px
]]></screen>
          <itemizedlist>
            <listitem>check out project-x (alias:px) from CVS to directory project </listitem>
          </itemizedlist>
          <para/>
          <screen><![CDATA[$ cd project
]]></screen>
          <itemizedlist>
            <listitem>make changes to the content ... </listitem>
          </itemizedlist>
          <para>In order to perform above procedure, you should have the appropriate file permission. </para>
          <para/>
        </section>
        <section>
          <title>File permissions in repository</title>
          <para>CVS will not overwrite the current repository file but replaces it with another one.  Thus, write permission to the repository directory is critical.  For every new repository creation, run the following to ensure this condition if needed. </para>
          <para/>
          <screen><![CDATA[# cd /var/lib/cvs
# chown -R root:src repository
# chmod -R ug+rwX   repository
# chmod    2775     repository
]]></screen>
          <para/>
        </section>
        <section>
          <title>Execution bit</title>
          <para>A file's execution bit is retained when checked out.  Whenever you see execution permission problems in checked-out files, change permissions of the file in the CVS repository with the following command. </para>
          <para/>
          <screen><![CDATA[# chmod ugo-x filename
]]></screen>
          <para/>
        </section>
      </section>
      <section>
        <title>Subversion</title>
        <para>Subversion is a "next-generation" version control system, intended to replace CVS, so it has most of CVS's features. Generally, Subversion's interface to a particular feature is similar to CVS's, except where there's a compelling reason to do otherwise. </para>
        <para/>
        <section>
          <title>Installing a Subversion server</title>
          <para>You need to install the <code>subversion</code>, <code>libapache2-svn</code> and <code>subversion-tools</code> packages to set up a server. </para>
          <para/>
        </section>
        <section>
          <title>Setting up a repository</title>
          <para>Currently, the <code>subversion</code> package does not set up a repository, so one must be set up manually.  One possible location for a repository is in <code>/var/local/repos</code>. </para>
          <para>Create the directory: </para>
          <screen><![CDATA[# mkdir -p /var/local/repos
]]></screen>
          <para>Create the repository database: </para>
          <para/>
          <screen><![CDATA[# svnadmin create /var/local/repos
]]></screen>
          <para>Make the repository writable by the WWW server: </para>
          <para/>
          <screen><![CDATA[# chown -R www-data:www-data /var/local/repos
]]></screen>
          <para/>
        </section>
        <section>
          <title>Configuring Apache2</title>
          <para>To allow access to the repository via user authentication, add (or uncomment) the following in <code>/etc/apache2/mods-available/dav_svn.conf</code>: </para>
          <para/>
          <screen><![CDATA[<Location /repos>
  DAV svn
  SVNPath /var/local/repos
  AuthType Basic
  AuthName "Subversion repository"
  AuthUserFile /etc/subversion/passwd
<LimitExcept GET PROPFIND OPTIONS REPORT>
    Require valid-user
</LimitExcept>
</Location>
]]></screen>
          <para>Then, create a user authentication file with the command: </para>
          <para/>
          <screen><![CDATA[htpasswd2 -c /etc/subversion/passwd some-username
]]></screen>
          <para>Restart Apache2, and your new Subversion repository will be accessible with the URL <code>http://hostname/repos</code>. </para>
          <para/>
        </section>
        <section>
          <title>Subversion usage examples</title>
          <para>The following sections teach you how to use different commands in Subversion. </para>
          <para/>
        </section>
        <section>
          <title>Create a new Subversion archive</title>
          <para>To create a new Subversion archive, type the following: </para>
          <para/>
          <screen><![CDATA[$ cd ~/your-project         # go to your source directory
$ svn import http://localhost/repos your-project project-name -m "initial project import"
]]></screen>
          <para>This creates a directory named project-name in your Subversion repository which contains your project files.  Look at <code>http://localhost/repos/</code> to see if it's there. </para>
          <para/>
        </section>
        <section>
          <title>Working with Subversion</title>
          <para>Working with project-y using Subversion: </para>
          <para/>
          <screen><![CDATA[$ mkdir -p /path/to ;cd  /path/to
$ svn co http://localhost/repos/project-y
]]></screen>
          <itemizedlist>
            <listitem>Check out sources </listitem>
          </itemizedlist>
          <para/>
          <screen><![CDATA[$ cd project-y
]]></screen>
          <itemizedlist>
            <listitem>do some work ... </listitem>
          </itemizedlist>
          <para/>
          <screen><![CDATA[$ svn diff
]]></screen>
          <itemizedlist>
            <listitem>
              <para>similar to "<code>diff -u repository/ local/</code>" </para>
            </listitem>
          </itemizedlist>
          <para/>
          <screen><![CDATA[$ svn revert modified_file
]]></screen>
          <itemizedlist>
            <listitem>undo changes to a file </listitem>
          </itemizedlist>
          <para/>
          <screen><![CDATA[$ svn ci -m "Describe changes"
]]></screen>
          <itemizedlist>
            <listitem>check in your changes to the repository </listitem>
          </itemizedlist>
          <para/>
          <screen><![CDATA[$ vi newfile_added
$ svn add newfile_added
$ svn add new_dir
]]></screen>
          <itemizedlist>
            <listitem>recursively add all files in new_dir </listitem>
          </itemizedlist>
          <para/>
          <screen><![CDATA[$ svn add -N new_dir2
]]></screen>
          <itemizedlist>
            <listitem>non recursively add the directory </listitem>
          </itemizedlist>
          <para/>
          <screen><![CDATA[$ svn ci -m "Added newfile_added, new_dir, new_dir2"
$ svn up
]]></screen>
          <itemizedlist>
            <listitem>merge in latest version from repository </listitem>
          </itemizedlist>
          <para/>
          <screen><![CDATA[$ svn log
]]></screen>
          <itemizedlist>
            <listitem>shows all changes committed </listitem>
          </itemizedlist>
          <para/>
          <screen><![CDATA[$ svn copy http://localhost/repos/project-y \
      http://localhost/repos/project-y-branch \
      -m "creating my branch of project-y"
]]></screen>
          <itemizedlist>
            <listitem>branching project-y </listitem>
          </itemizedlist>
          <para/>
          <screen><![CDATA[$ svn copy http://localhost/repos/project-y \
      http://localhost/repos/projct-y-release1.0 \
      -m "project-y 1.0 release"
]]></screen>
          <itemizedlist>
            <listitem>added release tag. </listitem>
            <listitem>note that branching and tagging are the same. The only difference is that branches get committed whereas tags do not. </listitem>
            <listitem>make changes to branch ... </listitem>
          </itemizedlist>
          <para/>
          <screen><![CDATA[$ svn merge http://localhost/repos/project-y \
   http://localhost/repos/project-y-branch
]]></screen>
          <itemizedlist>
            <listitem>merge branched copy back to main copy </listitem>
          </itemizedlist>
          <para/>
          <screen><![CDATA[$ svn co -r 4 http://localhost/repos/project-y
]]></screen>
          <itemizedlist>
            <listitem>get revision 4 </listitem>
          </itemizedlist>
          <para/>
        </section>
      </section>
      <section>
        <title>Git</title>
        <para>Git can do everything for both local and remote source code management.  This means that you can record the source code changes without needing network connectivity to the remote repository. </para>
        <para/>
        <section>
          <title>Before using Git</title>
          <para>You may wish to set several global configuration in <code>~/.gitconfig</code> such as your name and email address used by Git: </para>
          <screen><![CDATA[$ git config --global user.name "Name Surname"
$ git config --global user.email yourname@example.com
]]></screen>
          <para>If you are too used to CVS or Subversion commands, you may wish to set several command aliases; </para>
          <screen><![CDATA[$ git config --global alias.ci "commit -a"
$ git config --global alias.co checkout
]]></screen>
          <para>You can check your global configuration by: </para>
          <screen><![CDATA[$ git config --global --list
]]></screen>
          <para/>
        </section>
        <section>
          <title>Git references</title>
          <para>There are good references for Git. </para>
          <itemizedlist>
            <listitem>
              <para>
                <ulink url="http://www.kernel.org/pub/software/scm/git/docs/git.html">manpage: git(1)</ulink>
              </para>
            </listitem>
            <listitem>
              <para>
                <ulink url="http://www.kernel.org/pub/software/scm/git/docs/user-manual.html">Git User's Manual</ulink>
              </para>
            </listitem>
            <listitem>
              <para>
                <ulink url="http://www.kernel.org/pub/software/scm/git/docs/gittutorial.html">A tutorial introduction to git</ulink>
              </para>
            </listitem>
            <listitem>
              <para>
                <ulink url="http://www.kernel.org/pub/software/scm/git/docs/gittutorial-2.html">A tutorial introduction to git: part two</ulink>
              </para>
            </listitem>
            <listitem>
              <para>
                <ulink url="http://www.kernel.org/pub/software/scm/git/docs/everyday.html">Everyday GIT With 20 Commands Or So</ulink>
              </para>
            </listitem>
            <listitem>
              <para><ulink url="http://www.kernel.org/pub/software/scm/git/docs/gitcvs-migration.html">git for CVS users</ulink> : This also describes  how to set up server like CVS and extract old data from CVS into there. </para>
            </listitem>
            <listitem>
              <para>
                <ulink url="http://git.or.cz/course/svn.html">Git - SVN Crash Course</ulink>
              </para>
            </listitem>
            <listitem>
              <para>
                <ulink url="http://git.or.cz/course/stgit.html">StGit Crash Course</ulink>
              </para>
            </listitem>
          </itemizedlist>
          <para>The <code>git-gui</code> and <code>gitk</code> commands make using Git very easy. </para>
          <para><inlinemediaobject><imageobject><imagedata width="15" fileref="/htdocs/rightsidebar/img/alert.png" depth="15"/></imageobject><textobject><phrase>/!\</phrase></textobject></inlinemediaobject> Do not use the tag string with spaces in it even if some tools such as <code>gitk</code> allow you to use it.  It will choke some other <code>git</code> commands. </para>
          <para/>
        </section>
        <section>
          <title>Git commands</title>
          <para>Even if your upstream uses different VCS, it is good idea to use <code>git</code>(1) for local activity since you can manage your local copy of source tree without the network connection to the upstream.  Here are commands used with <code>git</code>(1). </para>
          <table>
            <caption/>
            <tgroup cols="4">
              <colspec colname="xxx1"/>
              <colspec colname="xxx2"/>
              <colspec colname="xxx3"/>
              <colspec colname="xxx4"/>
              <tbody>
                <row>
                  <entry>
                    <para> List of git packages and commands. </para>
                  </entry>
                  <entry>
                    <para> 2 </para>
                  </entry>
                  <entry>
                    <para> 3 </para>
                  </entry>
                  <entry>
                    <para> 4 </para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>
                      <emphasis role="strong">command</emphasis>
                    </para>
                  </entry>
                  <entry>
                    <para>
                      <emphasis role="strong">package</emphasis>
                    </para>
                  </entry>
                  <entry>
                    <para>
                      <emphasis role="strong">popcon</emphasis>
                    </para>
                  </entry>
                  <entry>
                    <para>
                      <emphasis role="strong">size</emphasis>
                    </para>
                  </entry>
                  <entry>
                    <para>
                      <emphasis role="strong">description</emphasis>
                    </para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para> N/A </para>
                  </entry>
                  <entry>
                    <para>
                      <code>git-doc</code>
                    </para>
                  </entry>
                  <entry>
                    <para> *862 </para>
                  </entry>
                  <entry>
                    <para> - </para>
                  </entry>
                  <entry>
                    <para> This provide the documentation for Git. </para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para><code>git</code>(7) </para>
                  </entry>
                  <entry>
                    <para>
                      <code>git-core</code>
                    </para>
                  </entry>
                  <entry>
                    <para> 512 </para>
                  </entry>
                  <entry>
                    <para> - </para>
                  </entry>
                  <entry>
                    <para> The main command for Git. </para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para><code>gitk</code>(1) </para>
                  </entry>
                  <entry>
                    <para>
                      <code>gitk</code>
                    </para>
                  </entry>
                  <entry>
                    <para> 94 </para>
                  </entry>
                  <entry>
                    <para> - </para>
                  </entry>
                  <entry>
                    <para> The GUI Git repository browser with history. </para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para><code>git-gui</code>(1) </para>
                  </entry>
                  <entry>
                    <para>
                      <code>git-gui</code>
                    </para>
                  </entry>
                  <entry>
                    <para> 28 </para>
                  </entry>
                  <entry>
                    <para> - </para>
                  </entry>
                  <entry>
                    <para> The GUI for Git. (No history) </para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para><code>git-svnimport</code>(1) </para>
                  </entry>
                  <entry>
                    <para>
                      <code>git-svn</code>
                    </para>
                  </entry>
                  <entry>
                    <para> 68 </para>
                  </entry>
                  <entry>
                    <para> - </para>
                  </entry>
                  <entry>
                    <para>  This import the data out of Subversion into Git. </para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para><code>git-svn</code>(1) </para>
                  </entry>
                  <entry>
                    <para>
                      <code>git-svn</code>
                    </para>
                  </entry>
                  <entry>
                    <para> 68 </para>
                  </entry>
                  <entry>
                    <para> - </para>
                  </entry>
                  <entry>
                    <para> This provides bidirectional operation between the Subversion and Git. </para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para><code>git-cvsimport</code>(1) </para>
                  </entry>
                  <entry>
                    <para>
                      <code>git-cvs</code>
                    </para>
                  </entry>
                  <entry>
                    <para> 49 </para>
                  </entry>
                  <entry>
                    <para> - </para>
                  </entry>
                  <entry>
                    <para> This import the data out of CVS into Git. </para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para><code>git-cvsexportcommit</code>(1) </para>
                  </entry>
                  <entry>
                    <para>
                      <code>git-cvs</code>
                    </para>
                  </entry>
                  <entry>
                    <para> 49 </para>
                  </entry>
                  <entry>
                    <para> - </para>
                  </entry>
                  <entry>
                    <para> This exports a commit to a CVS checkout from Git. </para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para><code>git-cvsserver</code>(1) </para>
                  </entry>
                  <entry>
                    <para>
                      <code>git-cvs</code>
                    </para>
                  </entry>
                  <entry>
                    <para> 49 </para>
                  </entry>
                  <entry>
                    <para> - </para>
                  </entry>
                  <entry>
                    <para> A CVS server emulator for Git. </para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para><code>git-send-email</code>(1) </para>
                  </entry>
                  <entry>
                    <para>
                      <code>git-email</code>
                    </para>
                  </entry>
                  <entry>
                    <para> 37 </para>
                  </entry>
                  <entry>
                    <para> - </para>
                  </entry>
                  <entry>
                    <para> This sends a collection of patches as email from the Git. </para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para><code>stg</code>(1) </para>
                  </entry>
                  <entry>
                    <para>
                      <code>stgit</code>
                    </para>
                  </entry>
                  <entry>
                    <para> 31 </para>
                  </entry>
                  <entry>
                    <para> - </para>
                  </entry>
                  <entry>
                    <para> This is quilt on top of git. (Python) </para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para><code>git-buildpackage</code>(1) </para>
                  </entry>
                  <entry>
                    <para>
                      <code>git-buildpackage</code>
                    </para>
                  </entry>
                  <entry>
                    <para> 17 </para>
                  </entry>
                  <entry>
                    <para> - </para>
                  </entry>
                  <entry>
                    <para> This automates the Debian packaging with the Git. </para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para><code>guilt</code>(7) </para>
                  </entry>
                  <entry>
                    <para>
                      <code>guilt</code>
                    </para>
                  </entry>
                  <entry>
                    <para> 9 </para>
                  </entry>
                  <entry>
                    <para> - </para>
                  </entry>
                  <entry>
                    <para> This is quilt on top of git. (SH/AWK/SED/...) </para>
                  </entry>
                </row>
              </tbody>
            </tgroup>
          </table>
          <para/>
        </section>
        <section>
          <title>Git for recording configuration history</title>
          <para>You can manually record chronological history of configuration using <ulink url="http://en.wikipedia.org/wiki/Git_(software)">Git</ulink> tools.  Here is a simple example for your practice to record <code>/etc/apt/</code> contents.: </para>
          <para/>
          <para/>
          <para/>
          <screen><![CDATA[$ cd /etc/apt/
$ sudo git init
$ sudo chmod 700 .git
$ sudo git add .
$ sudo git commit -a
]]></screen>
          <itemizedlist>
            <listitem>commit configuration with description. </listitem>
            <listitem>make modification to the configuration files </listitem>
          </itemizedlist>
          <para/>
          <screen><![CDATA[$ cd /etc/apt/
$ sudo git commit -a
]]></screen>
          <itemizedlist>
            <listitem>commit configuration with description. </listitem>
            <listitem>... continue your life ... </listitem>
          </itemizedlist>
          <para/>
          <screen><![CDATA[$ cd /etc/apt/
$ sudo gitk --all
]]></screen>
          <itemizedlist>
            <listitem>you have full configuration history with you. </listitem>
          </itemizedlist>
          <para><inlinemediaobject><imageobject><imagedata width="15" fileref="/htdocs/rightsidebar/img/idea.png" depth="15"/></imageobject><textobject><phrase>(!)</phrase></textobject></inlinemediaobject> The <code>sudo</code>(8) command is needed to work with permissions of configuration data.  For user configuration data, you may skip the <code>sudo</code>(8) command. </para>
          <para><inlinemediaobject><imageobject><imagedata width="15" fileref="/htdocs/rightsidebar/img/idea.png" depth="15"/></imageobject><textobject><phrase>(!)</phrase></textobject></inlinemediaobject> The "<code>chmod 700 .git</code>" command in the above example is needed to protect archive data from unauthorized read access. </para>
          <para><inlinemediaobject><imageobject><imagedata width="16" fileref="/htdocs/rightsidebar/img/icon-info.png" depth="16"/></imageobject><textobject><phrase>{i}</phrase></textobject></inlinemediaobject> For more complete setup for recording configuration history, please look for the <code>etckeeper</code> package: @{@recordingchangesinconfigurationfiles@}@.  </para>
        </section>
      </section>
    </section>
  </section>
</article>