/usr/share/debian-reference/ch10.en.html is in debian-reference-en 2.72.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 | <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Chapter 10. Data management</title>
<link rel="stylesheet" type="text/css" href="debian-reference.css"/>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link rel="home" href="index.en.html" title="Debian Reference"/>
<link rel="up" href="index.en.html" title="Debian Reference"/>
<link rel="prev" href="ch09.en.html" title="Chapter 9. System tips"/>
<link rel="next" href="ch11.en.html" title="Chapter 11. Data conversion"/>
</head>
<body>
<div class="navheader">
<table width="100%" summary="Navigation header">
<tr>
<th colspan="3" align="center">Chapter 10. Data management</th>
</tr>
<tr>
<td align="left"><a accesskey="p" href="ch09.en.html"><img src="images/prev.png" alt="Prev"/></a> </td>
<th width="60%" align="center"> </th>
<td align="right"> <a accesskey="n" href="ch11.en.html"><img src="images/next.png" alt="Next"/></a></td>
</tr>
</table>
<hr/>
</div>
<div class="chapter">
<div class="titlepage">
<div>
<div>
<h1 class="title"><a id="_data_management"/>Chapter 10. Data management</h1>
</div>
</div>
</div>
<div class="toc">
<p>
<strong>Table of Contents</strong>
</p>
<dl class="toc">
<dt>
<span class="section">
<a href="ch10.en.html#_sharing_copying_and_archiving">10.1. Sharing, copying, and archiving</a>
</span>
</dt>
<dd>
<dl>
<dt>
<span class="section">
<a href="ch10.en.html#_archive_and_compression_tools">10.1.1. Archive and compression tools</a>
</span>
</dt>
<dt>
<span class="section">
<a href="ch10.en.html#_copy_and_synchronization_tools">10.1.2. Copy and synchronization tools</a>
</span>
</dt>
<dt>
<span class="section">
<a href="ch10.en.html#_idioms_for_the_archive">10.1.3. Idioms for the archive</a>
</span>
</dt>
<dt>
<span class="section">
<a href="ch10.en.html#_idioms_for_the_copy">10.1.4. Idioms for the copy</a>
</span>
</dt>
<dt>
<span class="section">
<a href="ch10.en.html#_idioms_for_the_selection_of_files">10.1.5. Idioms for the selection of files</a>
</span>
</dt>
<dt>
<span class="section">
<a href="ch10.en.html#_archive_media">10.1.6. Archive media</a>
</span>
</dt>
<dt>
<span class="section">
<a href="ch10.en.html#_removable_storage_device">10.1.7. Removable storage device</a>
</span>
</dt>
<dt>
<span class="section">
<a href="ch10.en.html#_filesystem_choice_for_sharing_data">10.1.8. Filesystem choice for sharing data</a>
</span>
</dt>
<dt>
<span class="section">
<a href="ch10.en.html#_sharing_data_via_network">10.1.9. Sharing data via network</a>
</span>
</dt>
</dl>
</dd>
<dt>
<span class="section">
<a href="ch10.en.html#_backup_and_recovery">10.2. Backup and recovery</a>
</span>
</dt>
<dd>
<dl>
<dt>
<span class="section">
<a href="ch10.en.html#_backup_utility_suites">10.2.1. Backup utility suites</a>
</span>
</dt>
<dt>
<span class="section">
<a href="ch10.en.html#_an_example_script_for_the_system_backup">10.2.2. An example script for the system backup</a>
</span>
</dt>
<dt>
<span class="section">
<a href="ch10.en.html#_a_copy_script_for_the_data_backup">10.2.3. A copy script for the data backup</a>
</span>
</dt>
</dl>
</dd>
<dt>
<span class="section">
<a href="ch10.en.html#_data_security_infrastructure">10.3. Data security infrastructure</a>
</span>
</dt>
<dd>
<dl>
<dt>
<span class="section">
<a href="ch10.en.html#_key_management_for_gnupg">10.3.1. Key management for GnuPG</a>
</span>
</dt>
<dt>
<span class="section">
<a href="ch10.en.html#_using_gnupg_on_files">10.3.2. Using GnuPG on files</a>
</span>
</dt>
<dt>
<span class="section">
<a href="ch10.en.html#_using_gnupg_with_mutt">10.3.3. Using GnuPG with Mutt</a>
</span>
</dt>
<dt>
<span class="section">
<a href="ch10.en.html#_using_gnupg_with_vim">10.3.4. Using GnuPG with Vim</a>
</span>
</dt>
<dt>
<span class="section">
<a href="ch10.en.html#_the_md5_sum">10.3.5. The MD5 sum</a>
</span>
</dt>
</dl>
</dd>
<dt>
<span class="section">
<a href="ch10.en.html#_source_code_merge_tools">10.4. Source code merge tools</a>
</span>
</dt>
<dd>
<dl>
<dt>
<span class="section">
<a href="ch10.en.html#_extracting_differences_for_source_files">10.4.1. Extracting differences for source files</a>
</span>
</dt>
<dt>
<span class="section">
<a href="ch10.en.html#_merging_updates_for_source_files">10.4.2. Merging updates for source files</a>
</span>
</dt>
<dt>
<span class="section">
<a href="ch10.en.html#_updating_via_3_way_merge">10.4.3. Updating via 3-way-merge</a>
</span>
</dt>
</dl>
</dd>
<dt>
<span class="section">
<a href="ch10.en.html#_version_control_systems">10.5. Version control systems</a>
</span>
</dt>
<dd>
<dl>
<dt>
<span class="section">
<a href="ch10.en.html#_comparison_of_vcs_commands">10.5.1. Comparison of VCS commands</a>
</span>
</dt>
</dl>
</dd>
<dt>
<span class="section">
<a href="ch10.en.html#_git">10.6. Git</a>
</span>
</dt>
<dd>
<dl>
<dt>
<span class="section">
<a href="ch10.en.html#_configuration_of_git_client">10.6.1. Configuration of Git client</a>
</span>
</dt>
<dt>
<span class="section">
<a href="ch10.en.html#_git_references">10.6.2. Git references</a>
</span>
</dt>
<dt>
<span class="section">
<a href="ch10.en.html#_git_commands">10.6.3. Git commands</a>
</span>
</dt>
<dt>
<span class="section">
<a href="ch10.en.html#_git_for_the_subversion_repository">10.6.4. Git for the Subversion repository</a>
</span>
</dt>
<dt>
<span class="section">
<a href="ch10.en.html#_git_for_recording_configuration_history">10.6.5. Git for recording configuration history</a>
</span>
</dt>
</dl>
</dd>
<dt>
<span class="section">
<a href="ch10.en.html#_cvs">10.7. CVS</a>
</span>
</dt>
<dd>
<dl>
<dt>
<span class="section">
<a href="ch10.en.html#_configuration_of_cvs_repository">10.7.1. Configuration of CVS repository</a>
</span>
</dt>
<dt>
<span class="section">
<a href="ch10.en.html#_local_access_to_cvs">10.7.2. Local access to CVS</a>
</span>
</dt>
<dt>
<span class="section">
<a href="ch10.en.html#_remote_access_to_cvs_with_pserver">10.7.3. Remote access to CVS with pserver</a>
</span>
</dt>
<dt>
<span class="section">
<a href="ch10.en.html#_remote_access_to_cvs_with_ssh">10.7.4. Remote access to CVS with ssh</a>
</span>
</dt>
<dt>
<span class="section">
<a href="ch10.en.html#_importing_a_new_source_to_cvs">10.7.5. Importing a new source to CVS</a>
</span>
</dt>
<dt>
<span class="section">
<a href="ch10.en.html#_file_permissions_in_cvs_repository">10.7.6. File permissions in CVS repository</a>
</span>
</dt>
<dt>
<span class="section">
<a href="ch10.en.html#_work_flow_of_cvs">10.7.7. Work flow of CVS</a>
</span>
</dt>
<dt>
<span class="section">
<a href="ch10.en.html#_latest_files_from_cvs">10.7.8. Latest files from CVS</a>
</span>
</dt>
<dt>
<span class="section">
<a href="ch10.en.html#_administration_of_cvs">10.7.9. Administration of CVS</a>
</span>
</dt>
<dt>
<span class="section">
<a href="ch10.en.html#_execution_bit_for_cvs_checkout">10.7.10. Execution bit for CVS checkout</a>
</span>
</dt>
</dl>
</dd>
<dt>
<span class="section">
<a href="ch10.en.html#_subversion">10.8. Subversion</a>
</span>
</dt>
<dd>
<dl>
<dt>
<span class="section">
<a href="ch10.en.html#_configuration_of_subversion_repository">10.8.1. Configuration of Subversion repository</a>
</span>
</dt>
<dt>
<span class="section">
<a href="ch10.en.html#_access_to_subversion_via_apache2_server">10.8.2. Access to Subversion via Apache2 server</a>
</span>
</dt>
<dt>
<span class="section">
<a href="ch10.en.html#_local_access_to_subversion_by_group">10.8.3. Local access to Subversion by group</a>
</span>
</dt>
<dt>
<span class="section">
<a href="ch10.en.html#_remote_access_to_subversion_via_ssh">10.8.4. Remote access to Subversion via SSH</a>
</span>
</dt>
<dt>
<span class="section">
<a href="ch10.en.html#_subversion_directory_structure">10.8.5. Subversion directory structure</a>
</span>
</dt>
<dt>
<span class="section">
<a href="ch10.en.html#_importing_a_new_source_to_subversion">10.8.6. Importing a new source to Subversion</a>
</span>
</dt>
<dt>
<span class="section">
<a href="ch10.en.html#_work_flow_of_subversion">10.8.7. Work flow of Subversion</a>
</span>
</dt>
</dl>
</dd>
</dl>
</div>
<p>Tools and tips for managing binary and text data on the Debian system are described.</p>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title"><a id="_sharing_copying_and_archiving"/>10.1. Sharing, copying, and archiving</h2>
</div>
</div>
</div>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Warning">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Warning]" src="images/warning.png"/>
</td>
<th align="left">Warning</th>
</tr>
<tr>
<td align="left" valign="top">
<p>The uncoordinated write access to actively accessed devices and files from multiple processes must not be done to avoid the <a class="ulink" href="http://en.wikipedia.org/wiki/Race_condition">race condition</a>. <a class="ulink" href="http://en.wikipedia.org/wiki/File_locking">File locking</a> mechanisms using <span class="citerefentry"><span class="refentrytitle">flock</span>(1)</span> may be used to avoid it.</p>
</td>
</tr>
</table>
</div>
<p>The security of the data and its controlled sharing have several aspects.</p>
<div class="itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<p>
The creation of data archive
</p>
</li>
<li class="listitem">
<p>
The remote storage access
</p>
</li>
<li class="listitem">
<p>
The duplication
</p>
</li>
<li class="listitem">
<p>
The tracking of the modification history
</p>
</li>
<li class="listitem">
<p>
The facilitation of data sharing
</p>
</li>
<li class="listitem">
<p>
The prevention of unauthorized file access
</p>
</li>
<li class="listitem">
<p>
The detection of unauthorized file modification
</p>
</li>
</ul>
</div>
<p>These can be realized by using some combination of tools.</p>
<div class="itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<p>
Archive and compression tools
</p>
</li>
<li class="listitem">
<p>
Copy and synchronization tools
</p>
</li>
<li class="listitem">
<p>
Network filesystems
</p>
</li>
<li class="listitem">
<p>
Removable storage media
</p>
</li>
<li class="listitem">
<p>
The secure shell
</p>
</li>
<li class="listitem">
<p>
The authentication system
</p>
</li>
<li class="listitem">
<p>
Version control system tools
</p>
</li>
<li class="listitem">
<p>
Hash and cryptographic encryption tools
</p>
</li>
</ul>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a id="_archive_and_compression_tools"/>10.1.1. Archive and compression tools</h3>
</div>
</div>
</div>
<p>Here is a summary of archive and compression tools available on the Debian system.</p>
<div class="table">
<a id="listofarchiveandcompressiontools"/>
<p class="title">
<strong>Table 10.1. List of archive and compression tools</strong>
</p>
<div class="table-contents">
<table class="table" summary="List of archive and compression tools" border="1">
<colgroup>
<col style="text-align: left"/>
<col style="text-align: left"/>
<col style="text-align: left"/>
<col style="text-align: left"/>
<col style="text-align: left"/>
<col style="text-align: left"/>
</colgroup>
<thead>
<tr>
<th style="text-align: left">
package
</th>
<th style="text-align: left">
popcon
</th>
<th style="text-align: left">
size
</th>
<th style="text-align: left">
extension
</th>
<th style="text-align: left">
command
</th>
<th style="text-align: left">
comment
</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/tar">
<code class="literal">tar</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=tar">V:907, I:999</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/t/tar.html">2770</a>
</td>
<td style="text-align: left">
<code class="literal">.tar</code>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">tar</span>(1)</span>
</td>
<td style="text-align: left">
the standard archiver (de facto standard)
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/cpio">
<code class="literal">cpio</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=cpio">V:365, I:999</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/c/cpio.html">989</a>
</td>
<td style="text-align: left">
<code class="literal">.cpio</code>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">cpio</span>(1)</span>
</td>
<td style="text-align: left">
Unix System V style archiver, use with <span class="citerefentry"><span class="refentrytitle">find</span>(1)</span>
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/binutils">
<code class="literal">binutils</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=binutils">V:201, I:699</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/b/binutils.html">90</a>
</td>
<td style="text-align: left">
<code class="literal">.ar</code>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">ar</span>(1)</span>
</td>
<td style="text-align: left">
archiver for the creation of static libraries
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/fastjar">
<code class="literal">fastjar</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=fastjar">V:5, I:51</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/f/fastjar.html">172</a>
</td>
<td style="text-align: left">
<code class="literal">.jar</code>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">fastjar</span>(1)</span>
</td>
<td style="text-align: left">
archiver for Java (zip like)
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/pax">
<code class="literal">pax</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=pax">V:15, I:42</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/p/pax.html">175</a>
</td>
<td style="text-align: left">
<code class="literal">.pax</code>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">pax</span>(1)</span>
</td>
<td style="text-align: left">
new POSIX standard archiver, compromise between <code class="literal">tar</code> and <code class="literal">cpio</code>
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/gzip">
<code class="literal">gzip</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=gzip">V:876, I:999</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/g/gzip.html">231</a>
</td>
<td style="text-align: left">
<code class="literal">.gz</code>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">gzip</span>(1)</span>, <span class="citerefentry"><span class="refentrytitle">zcat</span>(1)</span>, …
</td>
<td style="text-align: left">
GNU <a class="ulink" href="http://en.wikipedia.org/wiki/LZ77_and_LZ78">LZ77</a> compression utility (de facto standard)
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/bzip2">
<code class="literal">bzip2</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=bzip2">V:196, I:946</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/b/bzip2.html">184</a>
</td>
<td style="text-align: left">
<code class="literal">.bz2</code>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">bzip2</span>(1)</span>, <span class="citerefentry"><span class="refentrytitle">bzcat</span>(1)</span>, …
</td>
<td style="text-align: left"><a class="ulink" href="http://en.wikipedia.org/wiki/Burrows-Wheeler_transform">Burrows-Wheeler block-sorting compression</a> utility with higher compression ratio than <span class="citerefentry"><span class="refentrytitle">gzip</span>(1)</span> (slower than <code class="literal">gzip</code> with similar syntax)
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/lzma">
<code class="literal">lzma</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=lzma">V:4, I:48</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/l/lzma.html">141</a>
</td>
<td style="text-align: left">
<code class="literal">.lzma</code>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">lzma</span>(1)</span>
</td>
<td style="text-align: left"><a class="ulink" href="http://en.wikipedia.org/wiki/Lempel-Ziv-Markov_chain_algorithm">LZMA</a> compression utility with higher compression ratio than <span class="citerefentry"><span class="refentrytitle">gzip</span>(1)</span> (deprecated)
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/xz-utils">
<code class="literal">xz-utils</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=xz-utils">V:441, I:958</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/x/xz-utils.html">515</a>
</td>
<td style="text-align: left">
<code class="literal">.xz</code>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">xz</span>(1)</span>, <span class="citerefentry"><span class="refentrytitle">xzdec</span>(1)</span>, …
</td>
<td style="text-align: left"><a class="ulink" href="http://en.wikipedia.org/wiki/Xz">XZ</a> compression utility with higher compression ratio than <span class="citerefentry"><span class="refentrytitle">bzip2</span>(1)</span> (slower than <code class="literal">gzip</code> but faster than <code class="literal">bzip2</code>; replacement for <a class="ulink" href="http://en.wikipedia.org/wiki/Lempel-Ziv-Markov_chain_algorithm">LZMA</a> compression utility)
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/p7zip">
<code class="literal">p7zip</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=p7zip">V:78, I:385</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/p/p7zip.html">986</a>
</td>
<td style="text-align: left">
<code class="literal">.7z</code>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">7zr</span>(1)</span>, <span class="citerefentry"><span class="refentrytitle">p7zip</span>(1)</span>
</td>
<td style="text-align: left"><a class="ulink" href="http://en.wikipedia.org/wiki/7-Zip">7-Zip</a> file archiver with high compression ratio (<a class="ulink" href="http://en.wikipedia.org/wiki/Lempel-Ziv-Markov_chain_algorithm">LZMA</a> compression)
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/p7zip-full">
<code class="literal">p7zip-full</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=p7zip-full">V:143, I:531</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/p/p7zip-full.html">4659</a>
</td>
<td style="text-align: left">
<code class="literal">.7z</code>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">7z</span>(1)</span>, <span class="citerefentry"><span class="refentrytitle">7za</span>(1)</span>
</td>
<td style="text-align: left"><a class="ulink" href="http://en.wikipedia.org/wiki/7-Zip">7-Zip</a> file archiver with high compression ratio (<a class="ulink" href="http://en.wikipedia.org/wiki/Lempel-Ziv-Markov_chain_algorithm">LZMA</a> compression and others)
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/lzop">
<code class="literal">lzop</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=lzop">V:6, I:48</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/l/lzop.html">97</a>
</td>
<td style="text-align: left">
<code class="literal">.lzo</code>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">lzop</span>(1)</span>
</td>
<td style="text-align: left"><a class="ulink" href="http://en.wikipedia.org/wiki/Lempel-Ziv-Oberhumer">LZO</a> compression utility with higher compression and decompression speed than <span class="citerefentry"><span class="refentrytitle">gzip</span>(1)</span> (lower compression ratio than <code class="literal">gzip</code> with similar syntax)
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/zip">
<code class="literal">zip</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=zip">V:52, I:432</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/z/zip.html">608</a>
</td>
<td style="text-align: left">
<code class="literal">.zip</code>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">zip</span>(1)</span>
</td>
<td style="text-align: left"><a class="ulink" href="http://en.wikipedia.org/wiki/Info-ZIP">InfoZIP</a>: DOS archive and compression tool
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/unzip">
<code class="literal">unzip</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=unzip">V:290, I:803</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/u/unzip.html">534</a>
</td>
<td style="text-align: left">
<code class="literal">.zip</code>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">unzip</span>(1)</span>
</td>
<td style="text-align: left"><a class="ulink" href="http://en.wikipedia.org/wiki/Info-ZIP">InfoZIP</a>: DOS unarchive and decompression tool
</td>
</tr>
</tbody>
</table>
</div>
</div>
<br class="table-break"/>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Warning">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Warning]" src="images/warning.png"/>
</td>
<th align="left">Warning</th>
</tr>
<tr>
<td align="left" valign="top">
<p>Do not set the "<code class="literal">$TAPE</code>" variable unless you know what to expect. It changes <span class="citerefentry"><span class="refentrytitle">tar</span>(1)</span> behavior.</p>
</td>
</tr>
</table>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Note]" src="images/note.png"/>
</td>
<th align="left">Note</th>
</tr>
<tr>
<td align="left" valign="top">
<p>The gzipped <span class="citerefentry"><span class="refentrytitle">tar</span>(1)</span> archive uses the file extension "<code class="literal">.tgz</code>" or "<code class="literal">.tar.gz</code>".</p>
</td>
</tr>
</table>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Note]" src="images/note.png"/>
</td>
<th align="left">Note</th>
</tr>
<tr>
<td align="left" valign="top">
<p>The xz-compressed <span class="citerefentry"><span class="refentrytitle">tar</span>(1)</span> archive uses the file extension "<code class="literal">.txz</code>" or "<code class="literal">.tar.xz</code>".</p>
</td>
</tr>
</table>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Note]" src="images/note.png"/>
</td>
<th align="left">Note</th>
</tr>
<tr>
<td align="left" valign="top">
<p>Popular compression method in <a class="ulink" href="http://en.wikipedia.org/wiki/Free_and_open_source_software">FOSS</a> tools such as <span class="citerefentry"><span class="refentrytitle">tar</span>(1)</span> has been moving as follows: <code class="literal">gzip</code> → <code class="literal">bzip2</code> → <code class="literal">xz</code></p>
</td>
</tr>
</table>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Note]" src="images/note.png"/>
</td>
<th align="left">Note</th>
</tr>
<tr>
<td align="left" valign="top">
<p><span class="citerefentry"><span class="refentrytitle">cp</span>(1)</span>, <span class="citerefentry"><span class="refentrytitle">scp</span>(1)</span> and <span class="citerefentry"><span class="refentrytitle">tar</span>(1)</span> may have some limitation for special files. <span class="citerefentry"><span class="refentrytitle">cpio</span>(1)</span> is most versatile.</p>
</td>
</tr>
</table>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Note]" src="images/note.png"/>
</td>
<th align="left">Note</th>
</tr>
<tr>
<td align="left" valign="top">
<p><span class="citerefentry"><span class="refentrytitle">cpio</span>(1)</span> is designed to be used with <span class="citerefentry"><span class="refentrytitle">find</span>(1)</span> and other commands and suitable for creating backup scripts since the file selection part of the script can be tested independently.</p>
</td>
</tr>
</table>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Note]" src="images/note.png"/>
</td>
<th align="left">Note</th>
</tr>
<tr>
<td align="left" valign="top">
<p>Internal structure of Libreoffice data files are "<code class="literal">.jar</code>" file which can be opened also by <code class="literal">unzip</code>.</p>
</td>
</tr>
</table>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Note]" src="images/note.png"/>
</td>
<th align="left">Note</th>
</tr>
<tr>
<td align="left" valign="top">
<p>The de-facto cross platform archive tool is <code class="literal">zip</code>. Use it as "<code class="literal">zip -rX</code>" to attain the maximum compatibility. Use also the "<code class="literal">-s</code>" option, if the maximum file size matters.</p>
</td>
</tr>
</table>
</div>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a id="_copy_and_synchronization_tools"/>10.1.2. Copy and synchronization tools</h3>
</div>
</div>
</div>
<p>Here is a summary of simple copy and backup tools available on the Debian system.</p>
<div class="table">
<a id="listofcopyandsynhronizationtools"/>
<p class="title">
<strong>Table 10.2. List of copy and synchronization tools</strong>
</p>
<div class="table-contents">
<table class="table" summary="List of copy and synchronization tools" border="1">
<colgroup>
<col style="text-align: left"/>
<col style="text-align: left"/>
<col style="text-align: left"/>
<col style="text-align: left"/>
<col style="text-align: left"/>
</colgroup>
<thead>
<tr>
<th style="text-align: left">
package
</th>
<th style="text-align: left">
popcon
</th>
<th style="text-align: left">
size
</th>
<th style="text-align: left">
tool
</th>
<th style="text-align: left">
function
</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/coreutils">
<code class="literal">coreutils</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=coreutils">V:878, I:999</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/c/coreutils.html">15016</a>
</td>
<td style="text-align: left">
GNU cp
</td>
<td style="text-align: left">
locally copy files and directories ("-a" for recursive)
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/openssh-client">
<code class="literal">openssh-client</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=openssh-client">V:821, I:996</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/o/openssh-client.html">4151</a>
</td>
<td style="text-align: left">
scp
</td>
<td style="text-align: left">
remotely copy files and directories (client, "<code class="literal">-r</code>" for recursive)
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/openssh-server">
<code class="literal">openssh-server</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=openssh-server">V:680, I:802</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/o/openssh-server.html">873</a>
</td>
<td style="text-align: left">
sshd
</td>
<td style="text-align: left">
remotely copy files and directories (remote server)
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/rsync">
<code class="literal">rsync</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=rsync">V:269, I:602</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/r/rsync.html">691</a>
</td>
<td style="text-align: left">
-
</td>
<td style="text-align: left">
1-way remote synchronization and backup
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/unison">
<code class="literal">unison</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=unison">V:4, I:19</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/u/unison.html">3452</a>
</td>
<td style="text-align: left">
-
</td>
<td style="text-align: left">
2-way remote synchronization and backup
</td>
</tr>
</tbody>
</table>
</div>
</div>
<br class="table-break"/>
<p>Copying files with <span class="citerefentry"><span class="refentrytitle">rsync</span>(8)</span> offers richer features than others.</p>
<div class="itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<p>
delta-transfer algorithm that sends only the differences between the source files and the existing files in the destination
</p>
</li>
<li class="listitem">
<p>
quick check algorithm (by default) that looks for files that have changed in size or in last-modified time
</p>
</li>
<li class="listitem">
<p>
"<code class="literal">--exclude</code>" and "<code class="literal">--exclude-from</code>" options similar to <span class="citerefentry"><span class="refentrytitle">tar</span>(1)</span>
</p>
</li>
<li class="listitem">
<p>
"a trailing slash on the source directory" syntax that avoids creating an additional directory level at the destination.
</p>
</li>
</ul>
</div>
<div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Tip">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Tip]" src="images/tip.png"/>
</td>
<th align="left">Tip</th>
</tr>
<tr>
<td align="left" valign="top">
<p>Execution of the <code class="literal">bkup</code> script mentioned in <a class="xref" href="ch10.en.html#_a_copy_script_for_the_data_backup" title="10.2.3. A copy script for the data backup">Section 10.2.3, “A copy script for the data backup”</a> with the "<code class="literal">-gl</code>" option under <span class="citerefentry"><span class="refentrytitle">cron</span>(8)</span> should provide very similar functionality as Plan9's <code class="literal">dumpfs</code> for the static data archive.</p>
</td>
</tr>
</table>
</div>
<div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Tip">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Tip]" src="images/tip.png"/>
</td>
<th align="left">Tip</th>
</tr>
<tr>
<td align="left" valign="top">
<p>Version control system (VCS) tools in <a class="xref" href="ch10.en.html#list-of-vcs" title="Table 10.11. List of version control system tools">Table 10.11, “List of version control system tools”</a> can function as the multi-way copy and synchronization tools.</p>
</td>
</tr>
</table>
</div>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a id="_idioms_for_the_archive"/>10.1.3. Idioms for the archive</h3>
</div>
</div>
</div>
<p>Here are several ways to archive and unarchive the entire content of the directory "<code class="literal">./source</code>" using different tools.</p>
<p>GNU <span class="citerefentry"><span class="refentrytitle">tar</span>(1)</span>:</p>
<pre class="screen">$ tar -cvJf archive.tar.xz ./source
$ tar -xvJf archive.tar.xz</pre>
<p>Alternatively, by the following.</p>
<pre class="screen">$ find ./source -xdev -print0 | tar -cvJf archive.tar.xz --null -F -</pre>
<p><span class="citerefentry"><span class="refentrytitle">cpio</span>(1)</span>:</p>
<pre class="screen">$ find ./source -xdev -print0 | cpio -ov --null > archive.cpio; xz archive.cpio
$ zcat archive.cpio.xz | cpio -i</pre>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a id="_idioms_for_the_copy"/>10.1.4. Idioms for the copy</h3>
</div>
</div>
</div>
<p>Here are several ways to copy the entire content of the directory "<code class="literal">./source</code>" using different tools.</p>
<div class="itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<p>
Local copy: "<code class="literal">./source</code>" directory → "<code class="literal">/dest</code>" directory
</p>
</li>
<li class="listitem">
<p>
Remote copy: "<code class="literal">./source</code>" directory at local host → "<code class="literal">/dest</code>" directory at "<code class="literal">user@host.dom</code>" host
</p>
</li>
</ul>
</div>
<p><span class="citerefentry"><span class="refentrytitle">rsync</span>(8)</span>:</p>
<pre class="screen"># cd ./source; rsync -aHAXSv . /dest
# cd ./source; rsync -aHAXSv . user@host.dom:/dest</pre>
<p>You can alternatively use "a trailing slash on the source directory" syntax.</p>
<pre class="screen"># rsync -aHAXSv ./source/ /dest
# rsync -aHAXSv ./source/ user@host.dom:/dest</pre>
<p>Alternatively, by the following.</p>
<pre class="screen"># cd ./source; find . -print0 | rsync -aHAXSv0 --files-from=- . /dest
# cd ./source; find . -print0 | rsync -aHAXSv0 --files-from=- . user@host.dom:/dest</pre>
<p>GNU <span class="citerefentry"><span class="refentrytitle">cp</span>(1)</span> and openSSH <span class="citerefentry"><span class="refentrytitle">scp</span>(1)</span>:</p>
<pre class="screen"># cd ./source; cp -a . /dest
# cd ./source; scp -pr . user@host.dom:/dest</pre>
<p>GNU <span class="citerefentry"><span class="refentrytitle">tar</span>(1)</span>:</p>
<pre class="screen"># (cd ./source && tar cf - . ) | (cd /dest && tar xvfp - )
# (cd ./source && tar cf - . ) | ssh user@host.dom '(cd /dest && tar xvfp - )'</pre>
<p><span class="citerefentry"><span class="refentrytitle">cpio</span>(1)</span>:</p>
<pre class="screen"># cd ./source; find . -print0 | cpio -pvdm --null --sparse /dest</pre>
<p>You can substitute "<code class="literal">.</code>" with "<code class="literal">foo</code>" for all examples containing "<code class="literal">.</code>" to copy files from "<code class="literal">./source/foo</code>" directory to "<code class="literal">/dest/foo</code>" directory.</p>
<p>You can substitute "<code class="literal">.</code>" with the absolute path "<code class="literal">/path/to/source/foo</code>" for all examples containing "<code class="literal">.</code>" to drop "<code class="literal">cd ./source;</code>". These copy files to different locations depending on tools used as follows.</p>
<div class="itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<p>
"<code class="literal">/dest/foo</code>": <span class="citerefentry"><span class="refentrytitle">rsync</span>(8)</span>, GNU <span class="citerefentry"><span class="refentrytitle">cp</span>(1)</span>, and <span class="citerefentry"><span class="refentrytitle">scp</span>(1)</span>
</p>
</li>
<li class="listitem">
<p>
"<code class="literal">/dest/path/to/source/foo</code>": GNU <span class="citerefentry"><span class="refentrytitle">tar</span>(1)</span>, and <span class="citerefentry"><span class="refentrytitle">cpio</span>(1)</span>
</p>
</li>
</ul>
</div>
<div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Tip">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Tip]" src="images/tip.png"/>
</td>
<th align="left">Tip</th>
</tr>
<tr>
<td align="left" valign="top">
<p><span class="citerefentry"><span class="refentrytitle">rsync</span>(8)</span> and GNU <span class="citerefentry"><span class="refentrytitle">cp</span>(1)</span> have option "<code class="literal">-u</code>" to skip files that are newer on the receiver.</p>
</td>
</tr>
</table>
</div>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a id="_idioms_for_the_selection_of_files"/>10.1.5. Idioms for the selection of files</h3>
</div>
</div>
</div>
<p><span class="citerefentry"><span class="refentrytitle">find</span>(1)</span> is used to select files for archive and copy commands (see <a class="xref" href="ch10.en.html#_idioms_for_the_archive" title="10.1.3. Idioms for the archive">Section 10.1.3, “Idioms for the archive”</a> and <a class="xref" href="ch10.en.html#_idioms_for_the_copy" title="10.1.4. Idioms for the copy">Section 10.1.4, “Idioms for the copy”</a>) or for <span class="citerefentry"><span class="refentrytitle">xargs</span>(1)</span> (see <a class="xref" href="ch09.en.html#_repeating_a_command_looping_over_files" title="9.3.9. Repeating a command looping over files">Section 9.3.9, “Repeating a command looping over files”</a>). This can be enhanced by using its command arguments.</p>
<p>Basic syntax of <span class="citerefentry"><span class="refentrytitle">find</span>(1)</span> can be summarized as the following.</p>
<div class="itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<p>
Its conditional arguments are evaluated from left to right.
</p>
</li>
<li class="listitem">
<p>
This evaluation stops once its outcome is determined.
</p>
</li>
<li class="listitem">
<p>
"Logical <span class="strong"><strong>OR</strong></span>" (specified by "<code class="literal">-o</code>" between conditionals) has lower precedence than "logical <span class="strong"><strong>AND</strong></span>" (specified by "<code class="literal">-a</code>" or nothing between conditionals).
</p>
</li>
<li class="listitem">
<p>
"Logical <span class="strong"><strong>NOT</strong></span>" (specified by "<code class="literal">!</code>" before a conditional) has higher precedence than "logical <span class="strong"><strong>AND</strong></span>".
</p>
</li>
<li class="listitem">
<p>
"<code class="literal">-prune</code>" always returns logical <span class="strong"><strong>TRUE</strong></span> and, if it is a directory, searching of file is stopped beyond this point.
</p>
</li>
<li class="listitem">
<p>
"<code class="literal">-name</code>" matches the base of the filename with shell glob (see <a class="xref" href="ch01.en.html#_shell_glob" title="1.5.6. Shell glob">Section 1.5.6, “Shell glob”</a>) but it also matches its initial "<code class="literal">.</code>" with metacharacters such as "<code class="literal">*</code>" and "<code class="literal">?</code>". (New <a class="ulink" href="http://en.wikipedia.org/wiki/POSIX">POSIX</a> feature)
</p>
</li>
<li class="listitem">
<p>
"<code class="literal">-regex</code>" matches the full path with emacs style <span class="strong"><strong>BRE</strong></span> (see <a class="xref" href="ch01.en.html#_regular_expressions" title="1.6.2. Regular expressions">Section 1.6.2, “Regular expressions”</a>) as default.
</p>
</li>
<li class="listitem">
<p>
"<code class="literal">-size</code>" matches the file based on the file size (value precedented with "<code class="literal">+</code>" for larger, precedented with "<code class="literal">-</code>" for smaller)
</p>
</li>
<li class="listitem">
<p>
"<code class="literal">-newer</code>" matches the file newer than the one specified in its argument.
</p>
</li>
<li class="listitem">
<p>
"<code class="literal">-print0</code>" always returns logical <span class="strong"><strong>TRUE</strong></span> and print the full filename (<a class="ulink" href="http://en.wikipedia.org/wiki/Null_character">null terminated</a>) on the standard output.
</p>
</li>
</ul>
</div>
<p><span class="citerefentry"><span class="refentrytitle">find</span>(1)</span> is often used with an idiomatic style as the following.</p>
<pre class="screen"># find /path/to \
-xdev -regextype posix-extended \
-type f -regex ".*\.cpio|.*~" -prune -o \
-type d -regex ".*/\.git" -prune -o \
-type f -size +99M -prune -o \
-type f -newer /path/to/timestamp -print0</pre>
<p>This means to do following actions.</p>
<div class="orderedlist">
<ol class="orderedlist">
<li class="listitem">
<p>
Search all files starting from "<code class="literal">/path/to</code>"
</p>
</li>
<li class="listitem">
<p>
Globally limit its search within its starting filesystem and uses <span class="strong"><strong>ERE</strong></span> (see <a class="xref" href="ch01.en.html#_regular_expressions" title="1.6.2. Regular expressions">Section 1.6.2, “Regular expressions”</a>) instead
</p>
</li>
<li class="listitem">
<p>
Exclude files matching regex of "<code class="literal">.*\.cpio</code>" or "<code class="literal">.*~</code>" from search by stop processing
</p>
</li>
<li class="listitem">
<p>
Exclude directories matching regex of "<code class="literal">.*/\.git</code>" from search by stop processing
</p>
</li>
<li class="listitem">
<p>
Exclude files larger than 99 Megabytes (units of 1048576 bytes) from search by stop processing
</p>
</li>
<li class="listitem">
<p>
Print filenames which satisfy above search conditions and are newer than "<code class="literal">/path/to/timestamp</code>"
</p>
</li>
</ol>
</div>
<p>Please note the idiomatic use of "<code class="literal">-prune -o</code>" to exclude files in the above example.</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Note]" src="images/note.png"/>
</td>
<th align="left">Note</th>
</tr>
<tr>
<td align="left" valign="top">
<p>For non-Debian <a class="ulink" href="http://en.wikipedia.org/wiki/Unix-like">Unix-like</a> system, some options may not be supported by <span class="citerefentry"><span class="refentrytitle">find</span>(1)</span>. In such a case, please consider to adjust matching methods and replace "<code class="literal">-print0</code>" with "<code class="literal">-print</code>". You may need to adjust related commands too.</p>
</td>
</tr>
</table>
</div>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a id="_archive_media"/>10.1.6. Archive media</h3>
</div>
</div>
</div>
<p>When choosing <a class="ulink" href="http://en.wikipedia.org/wiki/Computer_data_storage">computer data storage media</a> for important data archive, you should be careful about their limitations. For small personal data backup, I use CD-R and DVD-R by the brand name company and store in a cool, shaded, dry, clean environment. (Tape archive media seem to be popular for professional use.)</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Note]" src="images/note.png"/>
</td>
<th align="left">Note</th>
</tr>
<tr>
<td align="left" valign="top">
<p><a class="ulink" href="http://en.wikipedia.org/wiki/Safe">A fire-resistant safe</a> are 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.</p>
</td>
</tr>
</table>
</div>
<p>Optimistic storage life of archive media seen on the net (mostly from vendor info).</p>
<div class="itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<p>
100+ years : Acid free paper with ink
</p>
</li>
<li class="listitem">
<p>
100 years : Optical storage (CD/DVD, CD/DVD-R)
</p>
</li>
<li class="listitem">
<p>
30 years : Magnetic storage (tape, floppy)
</p>
</li>
<li class="listitem">
<p>
20 years : Phase change optical storage (CD-RW)
</p>
</li>
</ul>
</div>
<p>These do not count on the mechanical failures due to handling etc.</p>
<p>Optimistic write cycle of archive media seen on the net (mostly from vendor info).</p>
<div class="itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<p>
250,000+ cycles : Harddisk drive
</p>
</li>
<li class="listitem">
<p>
10,000+ cycles : Flash memory
</p>
</li>
<li class="listitem">
<p>
1,000 cycles : CD/DVD-RW
</p>
</li>
<li class="listitem">
<p>
1 cycles : CD/DVD-R, paper
</p>
</li>
</ul>
</div>
<div class="caution" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Caution">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Caution]" src="images/caution.png"/>
</td>
<th align="left">Caution</th>
</tr>
<tr>
<td align="left" valign="top">
<p>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.</p>
</td>
</tr>
</table>
</div>
<div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Tip">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Tip]" src="images/tip.png"/>
</td>
<th align="left">Tip</th>
</tr>
<tr>
<td align="left" valign="top">
<p>Since CD/DVD-R and paper have only 1 write cycle, they inherently prevent accidental data loss by overwriting. This is advantage!</p>
</td>
</tr>
</table>
</div>
<div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Tip">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Tip]" src="images/tip.png"/>
</td>
<th align="left">Tip</th>
</tr>
<tr>
<td align="left" valign="top">
<p>If you need fast and frequent backup of large amount of data, a hard disk on a remote host linked by a fast network connection, may be the only realistic option.</p>
</td>
</tr>
</table>
</div>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a id="_removable_storage_device"/>10.1.7. Removable storage device</h3>
</div>
</div>
</div>
<p>Removable storage devices may be any one of the following.</p>
<div class="itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<p>
<a class="ulink" href="http://en.wikipedia.org/wiki/USB_flash_drive">USB flash drive</a>
</p>
</li>
<li class="listitem">
<p>
<a class="ulink" href="http://en.wikipedia.org/wiki/Hard_disk_drive">Hard disk drive</a>
</p>
</li>
<li class="listitem">
<p>
<a class="ulink" href="http://en.wikipedia.org/wiki/Optical_disc_drive">Optical disc drive</a>
</p>
</li>
<li class="listitem">
<p>
Digital camera
</p>
</li>
<li class="listitem">
<p>
Digital music player
</p>
</li>
</ul>
</div>
<p>They may be connected via any one of the following.</p>
<div class="itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<p>
<a class="ulink" href="http://en.wikipedia.org/wiki/Universal_Serial_Bus">USB</a>
</p>
</li>
<li class="listitem">
<p>
<a class="ulink" href="http://en.wikipedia.org/wiki/IEEE_1394">IEEE 1394 / FireWire</a>
</p>
</li>
<li class="listitem">
<p>
<a class="ulink" href="http://en.wikipedia.org/wiki/PC_card">PC Card</a>
</p>
</li>
</ul>
</div>
<p>Modern desktop environments such as GNOME and KDE can mount these removable devices automatically without a matching "<code class="literal">/etc/fstab</code>" entry.</p>
<div class="itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<p><code class="literal">udisks</code> package provides a daemon and associated utilities to mount and unmount these devices.
</p>
</li>
<li class="listitem">
<p><a class="ulink" href="http://en.wikipedia.org/wiki/D-Bus">D-bus</a> creates events to initiate automatic processes.
</p>
</li>
<li class="listitem">
<p><a class="ulink" href="http://en.wikipedia.org/wiki/PolicyKit">PolicyKit</a> provides required privileges.
</p>
</li>
</ul>
</div>
<div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Tip">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Tip]" src="images/tip.png"/>
</td>
<th align="left">Tip</th>
</tr>
<tr>
<td align="left" valign="top">
<p>Automounted devices may have the "<code class="literal">uhelper=</code>" mount option which is used by <span class="citerefentry"><span class="refentrytitle">umount</span>(8)</span>.</p>
</td>
</tr>
</table>
</div>
<div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Tip">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Tip]" src="images/tip.png"/>
</td>
<th align="left">Tip</th>
</tr>
<tr>
<td align="left" valign="top">
<p>Automounting under modern desktop environment happens only when those removable media devices are not listed in "<code class="literal">/etc/fstab</code>".</p>
</td>
</tr>
</table>
</div>
<p>Mount point under modern desktop environment is chosen as "<code class="literal">/media/<disk_label></code>" which can be customized by the following.</p>
<div class="itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<p><span class="citerefentry"><span class="refentrytitle">mlabel</span>(1)</span> for FAT filesystem
</p>
</li>
<li class="listitem">
<p><span class="citerefentry"><span class="refentrytitle">genisoimage</span>(1)</span> with "<code class="literal">-V</code>" option for ISO9660 filesystem
</p>
</li>
<li class="listitem">
<p><span class="citerefentry"><span class="refentrytitle">tune2fs</span>(1)</span> with "<code class="literal">-L</code>" option for ext2/ext3/ext4 filesystem
</p>
</li>
</ul>
</div>
<div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Tip">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Tip]" src="images/tip.png"/>
</td>
<th align="left">Tip</th>
</tr>
<tr>
<td align="left" valign="top">
<p>The choice of encoding may need to be provided as mount option (see <a class="xref" href="ch08.en.html#_filename_encoding" title="8.4.6. Filename encoding">Section 8.4.6, “Filename encoding”</a>).</p>
</td>
</tr>
</table>
</div>
<div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Tip">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Tip]" src="images/tip.png"/>
</td>
<th align="left">Tip</th>
</tr>
<tr>
<td align="left" valign="top">
<p>The use of the GUI menu to unmount a filesystem may remove its dynamically generated device node such as "<code class="literal">/dev/sdc</code>". If you wish to keep its device node, unmount it with the <span class="citerefentry"><span class="refentrytitle">umount</span>(8)</span> command from the shell prompt.</p>
</td>
</tr>
</table>
</div>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a id="_filesystem_choice_for_sharing_data"/>10.1.8. Filesystem choice for sharing data</h3>
</div>
</div>
</div>
<p>When sharing data with other system via removable storage device, you should format it with common <a class="ulink" href="http://en.wikipedia.org/wiki/File_system">filesystem</a> supported by both systems. Here is a list of filesystem choices.</p>
<div class="table">
<a id="listoffilesystemalusagescenarios"/>
<p class="title">
<strong>Table 10.3. List of filesystem choices for removable storage devices with typical usage scenarios</strong>
</p>
<div class="table-contents">
<table class="table" summary="List of filesystem choices for removable storage devices with typical usage scenarios" border="1">
<colgroup>
<col style="text-align: left"/>
<col style="text-align: left"/>
</colgroup>
<thead>
<tr>
<th style="text-align: left">
filesystem
</th>
<th style="text-align: left">
description of typical usage scenario
</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://en.wikipedia.org/wiki/File_Allocation_Table">FAT12</a>
</td>
<td style="text-align: left">
cross platform sharing of data on the floppy disk (<32MiB)
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://en.wikipedia.org/wiki/File_Allocation_Table">FAT16</a>
</td>
<td style="text-align: left">
cross platform sharing of data on the small hard disk like device (<2GiB)
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://en.wikipedia.org/wiki/File_Allocation_Table">FAT32</a>
</td>
<td style="text-align: left">
cross platform sharing of data on the large hard disk like device (<8TiB, supported by newer than MS Windows95 OSR2)
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://en.wikipedia.org/wiki/NTFS">NTFS</a>
</td>
<td style="text-align: left">
cross platform sharing of data on the large hard disk like device (supported natively on <a class="ulink" href="http://en.wikipedia.org/wiki/Windows_NT">MS Windows NT</a> and later version, and supported by <a class="ulink" href="http://en.wikipedia.org/wiki/NTFS-3G">NTFS-3G</a> via <a class="ulink" href="http://en.wikipedia.org/wiki/Filesystem_in_Userspace">FUSE</a> on Linux)
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://en.wikipedia.org/wiki/ISO_9660">ISO9660</a>
</td>
<td style="text-align: left">
cross platform sharing of static data on CD-R and DVD+/-R
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://en.wikipedia.org/wiki/Universal_Disk_Format">UDF</a>
</td>
<td style="text-align: left">
incremental data writing on CD-R and DVD+/-R (new)
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://en.wikipedia.org/wiki/Minix_file_system">MINIX filesystem</a>
</td>
<td style="text-align: left">
space efficient unix file data storage on the floppy disk
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://en.wikipedia.org/wiki/Ext2">ext2 filesystem</a>
</td>
<td style="text-align: left">
sharing of data on the hard disk like device with older Linux systems
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://en.wikipedia.org/wiki/Ext3">ext3 filesystem</a>
</td>
<td style="text-align: left">
sharing of data on the hard disk like device with older Linux systems
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://en.wikipedia.org/wiki/Ext4">ext4 filesystem</a>
</td>
<td style="text-align: left">
sharing of data on the hard disk like device with current Linux systems
</td>
</tr>
</tbody>
</table>
</div>
</div>
<br class="table-break"/>
<div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Tip">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Tip]" src="images/tip.png"/>
</td>
<th align="left">Tip</th>
</tr>
<tr>
<td align="left" valign="top">
<p>See <a class="xref" href="ch09.en.html#_removable_disk_encryption_with_dm_crypt_luks" title="9.8.1. Removable disk encryption with dm-crypt/LUKS">Section 9.8.1, “Removable disk encryption with dm-crypt/LUKS”</a> for cross platform sharing of data using device level encryption.</p>
</td>
</tr>
</table>
</div>
<p>The FAT filesystem is supported by almost all modern operating systems and is quite useful for the data exchange purpose via removable hard disk like media.</p>
<p>When formatting removable hard disk like devices for cross platform sharing of data with the FAT filesystem, the following should be safe choices.</p>
<div class="itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<p>
Partitioning them with <span class="citerefentry"><span class="refentrytitle">fdisk</span>(8)</span>, <span class="citerefentry"><span class="refentrytitle">cfdisk</span>(8)</span> or <span class="citerefentry"><span class="refentrytitle">parted</span>(8)</span> (see <a class="xref" href="ch09.en.html#_disk_partition_configuration" title="9.5.2. Disk partition configuration">Section 9.5.2, “Disk partition configuration”</a>) into a single primary partition and to mark it as the following.
</p>
<div class="itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<p>
Type "6" for FAT16 for media smaller than 2GB.
</p>
</li>
<li class="listitem">
<p>
Type "c" for FAT32 (LBA) for larger media.
</p>
</li>
</ul>
</div>
</li>
<li class="listitem">
<p>
Formatting the primary partition with <span class="citerefentry"><span class="refentrytitle">mkfs.vfat</span>(8)</span> with the following.
</p>
<div class="itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<p>
Just its device name, e.g. "<code class="literal">/dev/sda1</code>" for FAT16
</p>
</li>
<li class="listitem">
<p>
The explicit option and its device name, e.g. "<code class="literal">-F 32 /dev/sda1</code>" for FAT32
</p>
</li>
</ul>
</div>
</li>
</ul>
</div>
<p>When using the FAT or ISO9660 filesystems for sharing data, the following should be the safe considerations.</p>
<div class="itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<p>
Archiving files into an archive file first using <span class="citerefentry"><span class="refentrytitle">tar</span>(1)</span>, or <span class="citerefentry"><span class="refentrytitle">cpio</span>(1)</span> to retain the long filename, the symbolic link, the original Unix file permission and the owner information.
</p>
</li>
<li class="listitem">
<p>
Splitting the archive file into less than 2 GiB chunks with the <span class="citerefentry"><span class="refentrytitle">split</span>(1)</span> command to protect it from the file size limitation.
</p>
</li>
<li class="listitem">
<p>
Encrypting the archive file to secure its contents from the unauthorized access.
</p>
</li>
</ul>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Note]" src="images/note.png"/>
</td>
<th align="left">Note</th>
</tr>
<tr>
<td align="left" valign="top">
<p>For FAT filesystems by its design, the maximum file size is <code class="literal">(2^32 - 1) bytes = (4GiB - 1 byte)</code>. For some applications on the older 32 bit OS, the maximum file size was even smaller <code class="literal">(2^31 - 1) bytes = (2GiB - 1 byte)</code>. Debian does not suffer the latter problem.</p>
</td>
</tr>
</table>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Note]" src="images/note.png"/>
</td>
<th align="left">Note</th>
</tr>
<tr>
<td align="left" valign="top">
<p>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 "<a class="ulink" href="http://support.microsoft.com/kb/100108/">Overview of FAT, HPFS, and NTFS File Systems</a>". Of course, we should normally use the ext4 filesystem for Linux.</p>
</td>
</tr>
</table>
</div>
<div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Tip">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Tip]" src="images/tip.png"/>
</td>
<th align="left">Tip</th>
</tr>
<tr>
<td align="left" valign="top">
<p>For more on filesystems and accessing filesystems, please read "<a class="ulink" href="http://tldp.org/HOWTO/Filesystems-HOWTO.html">Filesystems HOWTO</a>".</p>
</td>
</tr>
</table>
</div>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a id="_sharing_data_via_network"/>10.1.9. Sharing data via network</h3>
</div>
</div>
</div>
<p>When sharing data with other system via network, you should use common service. Here are some hints.</p>
<div class="table">
<a id="listofthenetworkcalusagescenario"/>
<p class="title">
<strong>Table 10.4. List of the network service to chose with the typical usage scenario</strong>
</p>
<div class="table-contents">
<table class="table" summary="List of the network service to chose with the typical usage scenario" border="1">
<colgroup>
<col style="text-align: left"/>
<col style="text-align: left"/>
</colgroup>
<thead>
<tr>
<th style="text-align: left">
network service
</th>
<th style="text-align: left">
description of typical usage scenario
</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left"><a class="ulink" href="http://en.wikipedia.org/wiki/Server_Message_Block">SMB/CIFS</a> network mounted filesystem with <a class="ulink" href="http://en.wikipedia.org/wiki/Samba_(software)">Samba</a>
</td>
<td style="text-align: left">
sharing files via "Microsoft Windows Network", see <span class="citerefentry"><span class="refentrytitle">smb.conf</span>(5)</span> and <a class="ulink" href="http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/">The Official Samba 3.x.x HOWTO and Reference Guide</a> or the <code class="literal">samba-doc</code> package
</td>
</tr>
<tr>
<td style="text-align: left"><a class="ulink" href="http://en.wikipedia.org/wiki/Network_File_System_(protocol)">NFS</a> network mounted filesystem with the Linux kernel
</td>
<td style="text-align: left">
sharing files via "Unix/Linux Network", see <span class="citerefentry"><span class="refentrytitle">exports</span>(5)</span> and <a class="ulink" href="http://tldp.org/HOWTO/NFS-HOWTO/index.html">Linux NFS-HOWTO</a>
</td>
</tr>
<tr>
<td style="text-align: left"><a class="ulink" href="http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol">HTTP</a> service
</td>
<td style="text-align: left">
sharing file between the web server/client
</td>
</tr>
<tr>
<td style="text-align: left"><a class="ulink" href="http://en.wikipedia.org/wiki/Https">HTTPS</a> service
</td>
<td style="text-align: left">
sharing file between the web server/client with encrypted Secure Sockets Layer (SSL) or <a class="ulink" href="http://en.wikipedia.org/wiki/Transport_Layer_Security">Transport Layer Security</a> (TLS)
</td>
</tr>
<tr>
<td style="text-align: left"><a class="ulink" href="http://en.wikipedia.org/wiki/File_Transfer_Protocol">FTP</a> service
</td>
<td style="text-align: left">
sharing file between the FTP server/client
</td>
</tr>
</tbody>
</table>
</div>
</div>
<br class="table-break"/>
<p>Although these filesystems mounted over network and file transfer methods over network are quite convenient for sharing data, these may be insecure. Their network connection must be secured by the following.</p>
<div class="itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<p>
Encrypt it with <a class="ulink" href="http://en.wikipedia.org/wiki/Transport_Layer_Security">SSL/TLS</a>
</p>
</li>
<li class="listitem">
<p>
Tunnel it via <a class="ulink" href="http://en.wikipedia.org/wiki/Secure_Shell">SSH</a>
</p>
</li>
<li class="listitem">
<p>
Tunnel it via <a class="ulink" href="http://en.wikipedia.org/wiki/Virtual_private_network">VPN</a>
</p>
</li>
<li class="listitem">
<p>
Limit it behind the secure firewall
</p>
</li>
</ul>
</div>
<p>See also <a class="xref" href="ch06.en.html#_other_network_application_servers" title="6.10. Other network application servers">Section 6.10, “Other network application servers”</a> and <a class="xref" href="ch06.en.html#_other_network_application_clients" title="6.11. Other network application clients">Section 6.11, “Other network application clients”</a>.</p>
</div>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title"><a id="_backup_and_recovery"/>10.2. Backup and recovery</h2>
</div>
</div>
</div>
<p>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 hit you some day.</p>
<div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Tip">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Tip]" src="images/tip.png"/>
</td>
<th align="left">Tip</th>
</tr>
<tr>
<td align="left" valign="top">
<p>Keep your backup system simple and backup your system often. Having backup data is more important than how technically good your backup method is.</p>
</td>
</tr>
</table>
</div>
<p>There are 3 key factors which determine actual backup and recovery policy.</p>
<div class="orderedlist">
<ol class="orderedlist">
<li class="listitem">
<p>
Knowing what to backup and recover.
</p>
<div class="itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<p>
Data files directly created by you: data in "<code class="literal">~/</code>"
</p>
</li>
<li class="listitem">
<p>
Data files created by applications used by you: data in "<code class="literal">/var/</code>" (except "<code class="literal">/var/cache/</code>", "<code class="literal">/var/run/</code>", and "<code class="literal">/var/tmp/</code>")
</p>
</li>
<li class="listitem">
<p>
System configuration files: data in "<code class="literal">/etc/</code>"
</p>
</li>
<li class="listitem">
<p>
Local softwares: data in "<code class="literal">/usr/local/</code>" or "<code class="literal">/opt/</code>"
</p>
</li>
<li class="listitem">
<p>
System installation information: a memo in plain text on key steps (partition, …)
</p>
</li>
<li class="listitem">
<p>
Proven set of data: confirmed by experimental recovery operations in advance
</p>
</li>
</ul>
</div>
</li>
<li class="listitem">
<p>
Knowing how to backup and recover.
</p>
<div class="itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<p>
Secure storage of data: protection from overwrite and system failure
</p>
</li>
<li class="listitem">
<p>
Frequent backup: scheduled backup
</p>
</li>
<li class="listitem">
<p>
Redundant backup: data mirroring
</p>
</li>
<li class="listitem">
<p>
Fool proof process: easy single command backup
</p>
</li>
</ul>
</div>
</li>
<li class="listitem">
<p>
Assessing risks and costs involved.
</p>
<div class="itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<p>
Value of data when lost
</p>
</li>
<li class="listitem">
<p>
Required resources for backup: human, hardware, software, …
</p>
</li>
<li class="listitem">
<p>
Failure mode and their possibility
</p>
</li>
</ul>
</div>
</li>
</ol>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Note]" src="images/note.png"/>
</td>
<th align="left">Note</th>
</tr>
<tr>
<td align="left" valign="top">
<p>Do not back up the pseudo-filesystem contents found on <code class="literal">/proc</code>, <code class="literal">/sys</code>, <code class="literal">/tmp</code>, and <code class="literal">/run</code> (see <a class="xref" href="ch01.en.html#_procfs_and_sysfs" title="1.2.12. procfs and sysfs">Section 1.2.12, “procfs and sysfs”</a> and <a class="xref" href="ch01.en.html#_tmpfs" title="1.2.13. tmpfs">Section 1.2.13, “tmpfs”</a>). Unless you know exactly what you are doing, they are huge useless data.</p>
</td>
</tr>
</table>
</div>
<p>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 <a class="xref" href="ch09.en.html#_the_binary_data" title="9.7. The binary data">Section 9.7, “The binary data”</a> for how to write to the storage media from the shell commandline. GNOME desktop GUI environment gives you easy access via menu: "Places→CD/DVD Creator".)</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Note]" src="images/note.png"/>
</td>
<th align="left">Note</th>
</tr>
<tr>
<td align="left" valign="top">
<p>You may wish to stop some application daemons such as MTA (see <a class="xref" href="ch06.en.html#_mail_transport_agent_mta" title="6.3. Mail transport agent (MTA)">Section 6.3, “Mail transport agent (MTA)”</a>) while backing up data.</p>
</td>
</tr>
</table>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Note]" src="images/note.png"/>
</td>
<th align="left">Note</th>
</tr>
<tr>
<td align="left" valign="top">
<p>You should pay extra care to the backup and restoration of identity related data files such as "<code class="literal">/etc/ssh/ssh_host_dsa_key</code>", "<code class="literal">/etc/ssh/ssh_host_rsa_key</code>", "<code class="literal">~/.gnupg/*</code>", "<code class="literal">~/.ssh/*</code>", "<code class="literal">/etc/passwd</code>", "<code class="literal">/etc/shadow</code>", "<code class="literal">/etc/fetchmailrc</code>", "<code class="literal">popularity-contest.conf</code>", "<code class="literal">/etc/ppp/pap-secrets</code>", and "<code class="literal">/etc/exim4/passwd.client</code>". Some of these data can not be regenerated by entering the same input string to the system.</p>
</td>
</tr>
</table>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Note]" src="images/note.png"/>
</td>
<th align="left">Note</th>
</tr>
<tr>
<td align="left" valign="top">
<p>If you run a cron job as a user process, you must restore files in "<code class="literal">/var/spool/cron/crontabs</code>" directory and restart <span class="citerefentry"><span class="refentrytitle">cron</span>(8)</span>. See <a class="xref" href="ch09.en.html#_scheduling_tasks_regularly" title="9.3.14. Scheduling tasks regularly">Section 9.3.14, “Scheduling tasks regularly”</a> for <span class="citerefentry"><span class="refentrytitle">cron</span>(8)</span> and <span class="citerefentry"><span class="refentrytitle">crontab</span>(1)</span>.</p>
</td>
</tr>
</table>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a id="_backup_utility_suites"/>10.2.1. Backup utility suites</h3>
</div>
</div>
</div>
<p>Here is a select list of notable backup utility suites available on the Debian system.</p>
<div class="table">
<a id="listofbackupsuiteutilities"/>
<p class="title">
<strong>Table 10.5. List of backup suite utilities</strong>
</p>
<div class="table-contents">
<table class="table" summary="List of backup suite utilities" border="1">
<colgroup>
<col style="text-align: left"/>
<col style="text-align: left"/>
<col style="text-align: left"/>
<col style="text-align: left"/>
</colgroup>
<thead>
<tr>
<th style="text-align: left">
package
</th>
<th style="text-align: left">
popcon
</th>
<th style="text-align: left">
size
</th>
<th style="text-align: left">
description
</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/dump">
<code class="literal">dump</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=dump">V:1, I:6</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/d/dump.html">341</a>
</td>
<td style="text-align: left">
4.4 <a class="ulink" href="http://en.wikipedia.org/wiki/Berkeley_Software_Distribution">BSD</a> <span class="citerefentry"><span class="refentrytitle">dump</span>(8)</span> and <span class="citerefentry"><span class="refentrytitle">restore</span>(8)</span> for <a class="ulink" href="http://en.wikipedia.org/wiki/Ext2">ext2</a>/<a class="ulink" href="http://en.wikipedia.org/wiki/Ext3">ext3</a>/<a class="ulink" href="http://en.wikipedia.org/wiki/Ext4">ext4</a> filesystems
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/xfsdump">
<code class="literal">xfsdump</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=xfsdump">V:0, I:11</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/x/xfsdump.html">838</a>
</td>
<td style="text-align: left">
dump and restore with <span class="citerefentry"><span class="refentrytitle">xfsdump</span>(8)</span> and <span class="citerefentry"><span class="refentrytitle">xfsrestore</span>(8)</span> for <a class="ulink" href="http://en.wikipedia.org/wiki/XFS">XFS</a> filesystem on GNU/Linux and <a class="ulink" href="http://en.wikipedia.org/wiki/IRIX">IRIX</a>
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/backupninja">
<code class="literal">backupninja</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=backupninja">V:4, I:4</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/b/backupninja.html">329</a>
</td>
<td style="text-align: left">
lightweight, extensible <span class="strong"><strong>meta-backup</strong></span> system
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/bacula-common">
<code class="literal">bacula-common</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=bacula-common">V:10, I:18</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/b/bacula-common.html">2059</a>
</td>
<td style="text-align: left"><a class="ulink" href="http://en.wikipedia.org/wiki/Bacula">Bacula</a>: network backup, recovery and verification - common support files
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/bacula-client">
<code class="literal">bacula-client</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=bacula-client">I:5</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/b/bacula-client.html">167</a>
</td>
<td style="text-align: left"><a class="ulink" href="http://en.wikipedia.org/wiki/Bacula">Bacula</a>: network backup, recovery and verification - client meta-package
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/bacula-console">
<code class="literal">bacula-console</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=bacula-console">V:1, I:6</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/b/bacula-console.html">68</a>
</td>
<td style="text-align: left"><a class="ulink" href="http://en.wikipedia.org/wiki/Bacula">Bacula</a>: network backup, recovery and verification - text console
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/bacula-server">
<code class="literal">bacula-server</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=bacula-server">I:1</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/b/bacula-server.html">167</a>
</td>
<td style="text-align: left"><a class="ulink" href="http://en.wikipedia.org/wiki/Bacula">Bacula</a>: network backup, recovery and verification - server meta-package
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/amanda-common">
<code class="literal">amanda-common</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=amanda-common">V:1, I:2</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/a/amanda-common.html">9964</a>
</td>
<td style="text-align: left"><a class="ulink" href="http://en.wikipedia.org/wiki/Advanced_Maryland_Automatic_Network_Disk_Archiver">Amanda</a>: Advanced Maryland Automatic Network Disk Archiver (Libs)
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/amanda-client">
<code class="literal">amanda-client</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=amanda-client">V:1, I:2</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/a/amanda-client.html">1072</a>
</td>
<td style="text-align: left"><a class="ulink" href="http://en.wikipedia.org/wiki/Advanced_Maryland_Automatic_Network_Disk_Archiver">Amanda</a>: Advanced Maryland Automatic Network Disk Archiver (Client)
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/amanda-server">
<code class="literal">amanda-server</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=amanda-server">V:0, I:0</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/a/amanda-server.html">1044</a>
</td>
<td style="text-align: left"><a class="ulink" href="http://en.wikipedia.org/wiki/Advanced_Maryland_Automatic_Network_Disk_Archiver">Amanda</a>: Advanced Maryland Automatic Network Disk Archiver (Server)
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/backup-manager">
<code class="literal">backup-manager</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=backup-manager">V:1, I:2</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/b/backup-manager.html">571</a>
</td>
<td style="text-align: left">
command-line backup tool
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/backup2l">
<code class="literal">backup2l</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=backup2l">V:1, I:1</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/b/backup2l.html">113</a>
</td>
<td style="text-align: left">
low-maintenance backup/restore tool for mountable media (disk based)
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/backuppc">
<code class="literal">backuppc</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=backuppc">V:4, I:4</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/b/backuppc.html">2232</a>
</td>
<td style="text-align: left"><a class="ulink" href="http://en.wikipedia.org/wiki/Backuppc">BackupPC</a> is a high-performance, enterprise-grade system for backing up PCs (disk based)
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/duplicity">
<code class="literal">duplicity</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=duplicity">V:8, I:15</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/d/duplicity.html">1535</a>
</td>
<td style="text-align: left">
(remote) incremental backup
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/flexbackup">
<code class="literal">flexbackup</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=flexbackup">V:0, I:0</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/f/flexbackup.html">242</a>
</td>
<td style="text-align: left">
(remote) incremental backup
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/rdiff-backup">
<code class="literal">rdiff-backup</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=rdiff-backup">V:9, I:17</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/r/rdiff-backup.html">704</a>
</td>
<td style="text-align: left">
(remote) incremental backup
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/restic">
<code class="literal">restic</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=restic">V:0, I:0</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/r/restic.html">15987</a>
</td>
<td style="text-align: left">
(remote) incremental backup
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/rsnapshot">
<code class="literal">rsnapshot</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=rsnapshot">V:6, I:12</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/r/rsnapshot.html">452</a>
</td>
<td style="text-align: left">
(remote) incremental backup
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/slbackup">
<code class="literal">slbackup</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=slbackup">V:0, I:0</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/s/slbackup.html">146</a>
</td>
<td style="text-align: left">
(remote) incremental backup
</td>
</tr>
</tbody>
</table>
</div>
</div>
<br class="table-break"/>
<p>Backup tools have their specialized focuses.</p>
<div class="itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<p><a class="ulink" href="http://en.wikipedia.org/wiki/Mondo_Rescue">Mondo Rescue</a> is a backup system to facilitate restoration of complete system quickly from backup CD/DVD etc. without going through normal system installation processes.
</p>
</li>
<li class="listitem">
<p>
Regular backups of user data can be realized by a simple script (<a class="xref" href="ch10.en.html#_an_example_script_for_the_system_backup" title="10.2.2. An example script for the system backup">Section 10.2.2, “An example script for the system backup”</a>) and <span class="citerefentry"><span class="refentrytitle">cron</span>(8)</span>.
</p>
</li>
<li class="listitem">
<p><a class="ulink" href="http://en.wikipedia.org/wiki/Bacula">Bacula</a>, <a class="ulink" href="http://en.wikipedia.org/wiki/Advanced_Maryland_Automatic_Network_Disk_Archiver">Amanda</a>, and <a class="ulink" href="http://en.wikipedia.org/wiki/Backuppc">BackupPC</a> are full featured backup suite utilities which are focused on regular backups over network.
</p>
</li>
</ul>
</div>
<p>Basic tools described in <a class="xref" href="ch10.en.html#_archive_and_compression_tools" title="10.1.1. Archive and compression tools">Section 10.1.1, “Archive and compression tools”</a> and <a class="xref" href="ch10.en.html#_copy_and_synchronization_tools" title="10.1.2. Copy and synchronization tools">Section 10.1.2, “Copy and synchronization tools”</a> can be used to facilitate system backup via custom scripts. Such script can be enhanced by the following.</p>
<div class="itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<p>
The <code class="literal">restic</code> package enables incremental (remote) backups.
</p>
</li>
<li class="listitem">
<p>
The <code class="literal">rdiff-backup</code> package enables incremental (remote) backups.
</p>
</li>
<li class="listitem">
<p>
The <code class="literal">dump</code> package helps to archive and restore the whole filesystem incrementally and efficiently.
</p>
</li>
</ul>
</div>
<div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Tip">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Tip]" src="images/tip.png"/>
</td>
<th align="left">Tip</th>
</tr>
<tr>
<td align="left" valign="top">
<p>See files in "<code class="literal">/usr/share/doc/dump/</code>" and <a class="ulink" href="http://dump.sourceforge.net/isdumpdeprecated.html">"Is dump really deprecated?"</a> to learn about the <code class="literal">dump</code> package.</p>
</td>
</tr>
</table>
</div>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a id="_an_example_script_for_the_system_backup"/>10.2.2. An example script for the system backup</h3>
</div>
</div>
</div>
<p>For a personal Debian desktop system running <code class="literal">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.</p>
<p>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.</p>
<pre class="screen">#!/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|.+\.cpio|.+\.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</pre>
<p>This is meant to be a script example executed from root.</p>
<p>I expect you to change and execute this as follows.</p>
<div class="itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<p>
Edit this script to cover all your important data (see <a class="xref" href="ch10.en.html#_idioms_for_the_selection_of_files" title="10.1.5. Idioms for the selection of files">Section 10.1.5, “Idioms for the selection of files”</a> and <a class="xref" href="ch10.en.html#_backup_and_recovery" title="10.2. Backup and recovery">Section 10.2, “Backup and recovery”</a>).
</p>
</li>
<li class="listitem">
<p>
Replace "<code class="literal">find … -print0</code>" with "<code class="literal">find … -newer $BUDIR/backup.stamp -print0</code>" to make a incremental backup.
</p>
</li>
<li class="listitem">
<p>
Transfer backup files to the remote host using <span class="citerefentry"><span class="refentrytitle">scp</span>(1)</span> or <span class="citerefentry"><span class="refentrytitle">rsync</span>(1)</span> or burn them to CD/DVD for extra data security. (I use GNOME desktop GUI for burning CD/DVD. See <a class="xref" href="ch12.en.html#_shell_script_example_with_zenity" title="12.1.8. Shell script example with zenity">Section 12.1.8, “Shell script example with zenity”</a> for extra redundancy.)
</p>
</li>
</ul>
</div>
<p>Keep it simple!</p>
<div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Tip">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Tip]" src="images/tip.png"/>
</td>
<th align="left">Tip</th>
</tr>
<tr>
<td align="left" valign="top">
<p>You can recover debconf configuration data with "<code class="literal">debconf-set-selections debconf-selections</code>" and dpkg selection data with "<code class="literal">dpkg --set-selection <dpkg-selections.list</code>".</p>
</td>
</tr>
</table>
</div>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a id="_a_copy_script_for_the_data_backup"/>10.2.3. A copy script for the data backup</h3>
</div>
</div>
</div>
<p>For the set of data under a directory tree, the copy with "<code class="literal">cp -a</code>" provides the normal backup.</p>
<p>For the set of large non-overwritten static data under a directory tree such as the one under the "<code class="literal">/var/cache/apt/packages/</code>" directory, hardlinks with "<code class="literal">cp -al</code>" provide an alternative to the normal backup with efficient use of the disk space.</p>
<p>Here is a copy script, which I named as <code class="literal">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.</p>
<pre class="screen">#!/bin/sh -e
# Copyright (C) 2007-2008 Osamu Aoki <osamu@debian.org>, Public Domain
fdot(){ find . -type d \( -iname ".?*" -o -iname "CVS" \) -prune -o -print0;}
fall(){ find . -print0;}
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
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 = TARSSH ]; then
(tar cvf - . )|ssh -C $HOST "( mkdircd \"$EXTP/$BU\"&& tar xvfp - )"
elif [ $MODE = RSYNCSSH ]; then
rsync -aHAXSv ./ "${HOST}:${EXTP}-${BKUP}-${TIME}"
else
echo "Any other idea to backup?"
$FIND |xargs -0 -n 1 echo
fi</pre>
<p>This is meant to be command examples. Please read script and edit it by yourself before using it.</p>
<div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Tip">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Tip]" src="images/tip.png"/>
</td>
<th align="left">Tip</th>
</tr>
<tr>
<td align="left" valign="top">
<p>I keep this <code class="literal">bkup</code> in my "<code class="literal">/usr/local/bin/</code>" directory. I issue this <code class="literal">bkup</code> command without any option in the working directory whenever I need a temporary snapshot backup.</p>
</td>
</tr>
</table>
</div>
<div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Tip">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Tip]" src="images/tip.png"/>
</td>
<th align="left">Tip</th>
</tr>
<tr>
<td align="left" valign="top">
<p>For making snapshot history of a source file tree or a configuration file tree, it is easier and space efficient to use <span class="citerefentry"><span class="refentrytitle">git</span>(7)</span> (see <a class="xref" href="ch10.en.html#_git_for_recording_configuration_history" title="10.6.5. Git for recording configuration history">Section 10.6.5, “Git for recording configuration history”</a>).</p>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title"><a id="_data_security_infrastructure"/>10.3. Data security infrastructure</h2>
</div>
</div>
</div>
<p>The data security infrastructure is provided by the combination of data encryption tool, message digest tool, and signature tool.</p>
<div class="table">
<a id="listofdatasecurirastructuretools"/>
<p class="title">
<strong>Table 10.6. List of data security infrastructure tools</strong>
</p>
<div class="table-contents">
<table class="table" summary="List of data security infrastructure tools" border="1">
<colgroup>
<col style="text-align: left"/>
<col style="text-align: left"/>
<col style="text-align: left"/>
<col style="text-align: left"/>
<col style="text-align: left"/>
</colgroup>
<thead>
<tr>
<th style="text-align: left">
package
</th>
<th style="text-align: left">
popcon
</th>
<th style="text-align: left">
size
</th>
<th style="text-align: left">
command
</th>
<th style="text-align: left">
description
</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/gnupg">
<code class="literal">gnupg</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=gnupg">V:698, I:998</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/g/gnupg.html">696</a>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">gpg</span>(1)</span>
</td>
<td style="text-align: left"><a class="ulink" href="http://en.wikipedia.org/wiki/GNU_Privacy_Guard">GNU Privacy Guard</a> - OpenPGP encryption and signing tool
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/gpgv">
<code class="literal">gpgv</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=gpgv">V:873, I:999</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/g/gpgv.html">809</a>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">gpgv</span>(1)</span>
</td>
<td style="text-align: left">
GNU Privacy Guard - signature verification tool
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/paperkey">
<code class="literal">paperkey</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=paperkey">V:0, I:4</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/p/paperkey.html">55</a>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">paperkey</span>(1)</span>
</td>
<td style="text-align: left">
extract just the secret information out of OpenPGP secret keys
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/cryptsetup">
<code class="literal">cryptsetup</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=cryptsetup">V:34, I:79</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/c/cryptsetup.html">376</a>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">cryptsetup</span>(8)</span>, …
</td>
<td style="text-align: left">
utilities for <a class="ulink" href="http://en.wikipedia.org/wiki/Dm-crypt">dm-crypto</a> block device encryption supporting <a class="ulink" href="http://en.wikipedia.org/wiki/Linux_Unified_Key_Setup">LUKS</a>
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/ecryptfs-utils">
<code class="literal">ecryptfs-utils</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=ecryptfs-utils">V:6, I:9</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/e/ecryptfs-utils.html">396</a>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">ecryptfs</span>(7)</span>, …
</td>
<td style="text-align: left">
utilities for <a class="ulink" href="http://ecryptfs.sourceforge.net/">ecryptfs</a> stacked filesystem encryption
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/coreutils">
<code class="literal">coreutils</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=coreutils">V:878, I:999</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/c/coreutils.html">15016</a>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">md5sum</span>(1)</span>
</td>
<td style="text-align: left">
compute and check MD5 message digest
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/coreutils">
<code class="literal">coreutils</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=coreutils">V:878, I:999</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/c/coreutils.html">15016</a>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">sha1sum</span>(1)</span>
</td>
<td style="text-align: left">
compute and check SHA1 message digest
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/openssl">
<code class="literal">openssl</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=openssl">V:794, I:991</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/o/openssl.html">1303</a>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">openssl</span>(1ssl)</span>
</td>
<td style="text-align: left">
compute message digest with "<code class="literal">openssl dgst</code>" (OpenSSL)
</td>
</tr>
</tbody>
</table>
</div>
</div>
<br class="table-break"/>
<p>See <a class="xref" href="ch09.en.html#_data_encryption_tips" title="9.8. Data encryption tips">Section 9.8, “Data encryption tips”</a> on <a class="ulink" href="http://en.wikipedia.org/wiki/Dm-crypt">dm-crypto</a> and <a class="ulink" href="http://ecryptfs.sourceforge.net/">ecryptfs</a> which implement automatic data encryption infrastructure via Linux kernel modules.</p>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a id="_key_management_for_gnupg"/>10.3.1. Key management for GnuPG</h3>
</div>
</div>
</div>
<p>Here are <a class="ulink" href="http://en.wikipedia.org/wiki/GNU_Privacy_Guard">GNU Privacy Guard</a> commands for the basic key management.</p>
<div class="table">
<a id="listofgnuprivacythekeymanagement"/>
<p class="title">
<strong>Table 10.7. List of GNU Privacy Guard commands for the key management</strong>
</p>
<div class="table-contents">
<table class="table" summary="List of GNU Privacy Guard commands for the key management" border="1">
<colgroup>
<col style="text-align: left"/>
<col style="text-align: left"/>
</colgroup>
<thead>
<tr>
<th style="text-align: left">
command
</th>
<th style="text-align: left">
description
</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left">
<code class="literal">gpg --gen-key</code>
</td>
<td style="text-align: left">
generate a new key
</td>
</tr>
<tr>
<td style="text-align: left">
<code class="literal">gpg --gen-revoke my_user_ID</code>
</td>
<td style="text-align: left">
generate revoke key for my_user_ID
</td>
</tr>
<tr>
<td style="text-align: left">
<code class="literal">gpg --edit-key user_ID</code>
</td>
<td style="text-align: left">
edit key interactively, "help" for help
</td>
</tr>
<tr>
<td style="text-align: left">
<code class="literal">gpg -o file --export</code>
</td>
<td style="text-align: left">
export all keys to file
</td>
</tr>
<tr>
<td style="text-align: left">
<code class="literal">gpg --import file</code>
</td>
<td style="text-align: left">
import all keys from file
</td>
</tr>
<tr>
<td style="text-align: left">
<code class="literal">gpg --send-keys user_ID</code>
</td>
<td style="text-align: left">
send key of user_ID to keyserver
</td>
</tr>
<tr>
<td style="text-align: left">
<code class="literal">gpg --recv-keys user_ID</code>
</td>
<td style="text-align: left">
recv. key of user_ID from keyserver
</td>
</tr>
<tr>
<td style="text-align: left">
<code class="literal">gpg --list-keys user_ID</code>
</td>
<td style="text-align: left">
list keys of user_ID
</td>
</tr>
<tr>
<td style="text-align: left">
<code class="literal">gpg --list-sigs user_ID</code>
</td>
<td style="text-align: left">
list sig. of user_ID
</td>
</tr>
<tr>
<td style="text-align: left">
<code class="literal">gpg --check-sigs user_ID</code>
</td>
<td style="text-align: left">
check sig. of user_ID
</td>
</tr>
<tr>
<td style="text-align: left">
<code class="literal">gpg --fingerprint user_ID</code>
</td>
<td style="text-align: left">
check fingerprint of user_ID
</td>
</tr>
<tr>
<td style="text-align: left">
<code class="literal">gpg --refresh-keys</code>
</td>
<td style="text-align: left">
update local keyring
</td>
</tr>
</tbody>
</table>
</div>
</div>
<br class="table-break"/>
<p>Here is the meaning of the trust code.</p>
<div class="table">
<a id="listofthemeaningofthetrustcode"/>
<p class="title">
<strong>Table 10.8. List of the meaning of the trust code</strong>
</p>
<div class="table-contents">
<table class="table" summary="List of the meaning of the trust code" border="1">
<colgroup>
<col style="text-align: left"/>
<col style="text-align: left"/>
</colgroup>
<thead>
<tr>
<th style="text-align: left">
code
</th>
<th style="text-align: left">
description of trust
</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left">
<code class="literal">-</code>
</td>
<td style="text-align: left">
no owner trust assigned / not yet calculated
</td>
</tr>
<tr>
<td style="text-align: left">
<code class="literal">e</code>
</td>
<td style="text-align: left">
trust calculation failed
</td>
</tr>
<tr>
<td style="text-align: left">
<code class="literal">q</code>
</td>
<td style="text-align: left">
not enough information for calculation
</td>
</tr>
<tr>
<td style="text-align: left">
<code class="literal">n</code>
</td>
<td style="text-align: left">
never trust this key
</td>
</tr>
<tr>
<td style="text-align: left">
<code class="literal">m</code>
</td>
<td style="text-align: left">
marginally trusted
</td>
</tr>
<tr>
<td style="text-align: left">
<code class="literal">f</code>
</td>
<td style="text-align: left">
fully trusted
</td>
</tr>
<tr>
<td style="text-align: left">
<code class="literal">u</code>
</td>
<td style="text-align: left">
ultimately trusted
</td>
</tr>
</tbody>
</table>
</div>
</div>
<br class="table-break"/>
<p>The following uploads my key "<code class="literal">1DD8D791</code>" to the popular keyserver "<code class="literal">hkp://keys.gnupg.net</code>".</p>
<pre class="screen">$ gpg --keyserver hkp://keys.gnupg.net --send-keys 1DD8D791</pre>
<p>A good default keyserver set up in "<code class="literal">~/.gnupg/gpg.conf</code>" (or old location "<code class="literal">~/.gnupg/options</code>") contains the following.</p>
<pre class="screen">keyserver hkp://keys.gnupg.net</pre>
<p>The following obtains unknown keys from the keyserver.</p>
<pre class="screen">$ gpg --list-sigs --with-colons | grep '^sig.*\[User ID not found\]' |\
cut -d ':' -f 5| sort | uniq | xargs gpg --recv-keys</pre>
<p>There was a bug in <a class="ulink" href="http://sourceforge.net/projects/pks/">OpenPGP Public Key Server</a> (pre version 0.9.6) which corrupted key with more than 2 sub-keys. The newer <code class="literal">gnupg</code> (>1.2.1-2) package can handle these corrupted subkeys. See <span class="citerefentry"><span class="refentrytitle">gpg</span>(1)</span> under "<code class="literal">--repair-pks-subkey-bug</code>" option.</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a id="_using_gnupg_on_files"/>10.3.2. Using GnuPG on files</h3>
</div>
</div>
</div>
<p>Here are examples for using <a class="ulink" href="http://en.wikipedia.org/wiki/GNU_Privacy_Guard">GNU Privacy Guard</a> commands on files.</p>
<div class="table">
<a id="listofgnuprivacydcommandsonfiles"/>
<p class="title">
<strong>Table 10.9. List of GNU Privacy Guard commands on files</strong>
</p>
<div class="table-contents">
<table class="table" summary="List of GNU Privacy Guard commands on files" border="1">
<colgroup>
<col style="text-align: left"/>
<col style="text-align: left"/>
</colgroup>
<thead>
<tr>
<th style="text-align: left">
command
</th>
<th style="text-align: left">
description
</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left">
<code class="literal">gpg -a -s file</code>
</td>
<td style="text-align: left">
sign file into <a class="ulink" href="http://en.wikipedia.org/wiki/ASCII">ASCII</a> armored file.asc
</td>
</tr>
<tr>
<td style="text-align: left">
<code class="literal">gpg --armor --sign file</code>
</td>
<td style="text-align: left">
, ,
</td>
</tr>
<tr>
<td style="text-align: left">
<code class="literal">gpg --clearsign file</code>
</td>
<td style="text-align: left">
clear-sign message
</td>
</tr>
<tr>
<td style="text-align: left">
<code class="literal">gpg --clearsign file|mail foo@example.org</code>
</td>
<td style="text-align: left">
mail a clear-signed message to <code class="literal">foo@example.org</code>
</td>
</tr>
<tr>
<td style="text-align: left">
<code class="literal">gpg --clearsign --not-dash-escaped patchfile</code>
</td>
<td style="text-align: left">
clear-sign patchfile
</td>
</tr>
<tr>
<td style="text-align: left">
<code class="literal">gpg --verify file</code>
</td>
<td style="text-align: left">
verify clear-signed file
</td>
</tr>
<tr>
<td style="text-align: left">
<code class="literal">gpg -o file.sig -b file</code>
</td>
<td style="text-align: left">
create detached signature
</td>
</tr>
<tr>
<td style="text-align: left">
<code class="literal">gpg -o file.sig --detach-sig file</code>
</td>
<td style="text-align: left">
, ,
</td>
</tr>
<tr>
<td style="text-align: left">
<code class="literal">gpg --verify file.sig file</code>
</td>
<td style="text-align: left">
verify file with file.sig
</td>
</tr>
<tr>
<td style="text-align: left">
<code class="literal">gpg -o crypt_file.gpg -r name -e file</code>
</td>
<td style="text-align: left">
public-key encryption intended for name from file to binary crypt_file.gpg
</td>
</tr>
<tr>
<td style="text-align: left">
<code class="literal">gpg -o crypt_file.gpg --recipient name --encrypt file</code>
</td>
<td style="text-align: left">
, ,
</td>
</tr>
<tr>
<td style="text-align: left">
<code class="literal">gpg -o crypt_file.asc -a -r name -e file</code>
</td>
<td style="text-align: left">
public-key encryption intended for name from file to <a class="ulink" href="http://en.wikipedia.org/wiki/ASCII">ASCII</a> armored crypt_file.asc
</td>
</tr>
<tr>
<td style="text-align: left">
<code class="literal">gpg -o crypt_file.gpg -c file</code>
</td>
<td style="text-align: left">
symmetric encryption from file to crypt_file.gpg
</td>
</tr>
<tr>
<td style="text-align: left">
<code class="literal">gpg -o crypt_file.gpg --symmetric file</code>
</td>
<td style="text-align: left">
, ,
</td>
</tr>
<tr>
<td style="text-align: left">
<code class="literal">gpg -o crypt_file.asc -a -c file</code>
</td>
<td style="text-align: left">
symmetric encryption intended for name from file to <a class="ulink" href="http://en.wikipedia.org/wiki/ASCII">ASCII</a> armored crypt_file.asc
</td>
</tr>
<tr>
<td style="text-align: left">
<code class="literal">gpg -o file -d crypt_file.gpg -r name</code>
</td>
<td style="text-align: left">
decryption
</td>
</tr>
<tr>
<td style="text-align: left">
<code class="literal">gpg -o file --decrypt crypt_file.gpg</code>
</td>
<td style="text-align: left">
, ,
</td>
</tr>
</tbody>
</table>
</div>
</div>
<br class="table-break"/>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a id="_using_gnupg_with_mutt"/>10.3.3. Using GnuPG with Mutt</h3>
</div>
</div>
</div>
<p>Add the following to "<code class="literal">~/.muttrc</code>" to keep a slow GnuPG from automatically
starting, while allowing it to be used by typing "<code class="literal">S</code>" at the index menu.</p>
<pre class="screen">macro index S ":toggle pgp_verify_sig\n"
set pgp_verify_sig=no</pre>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a id="_using_gnupg_with_vim"/>10.3.4. Using GnuPG with Vim</h3>
</div>
</div>
</div>
<p>The <code class="literal">gnupg</code> plugin let you run GnuPG transparently for files with extension "<code class="literal">.gpg</code>", "<code class="literal">.asc</code>", and "<code class="literal">.ppg</code>".</p>
<pre class="screen"># aptitude install vim-scripts vim-addon-manager
$ vim-addons install gnupg</pre>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a id="_the_md5_sum"/>10.3.5. The MD5 sum</h3>
</div>
</div>
</div>
<p><span class="citerefentry"><span class="refentrytitle">md5sum</span>(1)</span> provides utility to make a digest file using the method in <a class="ulink" href="http://tools.ietf.org/html/rfc1321">rfc1321</a> and verifying each file with it.</p>
<pre class="screen">$ md5sum foo bar >baz.md5
$ cat baz.md5
d3b07384d113edec49eaa6238ad5ff00 foo
c157a79031e1c40f85931829bc5fc552 bar
$ md5sum -c baz.md5
foo: OK
bar: OK</pre>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Note]" src="images/note.png"/>
</td>
<th align="left">Note</th>
</tr>
<tr>
<td align="left" valign="top">
<p>The computation for the <a class="ulink" href="http://en.wikipedia.org/wiki/MD5">MD5</a> sum is less CPU intensive than the one for the cryptographic signature by <a class="ulink" href="http://en.wikipedia.org/wiki/GNU_Privacy_Guard">GNU Privacy Guard (GnuPG)</a>. Usually, only the top level digest file is cryptographically signed to ensure data integrity.</p>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title"><a id="_source_code_merge_tools"/>10.4. Source code merge tools</h2>
</div>
</div>
</div>
<p>There are many merge tools for the source code. Following commands caught my eyes.</p>
<div class="table">
<a id="listofsourcecodemergetools"/>
<p class="title">
<strong>Table 10.10. List of source code merge tools</strong>
</p>
<div class="table-contents">
<table class="table" summary="List of source code merge tools" border="1">
<colgroup>
<col style="text-align: left"/>
<col style="text-align: left"/>
<col style="text-align: left"/>
<col style="text-align: left"/>
<col style="text-align: left"/>
</colgroup>
<thead>
<tr>
<th style="text-align: left">
package
</th>
<th style="text-align: left">
popcon
</th>
<th style="text-align: left">
size
</th>
<th style="text-align: left">
command
</th>
<th style="text-align: left">
description
</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/diffutils">
<code class="literal">diffutils</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=diffutils">V:860, I:983</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/d/diffutils.html">1394</a>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">diff</span>(1)</span>
</td>
<td style="text-align: left">
compare files line by line
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/diffutils">
<code class="literal">diffutils</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=diffutils">V:860, I:983</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/d/diffutils.html">1394</a>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">diff3</span>(1)</span>
</td>
<td style="text-align: left">
compare and merges three files line by line
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/vim">
<code class="literal">vim</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=vim">V:121, I:390</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/v/vim.html">2660</a>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">vimdiff</span>(1)</span>
</td>
<td style="text-align: left">
compare 2 files side by side in vim
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/patch">
<code class="literal">patch</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=patch">V:122, I:818</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/p/patch.html">235</a>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">patch</span>(1)</span>
</td>
<td style="text-align: left">
apply a diff file to an original
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/dpatch">
<code class="literal">dpatch</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=dpatch">V:1, I:15</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/d/dpatch.html">191</a>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">dpatch</span>(1)</span>
</td>
<td style="text-align: left">
manage series of patches for Debian package
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/diffstat">
<code class="literal">diffstat</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=diffstat">V:19, I:187</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/d/diffstat.html">70</a>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">diffstat</span>(1)</span>
</td>
<td style="text-align: left">
produce a histogram of changes by the diff
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/patchutils">
<code class="literal">patchutils</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=patchutils">V:18, I:179</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/p/patchutils.html">223</a>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">combinediff</span>(1)</span>
</td>
<td style="text-align: left">
create a cumulative patch from two incremental patches
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/patchutils">
<code class="literal">patchutils</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=patchutils">V:18, I:179</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/p/patchutils.html">223</a>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">dehtmldiff</span>(1)</span>
</td>
<td style="text-align: left">
extract a diff from an HTML page
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/patchutils">
<code class="literal">patchutils</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=patchutils">V:18, I:179</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/p/patchutils.html">223</a>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">filterdiff</span>(1)</span>
</td>
<td style="text-align: left">
extract or excludes diffs from a diff file
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/patchutils">
<code class="literal">patchutils</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=patchutils">V:18, I:179</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/p/patchutils.html">223</a>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">fixcvsdiff</span>(1)</span>
</td>
<td style="text-align: left">
fix diff files created by CVS that <span class="citerefentry"><span class="refentrytitle">patch</span>(1)</span> mis-interprets
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/patchutils">
<code class="literal">patchutils</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=patchutils">V:18, I:179</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/p/patchutils.html">223</a>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">flipdiff</span>(1)</span>
</td>
<td style="text-align: left">
exchange the order of two patches
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/patchutils">
<code class="literal">patchutils</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=patchutils">V:18, I:179</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/p/patchutils.html">223</a>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">grepdiff</span>(1)</span>
</td>
<td style="text-align: left">
show which files are modified by a patch matching a regex
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/patchutils">
<code class="literal">patchutils</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=patchutils">V:18, I:179</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/p/patchutils.html">223</a>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">interdiff</span>(1)</span>
</td>
<td style="text-align: left">
show differences between two unified diff files
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/patchutils">
<code class="literal">patchutils</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=patchutils">V:18, I:179</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/p/patchutils.html">223</a>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">lsdiff</span>(1)</span>
</td>
<td style="text-align: left">
show which files are modified by a patch
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/patchutils">
<code class="literal">patchutils</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=patchutils">V:18, I:179</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/p/patchutils.html">223</a>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">recountdiff</span>(1)</span>
</td>
<td style="text-align: left">
recompute counts and offsets in unified context diffs
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/patchutils">
<code class="literal">patchutils</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=patchutils">V:18, I:179</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/p/patchutils.html">223</a>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">rediff</span>(1)</span>
</td>
<td style="text-align: left">
fix offsets and counts of a hand-edited diff
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/patchutils">
<code class="literal">patchutils</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=patchutils">V:18, I:179</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/p/patchutils.html">223</a>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">splitdiff</span>(1)</span>
</td>
<td style="text-align: left">
separate out incremental patches
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/patchutils">
<code class="literal">patchutils</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=patchutils">V:18, I:179</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/p/patchutils.html">223</a>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">unwrapdiff</span>(1)</span>
</td>
<td style="text-align: left">
demangle patches that have been word-wrapped
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/wiggle">
<code class="literal">wiggle</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=wiggle">V:0, I:0</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/w/wiggle.html">166</a>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">wiggle</span>(1)</span>
</td>
<td style="text-align: left">
apply rejected patches
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/quilt">
<code class="literal">quilt</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=quilt">V:4, I:41</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/q/quilt.html">711</a>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">quilt</span>(1)</span>
</td>
<td style="text-align: left">
manage series of patches
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/meld">
<code class="literal">meld</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=meld">V:16, I:41</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/m/meld.html">3116</a>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">meld</span>(1)</span>
</td>
<td style="text-align: left">
compare and merge files (GTK)
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/dirdiff">
<code class="literal">dirdiff</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=dirdiff">V:0, I:2</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/d/dirdiff.html">144</a>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">dirdiff</span>(1)</span>
</td>
<td style="text-align: left">
display differences and merge changes between directory trees
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/docdiff">
<code class="literal">docdiff</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=docdiff">V:0, I:0</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/d/docdiff.html">573</a>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">docdiff</span>(1)</span>
</td>
<td style="text-align: left">
compare two files word by word / char by char
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/imediff2">
<code class="literal">imediff2</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=imediff2">V:0, I:0</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/i/imediff2.html">34</a>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">imediff2</span>(1)</span>
</td>
<td style="text-align: left">
interactive full screen 2-way merge tool
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/makepatch">
<code class="literal">makepatch</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=makepatch">V:0, I:0</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/m/makepatch.html">102</a>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">makepatch</span>(1)</span>
</td>
<td style="text-align: left">
generate extended patch files
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/makepatch">
<code class="literal">makepatch</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=makepatch">V:0, I:0</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/m/makepatch.html">102</a>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">applypatch</span>(1)</span>
</td>
<td style="text-align: left">
apply extended patch files
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/wdiff">
<code class="literal">wdiff</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=wdiff">V:5, I:78</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/w/wdiff.html">643</a>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">wdiff</span>(1)</span>
</td>
<td style="text-align: left">
display word differences between text files
</td>
</tr>
</tbody>
</table>
</div>
</div>
<br class="table-break"/>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a id="_extracting_differences_for_source_files"/>10.4.1. Extracting differences for source files</h3>
</div>
</div>
</div>
<p>The following procedures extract differences between two source files and create unified diff files "<code class="literal">file.patch0</code>" or "<code class="literal">file.patch1</code>" depending on the file location.</p>
<pre class="screen">$ diff -u file.old file.new > file.patch0
$ diff -u old/file new/file > file.patch1</pre>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a id="_merging_updates_for_source_files"/>10.4.2. Merging updates for source files</h3>
</div>
</div>
</div>
<p>The diff file (alternatively called patch file) is used to send a program update. The receiving party applies this update to another file by the following.</p>
<pre class="screen">$ patch -p0 file < file.patch0
$ patch -p1 file < file.patch1</pre>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a id="_updating_via_3_way_merge"/>10.4.3. Updating via 3-way-merge</h3>
</div>
</div>
</div>
<p>If you have three versions of a source code, you can perform 3-way-merge effectively using <span class="citerefentry"><span class="refentrytitle">diff3</span>(1)</span> by the following.</p>
<pre class="screen">$ diff3 -m file.mine file.old file.yours > file</pre>
</div>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title"><a id="_version_control_systems"/>10.5. Version control systems</h2>
</div>
</div>
</div>
<p>Here is a summary of the <a class="ulink" href="http://en.wikipedia.org/wiki/Revision_control">version control systems (VCS)</a> on the Debian system.</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Note]" src="images/note.png"/>
</td>
<th align="left">Note</th>
</tr>
<tr>
<td align="left" valign="top">
<p>If you are new to VCS systems, you should start learning with <span class="strong"><strong>Git</strong></span>, which is growing fast in popularity.</p>
</td>
</tr>
</table>
</div>
<div class="table">
<a id="list-of-vcs"/>
<p class="title">
<strong>Table 10.11. List of version control system tools</strong>
</p>
<div class="table-contents">
<table class="table" summary="List of version control system tools" border="1">
<colgroup>
<col style="text-align: left"/>
<col style="text-align: left"/>
<col style="text-align: left"/>
<col style="text-align: left"/>
<col style="text-align: left"/>
<col style="text-align: left"/>
</colgroup>
<thead>
<tr>
<th style="text-align: left">
package
</th>
<th style="text-align: left">
popcon
</th>
<th style="text-align: left">
size
</th>
<th style="text-align: left">
tool
</th>
<th style="text-align: left">
VCS type
</th>
<th style="text-align: left">
comment
</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/cssc">
<code class="literal">cssc</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=cssc">V:0, I:2</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/c/cssc.html">1979</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://cssc.sourceforge.net/">CSSC</a>
</td>
<td style="text-align: left">
local
</td>
<td style="text-align: left">
clone of the <a class="ulink" href="http://en.wikipedia.org/wiki/Source_Code_Control_System">Unix SCCS</a> (deprecated)
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/rcs">
<code class="literal">rcs</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=rcs">V:4, I:22</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/r/rcs.html">539</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://en.wikipedia.org/wiki/Revision_Control_System">RCS</a>
</td>
<td style="text-align: left">
local
</td>
<td style="text-align: left">
"<a class="ulink" href="http://en.wikipedia.org/wiki/Source_Code_Control_System">Unix SCCS</a> done right"
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/cvs">
<code class="literal">cvs</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=cvs">V:6, I:55</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/c/cvs.html">4597</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://en.wikipedia.org/wiki/Concurrent_Versions_System">CVS</a>
</td>
<td style="text-align: left">
remote
</td>
<td style="text-align: left">
previous standard remote VCS
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/subversion">
<code class="literal">subversion</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=subversion">V:31, I:144</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/s/subversion.html">4678</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://en.wikipedia.org/wiki/Subversion_(software)">Subversion</a>
</td>
<td style="text-align: left">
remote
</td>
<td style="text-align: left">
"CVS done right", the new de facto standard remote VCS
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/git">
<code class="literal">git</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=git">V:279, I:436</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/g/git.html">33191</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://en.wikipedia.org/wiki/Git_(software)">Git</a>
</td>
<td style="text-align: left">
distributed
</td>
<td style="text-align: left">
fast DVCS in C (used by the Linux kernel and others)
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/mercurial">
<code class="literal">mercurial</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=mercurial">V:12, I:61</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/m/mercurial.html">552</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://en.wikipedia.org/wiki/Mercurial_(software)">Mercurial</a>
</td>
<td style="text-align: left">
distributed
</td>
<td style="text-align: left">
DVCS in Python and some C
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/bzr">
<code class="literal">bzr</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=bzr">V:4, I:22</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/b/bzr.html">73</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://en.wikipedia.org/wiki/Bazaar_(software)">Bazaar</a>
</td>
<td style="text-align: left">
distributed
</td>
<td style="text-align: left">
DVCS influenced by <code class="literal">tla</code> written in Python (used by <a class="ulink" href="http://www.ubuntu.com/">Ubuntu</a>)
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/darcs">
<code class="literal">darcs</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=darcs">V:0, I:8</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/d/darcs.html">31349</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://en.wikipedia.org/wiki/Darcs">Darcs</a>
</td>
<td style="text-align: left">
distributed
</td>
<td style="text-align: left">
DVCS with smart algebra of patches (slow)
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/tla">
<code class="literal">tla</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=tla">V:0, I:7</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/t/tla.html">1011</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://en.wikipedia.org/wiki/GNU_arch">GNU arch</a>
</td>
<td style="text-align: left">
distributed
</td>
<td style="text-align: left">
DVCS mainly by Tom Lord (Historic)
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/monotone">
<code class="literal">monotone</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=monotone">V:0, I:0</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/m/monotone.html">5815</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://en.wikipedia.org/wiki/Monotone_(software)">Monotone</a>
</td>
<td style="text-align: left">
distributed
</td>
<td style="text-align: left">
DVCS in C++
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/tkcvs">
<code class="literal">tkcvs</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=tkcvs">V:0, I:1</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/t/tkcvs.html">1498</a>
</td>
<td style="text-align: left">
CVS, …
</td>
<td style="text-align: left">
remote
</td>
<td style="text-align: left">
GUI display of VCS (CVS, Subversion, RCS) repository tree
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/gitk">
<code class="literal">gitk</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=gitk">V:8, I:49</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/g/gitk.html">1483</a>
</td>
<td style="text-align: left">
Git
</td>
<td style="text-align: left">
distributed
</td>
<td style="text-align: left">
GUI display of VCS (Git) repository tree
</td>
</tr>
</tbody>
</table>
</div>
</div>
<br class="table-break"/>
<p>VCS is sometimes known as revision control system (RCS), or software configuration management (SCM).</p>
<p>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.</p>
<p>Debian provides free VCS services via <a class="ulink" href="https://salsa.debian.org/">Debian Salsa service</a>. It supports practically all VCSs. Its documentation can be found at <a class="ulink" href="https://wiki.debian.org/Salsa">https://wiki.debian.org/Salsa</a> .</p>
<p>There are few basics for creating a shared access VCS archive.</p>
<div class="itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<p>
Use "<code class="literal">umask 002</code>" (see <a class="xref" href="ch01.en.html#_control_of_permissions_for_newly_created_files_umask" title="1.2.4. Control of permissions for newly created files: umask">Section 1.2.4, “Control of permissions for newly created files: umask”</a>)
</p>
</li>
<li class="listitem">
<p>
Make all VCS archive files belonging to a pertinent group
</p>
</li>
<li class="listitem">
<p>
Enable set group ID on all VCS archive directories (BSD-like file creation scheme, see <a class="xref" href="ch01.en.html#_filesystem_permissions" title="1.2.3. Filesystem permissions">Section 1.2.3, “Filesystem permissions”</a>)
</p>
</li>
<li class="listitem">
<p>
Make user sharing the VCS archive belonging to the group
</p>
</li>
</ul>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a id="_comparison_of_vcs_commands"/>10.5.1. Comparison of VCS commands</h3>
</div>
</div>
</div>
<p>Here is an oversimplified comparison of native VCS commands to provide the big picture. The typical command sequence may require options and arguments.</p>
<div class="table">
<a id="comparisonofnativevcscommands"/>
<p class="title">
<strong>Table 10.12. Comparison of native VCS commands</strong>
</p>
<div class="table-contents">
<table class="table" summary="Comparison of native VCS commands" border="1">
<colgroup>
<col style="text-align: left"/>
<col style="text-align: left"/>
<col style="text-align: left"/>
<col style="text-align: left"/>
</colgroup>
<thead>
<tr>
<th style="text-align: left">
Git
</th>
<th style="text-align: left">
CVS
</th>
<th style="text-align: left">
Subversion
</th>
<th style="text-align: left">
function
</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left">
<code class="literal">git init</code>
</td>
<td style="text-align: left">
<code class="literal">cvs init</code>
</td>
<td style="text-align: left">
<code class="literal">svn create</code>
</td>
<td style="text-align: left">
create the (local) repository
</td>
</tr>
<tr>
<td style="text-align: left">
-
</td>
<td style="text-align: left">
<code class="literal">cvs login</code>
</td>
<td style="text-align: left">
-
</td>
<td style="text-align: left">
login to the remote repository
</td>
</tr>
<tr>
<td style="text-align: left">
<code class="literal">git clone</code>
</td>
<td style="text-align: left">
<code class="literal">cvs co</code>
</td>
<td style="text-align: left">
<code class="literal">svn co</code>
</td>
<td style="text-align: left">
check out the remote repository as the working tree
</td>
</tr>
<tr>
<td style="text-align: left">
<code class="literal">git pull</code>
</td>
<td style="text-align: left">
<code class="literal">cvs up</code>
</td>
<td style="text-align: left">
<code class="literal">svn up</code>
</td>
<td style="text-align: left">
update the working tree by merging the remote repository
</td>
</tr>
<tr>
<td style="text-align: left">
<code class="literal">git add .</code>
</td>
<td style="text-align: left">
<code class="literal">cvs add</code>
</td>
<td style="text-align: left">
<code class="literal">svn add</code>
</td>
<td style="text-align: left">
add file(s) in the working tree to the VCS
</td>
</tr>
<tr>
<td style="text-align: left">
<code class="literal">git rm</code>
</td>
<td style="text-align: left">
<code class="literal">cvs rm</code>
</td>
<td style="text-align: left">
<code class="literal">svn rm</code>
</td>
<td style="text-align: left">
remove file(s) in working tree from the VCS
</td>
</tr>
<tr>
<td style="text-align: left">
-
</td>
<td style="text-align: left">
<code class="literal">cvs ci</code>
</td>
<td style="text-align: left">
<code class="literal">svn ci</code>
</td>
<td style="text-align: left">
commit changes to the remote repository
</td>
</tr>
<tr>
<td style="text-align: left">
<code class="literal">git commit -a</code>
</td>
<td style="text-align: left">
-
</td>
<td style="text-align: left">
-
</td>
<td style="text-align: left">
commit changes to the local repository
</td>
</tr>
<tr>
<td style="text-align: left">
<code class="literal">git push</code>
</td>
<td style="text-align: left">
-
</td>
<td style="text-align: left">
-
</td>
<td style="text-align: left">
update the remote repository by the local repository
</td>
</tr>
<tr>
<td style="text-align: left">
<code class="literal">git status</code>
</td>
<td style="text-align: left">
<code class="literal">cvs status</code>
</td>
<td style="text-align: left">
<code class="literal">svn status</code>
</td>
<td style="text-align: left">
display the working tree status from the VCS
</td>
</tr>
<tr>
<td style="text-align: left">
<code class="literal">git diff</code>
</td>
<td style="text-align: left">
<code class="literal">cvs diff</code>
</td>
<td style="text-align: left">
<code class="literal">svn diff</code>
</td>
<td style="text-align: left">
diff <reference_repository> <working_tree>
</td>
</tr>
<tr>
<td style="text-align: left">
<code class="literal">git repack -a -d; git prune</code>
</td>
<td style="text-align: left">
-
</td>
<td style="text-align: left">
-
</td>
<td style="text-align: left">
repack the local repository into single pack
</td>
</tr>
<tr>
<td style="text-align: left">
<code class="literal">gitk</code>
</td>
<td style="text-align: left">
<code class="literal">tkcvs</code>
</td>
<td style="text-align: left">
<code class="literal">tkcvs</code>
</td>
<td style="text-align: left">
GUI display of VCS repository tree
</td>
</tr>
</tbody>
</table>
</div>
</div>
<br class="table-break"/>
<div class="caution" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Caution">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Caution]" src="images/caution.png"/>
</td>
<th align="left">Caution</th>
</tr>
<tr>
<td align="left" valign="top">
<p>Invoking a <code class="literal">git</code> subcommand directly as "<code class="literal">git-xyz</code>" from the command line has been deprecated since early 2006.</p>
</td>
</tr>
</table>
</div>
<div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Tip">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Tip]" src="images/tip.png"/>
</td>
<th align="left">Tip</th>
</tr>
<tr>
<td align="left" valign="top">
<p>If there is a executable file <code class="literal">git-foo</code> in the path specified by <code class="literal">$PATH</code>, entring "<code class="literal">git foo</code>" without hyphen to the command line invokes this <code class="literal">git-foo</code>. This is a feature of the <code class="literal">git</code> command.</p>
</td>
</tr>
</table>
</div>
<div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Tip">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Tip]" src="images/tip.png"/>
</td>
<th align="left">Tip</th>
</tr>
<tr>
<td align="left" valign="top">
<p>GUI tools such as <span class="citerefentry"><span class="refentrytitle">tkcvs</span>(1)</span> and <span class="citerefentry"><span class="refentrytitle">gitk</span>(1)</span> really help you with tracking revision history of files. The web interface provided by many public archives for browsing their repositories is also quite useful, too.</p>
</td>
</tr>
</table>
</div>
<div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Tip">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Tip]" src="images/tip.png"/>
</td>
<th align="left">Tip</th>
</tr>
<tr>
<td align="left" valign="top">
<p>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 <code class="literal">git-cvs</code> and <code class="literal">git-svn</code> packages. See <a class="ulink" href="http://www.kernel.org/pub/software/scm/git/docs/gitcvs-migration.html">git for CVS users</a>, and <a class="xref" href="ch10.en.html#_git_for_the_subversion_repository" title="10.6.4. Git for the Subversion repository">Section 10.6.4, “Git for the Subversion repository”</a>.</p>
</td>
</tr>
</table>
</div>
<div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Tip">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Tip]" src="images/tip.png"/>
</td>
<th align="left">Tip</th>
</tr>
<tr>
<td align="left" valign="top">
<p>Git has commands which have no equivalents in CVS and Subversion: "fetch", "rebase", "cherry-pick", …</p>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title"><a id="_git"/>10.6. Git</h2>
</div>
</div>
</div>
<p>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.</p>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a id="_configuration_of_git_client"/>10.6.1. Configuration of Git client</h3>
</div>
</div>
</div>
<p>You may wish to set several global configuration in "<code class="literal">~/.gitconfig</code>" such as your name and email address used by Git by the following.</p>
<pre class="screen">$ git config --global user.name "Name Surname"
$ git config --global user.email yourname@example.com</pre>
<p>If you are too used to CVS or Subversion commands, you may wish to set several command aliases by the following.</p>
<pre class="screen">$ git config --global alias.ci "commit -a"
$ git config --global alias.co checkout</pre>
<p>You can check your global configuration by the following.</p>
<pre class="screen">$ git config --global --list</pre>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a id="_git_references"/>10.6.2. Git references</h3>
</div>
</div>
</div>
<p>See the following.</p>
<div class="itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<p><a class="ulink" href="http://www.kernel.org/pub/software/scm/git/docs/git.html">manpage: git(1)</a> (<code class="literal">/usr/share/doc/git-doc/git.html</code>)
</p>
</li>
<li class="listitem">
<p><a class="ulink" href="http://www.kernel.org/pub/software/scm/git/docs/user-manual.html">Git User's Manual</a> (<code class="literal">/usr/share/doc/git-doc/user-manual.html</code>)
</p>
</li>
<li class="listitem">
<p><a class="ulink" href="http://www.kernel.org/pub/software/scm/git/docs/gittutorial.html">A tutorial introduction to git</a> (<code class="literal">/usr/share/doc/git-doc/gittutorial.html</code>)
</p>
</li>
<li class="listitem">
<p><a class="ulink" href="http://www.kernel.org/pub/software/scm/git/docs/gittutorial-2.html">A tutorial introduction to git: part two</a> (<code class="literal">/usr/share/doc/git-doc/gittutorial-2.html</code>)
</p>
</li>
<li class="listitem">
<p><a class="ulink" href="http://www.kernel.org/pub/software/scm/git/docs/everyday.html">Everyday GIT With 20 Commands Or So</a> (<code class="literal">/usr/share/doc/git-doc/everyday.html</code>)
</p>
</li>
<li class="listitem">
<p><a class="ulink" href="http://www.kernel.org/pub/software/scm/git/docs/gitcvs-migration.html">git for CVS users</a> (<code class="literal">/usr/share/doc/git-doc/gitcvs-migration.html</code>)
</p>
<div class="itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<p>
This also describes how to set up server like CVS and extract old data from CVS into Git.
</p>
</li>
</ul>
</div>
</li>
<li class="listitem">
<p>
<a class="ulink" href="http://git-scm.com/documentation">Other git resources available on the web</a>
</p>
<div class="itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<p>
<a class="ulink" href="http://git-scm.com/course/svn.html">Git - SVN Crash Course</a>
</p>
</li>
<li class="listitem">
<p><a class="ulink" href="http://www-cs-students.stanford.edu/~blynn/gitmagic/">Git Magic</a> (<code class="literal">/usr/share/doc/gitmagic/html/index.html</code>)
</p>
</li>
</ul>
</div>
</li>
</ul>
</div>
<p><span class="citerefentry"><span class="refentrytitle">git-gui</span>(1)</span> and <span class="citerefentry"><span class="refentrytitle">gitk</span>(1)</span> commands make using Git very easy.</p>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Warning">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Warning]" src="images/warning.png"/>
</td>
<th align="left">Warning</th>
</tr>
<tr>
<td align="left" valign="top">
<p>Do not use the tag string with spaces in it even if some tools such as <span class="citerefentry"><span class="refentrytitle">gitk</span>(1)</span> allow you to use it. It may choke some other <code class="literal">git</code> commands.</p>
</td>
</tr>
</table>
</div>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a id="_git_commands"/>10.6.3. Git commands</h3>
</div>
</div>
</div>
<p>Even if your upstream uses different VCS, it may be a good idea to use <span class="citerefentry"><span class="refentrytitle">git</span>(1)</span> for local activity since you can manage your local copy of source tree without the network connection to the upstream. Here are some packages and commands used with <span class="citerefentry"><span class="refentrytitle">git</span>(1)</span>.</p>
<div class="table">
<a id="listofgitrelatedkagesandcommands"/>
<p class="title">
<strong>Table 10.13. List of git related packages and commands</strong>
</p>
<div class="table-contents">
<table class="table" summary="List of git related packages and commands" border="1">
<colgroup>
<col style="text-align: left"/>
<col style="text-align: left"/>
<col style="text-align: left"/>
<col style="text-align: left"/>
<col style="text-align: left"/>
</colgroup>
<thead>
<tr>
<th style="text-align: left">
package
</th>
<th style="text-align: left">
popcon
</th>
<th style="text-align: left">
size
</th>
<th style="text-align: left">
command
</th>
<th style="text-align: left">
description
</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/git-doc">
<code class="literal">git-doc</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=git-doc">I:19</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/g/git-doc.html">10733</a>
</td>
<td style="text-align: left">
N/A
</td>
<td style="text-align: left">
official documentation for Git
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/gitmagic">
<code class="literal">gitmagic</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=gitmagic">I:1</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/g/gitmagic.html">719</a>
</td>
<td style="text-align: left">
N/A
</td>
<td style="text-align: left">
"Git Magic", easier to understand guide for Git
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/git">
<code class="literal">git</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=git">V:279, I:436</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/g/git.html">33191</a>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">git</span>(7)</span>
</td>
<td style="text-align: left">
Git, the fast, scalable, distributed revision control system
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/gitk">
<code class="literal">gitk</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=gitk">V:8, I:49</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/g/gitk.html">1483</a>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">gitk</span>(1)</span>
</td>
<td style="text-align: left">
GUI Git repository browser with history
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/git-gui">
<code class="literal">git-gui</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=git-gui">V:2, I:28</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/g/git-gui.html">2210</a>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">git-gui</span>(1)</span>
</td>
<td style="text-align: left">
GUI for Git (No history)
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/git-svn">
<code class="literal">git-svn</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=git-svn">V:2, I:27</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/g/git-svn.html">995</a>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">git-svnimport</span>(1)</span>
</td>
<td style="text-align: left">
import the data out of Subversion into Git
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/git-svn">
<code class="literal">git-svn</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=git-svn">V:2, I:27</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/g/git-svn.html">995</a>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">git-svn</span>(1)</span>
</td>
<td style="text-align: left">
provide bidirectional operation between the Subversion and Git
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/git-cvs">
<code class="literal">git-cvs</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=git-cvs">V:0, I:13</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/g/git-cvs.html">1116</a>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">git-cvsimport</span>(1)</span>
</td>
<td style="text-align: left">
import the data out of CVS into Git
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/git-cvs">
<code class="literal">git-cvs</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=git-cvs">V:0, I:13</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/g/git-cvs.html">1116</a>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">git-cvsexportcommit</span>(1)</span>
</td>
<td style="text-align: left">
export a commit to a CVS checkout from Git
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/git-cvs">
<code class="literal">git-cvs</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=git-cvs">V:0, I:13</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/g/git-cvs.html">1116</a>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">git-cvsserver</span>(1)</span>
</td>
<td style="text-align: left">
CVS server emulator for Git
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/git-email">
<code class="literal">git-email</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=git-email">V:0, I:13</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/g/git-email.html">800</a>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">git-send-email</span>(1)</span>
</td>
<td style="text-align: left">
send a collection of patches as email from the Git
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/stgit">
<code class="literal">stgit</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=stgit">V:0, I:1</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/s/stgit.html">1535</a>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">stg</span>(1)</span>
</td>
<td style="text-align: left">
quilt on top of git (Python)
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/git-buildpackage">
<code class="literal">git-buildpackage</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=git-buildpackage">V:2, I:12</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/g/git-buildpackage.html">3863</a>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">git-buildpackage</span>(1)</span>
</td>
<td style="text-align: left">
automate the Debian packaging with the Git
</td>
</tr>
<tr>
<td style="text-align: left">
<a class="ulink" href="http://packages.debian.org/sid/guilt">
<code class="literal">guilt</code>
</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://qa.debian.org/popcon.php?package=guilt">V:0, I:0</a>
</td>
<td style="text-align: left">
<a class="ulink" href="http://packages.qa.debian.org/g/guilt.html">146</a>
</td>
<td style="text-align: left"><span class="citerefentry"><span class="refentrytitle">guilt</span>(7)</span>
</td>
<td style="text-align: left">
quilt on top of git (SH/AWK/SED/…)
</td>
</tr>
</tbody>
</table>
</div>
</div>
<br class="table-break"/>
<div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Tip">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Tip]" src="images/tip.png"/>
</td>
<th align="left">Tip</th>
</tr>
<tr>
<td align="left" valign="top">
<p>With <span class="citerefentry"><span class="refentrytitle">git</span>(1)</span>, you work on a local branch with many commits and use something like "<code class="literal">git rebase -i master</code>" to reorganize change history later. This enables you to make clean change history. See <span class="citerefentry"><span class="refentrytitle">git-rebase</span>(1)</span> and <span class="citerefentry"><span class="refentrytitle">git-cherry-pick</span>(1)</span>.</p>
</td>
</tr>
</table>
</div>
<div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Tip">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Tip]" src="images/tip.png"/>
</td>
<th align="left">Tip</th>
</tr>
<tr>
<td align="left" valign="top">
<p>When you want to go back to a clean working directory without loosing the current state of the working directory, you can use "<code class="literal">git stash</code>". See <span class="citerefentry"><span class="refentrytitle">git-stash</span>(1)</span>.</p>
</td>
</tr>
</table>
</div>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a id="_git_for_the_subversion_repository"/>10.6.4. Git for the Subversion repository</h3>
</div>
</div>
</div>
<p>You can check out a Subversion repository at "<code class="literal">svn+ssh://svn.example.org/project/module/trunk</code>" to a local Git repository at "<code class="literal">./dest</code>" and commit back to the Subversion repository. E.g.:</p>
<pre class="screen">$ git svn clone -s -rHEAD svn+ssh://svn.example.org/project dest
$ cd dest
... make changes
$ git commit -a
... keep working locally with git
$ git svn dcommit</pre>
<div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Tip">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Tip]" src="images/tip.png"/>
</td>
<th align="left">Tip</th>
</tr>
<tr>
<td align="left" valign="top">
<p>The use of "<code class="literal">-rHEAD</code>" enables us to avoid cloning entire historical contents from the Subversion repository.</p>
</td>
</tr>
</table>
</div>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a id="_git_for_recording_configuration_history"/>10.6.5. Git for recording configuration history</h3>
</div>
</div>
</div>
<p>You can manually record chronological history of configuration using <a class="ulink" href="http://en.wikipedia.org/wiki/Git_(software)">Git</a> tools. Here is a simple example for your practice to record "<code class="literal">/etc/apt/</code>" contents.</p>
<pre class="screen">$ cd /etc/apt/
$ sudo git init
$ sudo chmod 700 .git
$ sudo git add .
$ sudo git commit -a</pre>
<p>Commit configuration with description.</p>
<p>Make modification to the configuration files.</p>
<pre class="screen">$ cd /etc/apt/
$ sudo git commit -a</pre>
<p>Commit configuration with description and continue your life.</p>
<pre class="screen">$ cd /etc/apt/
$ sudo gitk --all</pre>
<p>You have full configuration history with you.</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Note]" src="images/note.png"/>
</td>
<th align="left">Note</th>
</tr>
<tr>
<td align="left" valign="top">
<p><span class="citerefentry"><span class="refentrytitle">sudo</span>(8)</span> is needed to work with any file permissions of configuration data. For user configuration data, you may skip <code class="literal">sudo</code>.</p>
</td>
</tr>
</table>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Note]" src="images/note.png"/>
</td>
<th align="left">Note</th>
</tr>
<tr>
<td align="left" valign="top">
<p>The "<code class="literal">chmod 700 .git</code>" command in the above example is needed to protect archive data from unauthorized read access.</p>
</td>
</tr>
</table>
</div>
<div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Tip">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Tip]" src="images/tip.png"/>
</td>
<th align="left">Tip</th>
</tr>
<tr>
<td align="left" valign="top">
<p>For more complete setup for recording configuration history, please look for the <code class="literal">etckeeper</code> package: <a class="xref" href="ch09.en.html#_recording_changes_in_configuration_files" title="9.2.10. Recording changes in configuration files">Section 9.2.10, “Recording changes in configuration files”</a>.</p>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title"><a id="_cvs"/>10.7. CVS</h2>
</div>
</div>
</div>
<p>CVS is an <span class="strong"><strong>older</strong></span> version control system before Subversion and Git.</p>
<div class="caution" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Caution">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Caution]" src="images/caution.png"/>
</td>
<th align="left">Caution</th>
</tr>
<tr>
<td align="left" valign="top">
<p>Many URLs found in the below examples for CVS don't exist any more.</p>
</td>
</tr>
</table>
</div>
<p>See the following.</p>
<div class="itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<p><span class="citerefentry"><span class="refentrytitle">cvs</span>(1)</span>
</p>
</li>
<li class="listitem">
<p>
"<code class="literal">/usr/share/doc/cvs/html-cvsclient</code>"
</p>
</li>
<li class="listitem">
<p>
"<code class="literal">/usr/share/doc/cvs/html-info</code>"
</p>
</li>
<li class="listitem">
<p>
"<code class="literal">/usr/share/doc/cvsbook</code>"
</p>
</li>
<li class="listitem">
<p>
"<code class="literal">info cvs</code>"
</p>
</li>
</ul>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a id="_configuration_of_cvs_repository"/>10.7.1. Configuration of CVS repository</h3>
</div>
</div>
</div>
<p>The following configuration allows commits to the CVS repository only by a member of the "<code class="literal">src</code>" group, and administration of CVS only by a member of the "<code class="literal">staff</code>" group, thus reducing the chance of shooting oneself.</p>
<pre class="screen"># cd /var/lib; umask 002; mkdir cvs
# export CVSROOT=/srv/cvs/project
# 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</pre>
<div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Tip">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Tip]" src="images/tip.png"/>
</td>
<th align="left">Tip</th>
</tr>
<tr>
<td align="left" valign="top">
<p>You may restrict creation of new project by changing the owner of "<code class="literal">$CVSROOT</code>" directory to "<code class="literal">root:staff</code>" and its permission to "<code class="literal">3775</code>".</p>
</td>
</tr>
</table>
</div>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a id="_local_access_to_cvs"/>10.7.2. Local access to CVS</h3>
</div>
</div>
</div>
<p>The default CVS repository is pointed by "<code class="literal">$CVSROOT</code>". The following sets up "<code class="literal">$CVSROOT</code>" for the local access.</p>
<pre class="screen">$ export CVSROOT=/srv/cvs/project</pre>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a id="_remote_access_to_cvs_with_pserver"/>10.7.3. Remote access to CVS with pserver</h3>
</div>
</div>
</div>
<p>Many public CVS servers provide read-only remote access to them with account name "<code class="literal">anonymous</code>" via pserver service. For example, Debian web site contents were maintained by <a class="ulink" href="http://alioth.debian.org/projects/webwml/">webwml project</a> via CVS at Debian alioth service. The following was used to set up "<code class="literal">$CVSROOT</code>" for the remote access to this old CVS repository.</p>
<pre class="screen">$ export CVSROOT=:pserver:anonymous@anonscm.debian.org:/cvs/webwml
$ cvs login</pre>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Note]" src="images/note.png"/>
</td>
<th align="left">Note</th>
</tr>
<tr>
<td align="left" valign="top">
<p>Since pserver is prone to eavesdropping attack and insecure, write access is usually disable by server administrators.</p>
</td>
</tr>
</table>
</div>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a id="_remote_access_to_cvs_with_ssh"/>10.7.4. Remote access to CVS with ssh</h3>
</div>
</div>
</div>
<p>The following was used to set up "<code class="literal">$CVS_RSH</code>" and "<code class="literal">$CVSROOT</code>" for the remote access to the old CVS repository by <a class="ulink" href="http://alioth.debian.org/projects/webwml/">webwml project</a> with SSH.</p>
<pre class="screen">$ export CVS_RSH=ssh
$ export CVSROOT=:ext:account@cvs.alioth.debian.org:/cvs/webwml</pre>
<p>You can also use public key authentication for SSH which eliminates the remote password prompt.</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a id="_importing_a_new_source_to_cvs"/>10.7.5. Importing a new source to CVS</h3>
</div>
</div>
</div>
<p>Create a new local source tree location at "<code class="literal">~/path/to/module1</code>" by the following.</p>
<pre class="screen">$ mkdir -p ~/path/to/module1; cd ~/path/to/module1</pre>
<p>Populate a new local source tree under "<code class="literal">~/path/to/module1</code>" with files.</p>
<p>Import it to CVS with the following parameters.</p>
<div class="itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<p>
Module name: "<code class="literal">module1</code>"
</p>
</li>
<li class="listitem">
<p>
Vendor tag: "<code class="literal">Main-branch</code>" (tag for the entire branch)
</p>
</li>
<li class="listitem">
<p>
Release tag: "<code class="literal">Release-initial</code>" (tag for a specific release)
</p>
</li>
</ul>
</div>
<pre class="screen">$ cd ~/path/to/module1
$ cvs import -m "Start module1" module1 Main-branch Release-initial
$ rm -Rf . # optional</pre>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a id="_file_permissions_in_cvs_repository"/>10.7.6. File permissions in CVS repository</h3>
</div>
</div>
</div>
<p>CVS does not overwrite the current repository file but replaces it with another one. Thus, write permission to the repository directory is critical. For every new module for "<code class="literal">module1</code>" in repository at "<code class="literal">/srv/cvs/project</code>", run the following to ensure this condition if needed.</p>
<pre class="screen"># cd /srv/cvs/project
# chown -R root:src module1
# chmod -R ug+rwX module1
# chmod 2775 module1</pre>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a id="_work_flow_of_cvs"/>10.7.7. Work flow of CVS</h3>
</div>
</div>
</div>
<p>Here is an example of typical work flow using CVS.</p>
<p>Check all available modules from CVS project pointed by "<code class="literal">$CVSROOT</code>" by the following.</p>
<pre class="screen">$ cvs rls
CVSROOT
module1
module2
...</pre>
<p>Checkout "<code class="literal">module1</code>" to its default directory "<code class="literal">./module1</code>" by the following.</p>
<pre class="screen">$ cd ~/path/to
$ cvs co module1
$ cd module1</pre>
<p>Make changes to the content as needed.</p>
<p>Check changes by making "<code class="literal">diff -u [repository] [local]</code>" equivalent by the following.</p>
<pre class="screen">$ cvs diff -u</pre>
<p>You find that you broke some file "<code class="literal">file_to_undo</code>" severely but other files are fine.</p>
<p>Overwrite "<code class="literal">file_to_undo</code>" file with the clean copy from CVS by the following.</p>
<pre class="screen">$ cvs up -C file_to_undo</pre>
<p>Save the updated local source tree to CVS by the following.</p>
<pre class="screen">$ cvs ci -m "Describe change"</pre>
<p>Create and add "<code class="literal">file_to_add</code>" file to CVS by the following.</p>
<pre class="screen">$ vi file_to_add
$ cvs add file_to_add
$ cvs ci -m "Added file_to_add"</pre>
<p>Merge the latest version from CVS by the following.</p>
<pre class="screen">$ cvs up -d</pre>
<p>Watch out for lines starting with "<code class="literal">C filename</code>" which indicates conflicting changes.</p>
<p>Look for unmodified code in "<code class="literal">.#filename.version</code>".</p>
<p>Search for "<code class="literal"><<<<<<<</code>" and "<code class="literal">>>>>>>></code>" in files for conflicting changes.</p>
<p>Edit files to fix conflicts as needed.</p>
<p>Add a release tag "<code class="literal">Release-1</code>" by the following.</p>
<pre class="screen">$ cvs ci -m "last commit for Release-1"
$ cvs tag Release-1</pre>
<p>Edit further.</p>
<p>Remove the release tag "<code class="literal">Release-1</code>" by the following.</p>
<pre class="screen">$ cvs tag -d Release-1</pre>
<p>Check in changes to CVS by the following.</p>
<pre class="screen">$ cvs ci -m "real last commit for Release-1"</pre>
<p>Re-add the release tag "<code class="literal">Release-1</code>" to updated CVS HEAD of main by the following.</p>
<pre class="screen">$ cvs tag Release-1</pre>
<p>Create a branch with a sticky branch tag "<code class="literal">Release-initial-bugfixes</code>" from the original version pointed by the tag "<code class="literal">Release-initial</code>" and check it out to "<code class="literal">~/path/to/old</code>" directory by the following.</p>
<pre class="screen">$ cvs rtag -b -r Release-initial Release-initial-bugfixes module1
$ cd ~/path/to
$ cvs co -r Release-initial-bugfixes -d old module1
$ cd old</pre>
<div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Tip">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Tip]" src="images/tip.png"/>
</td>
<th align="left">Tip</th>
</tr>
<tr>
<td align="left" valign="top">
<p>Use "<code class="literal">-D 2005-12-20</code>" (<a class="ulink" href="http://en.wikipedia.org/wiki/ISO_8601">ISO 8601</a> date format) instead of "<code class="literal">-r Release-initial</code>" to specify particular date as the branch point.</p>
</td>
</tr>
</table>
</div>
<p>Work on this local source tree having the sticky tag "<code class="literal">Release-initial-bugfixes</code>" which is based on the original version.</p>
<p>Work on this branch by yourself … until someone else joins to this "<code class="literal">Release-initial-bugfixes</code>" branch.</p>
<p>Sync with files modified by others on this branch while creating new directories as needed by the following.</p>
<pre class="screen">$ cvs up -d</pre>
<p>Edit files to fix conflicts as needed.</p>
<p>Check in changes to CVS by the following.</p>
<pre class="screen">$ cvs ci -m "checked into this branch"</pre>
<p>Update the local tree by HEAD of main while removing sticky tag ("<code class="literal">-A</code>") and without keyword expansion ("<code class="literal">-kk</code>") by the following.</p>
<pre class="screen">$ cvs up -d -kk -A</pre>
<p>Update the local tree (content = HEAD of main) by merging from the "<code class="literal">Release-initial-bugfixes</code>" branch and without keyword expansion by the following.</p>
<pre class="screen">$ cvs up -d -kk -j Release-initial-bugfixes</pre>
<p>Fix conflicts with editor.</p>
<p>Check in changes to CVS by the following.</p>
<pre class="screen">$ cvs ci -m "merged Release-initial-bugfixes"</pre>
<p>Make archive by the following.</p>
<pre class="screen">$ cd ..
$ mv old old-module1-bugfixes
$ tar -cvzf old-module1-bugfixes.tar.gz old-module1-bugfixes
$ rm -rf old-module1-bugfixes</pre>
<div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Tip">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Tip]" src="images/tip.png"/>
</td>
<th align="left">Tip</th>
</tr>
<tr>
<td align="left" valign="top">
<p>"<code class="literal">cvs up</code>" command can take "<code class="literal">-d</code>" option to create new directories and "<code class="literal">-P</code>" option to prune empty directories.</p>
</td>
</tr>
</table>
</div>
<div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Tip">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Tip]" src="images/tip.png"/>
</td>
<th align="left">Tip</th>
</tr>
<tr>
<td align="left" valign="top">
<p>You can checkout only a sub directory of "<code class="literal">module1</code>" by providing its name as "<code class="literal">cvs co module1/subdir</code>".</p>
</td>
</tr>
</table>
</div>
<div class="table">
<a id="notableoptionsfotargumentstocvsb"/>
<p class="title">
<strong>Table 10.14. Notable options for CVS commands (use as first argument(s) to <span class="citerefentry"><span class="refentrytitle">cvs</span>(1)</span>)</strong>
</p>
<div class="table-contents">
<table class="table" summary="Notable options for CVS commands (use as first argument(s) to cvs1)" border="1">
<colgroup>
<col style="text-align: left"/>
<col style="text-align: left"/>
</colgroup>
<thead>
<tr>
<th style="text-align: left">
option
</th>
<th style="text-align: left">
meaning
</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left">
<code class="literal">-n</code>
</td>
<td style="text-align: left">
dry run, no effect
</td>
</tr>
<tr>
<td style="text-align: left">
<code class="literal">-t</code>
</td>
<td style="text-align: left">
display messages showing steps of cvs activity
</td>
</tr>
</tbody>
</table>
</div>
</div>
<br class="table-break"/>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a id="_latest_files_from_cvs"/>10.7.8. Latest files from CVS</h3>
</div>
</div>
</div>
<p>To get the latest files from CVS, use "<code class="literal">tomorrow</code>" by the following.</p>
<pre class="screen">$ cvs ex -D tomorrow module_name</pre>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a id="_administration_of_cvs"/>10.7.9. Administration of CVS</h3>
</div>
</div>
</div>
<p>Add module alias "<code class="literal">mx</code>" to a CVS project (local server) by the following.</p>
<pre class="screen">$ export CVSROOT=/srv/cvs/project
$ cvs co CVSROOT/modules
$ cd CVSROOT
$ echo "mx -a module1" >>modules
$ cvs ci -m "Now mx is an alias for module1"
$ cvs release -d .</pre>
<p>Now, you can check out "<code class="literal">module1</code>" (alias: "<code class="literal">mx</code>") from CVS to "<code class="literal">new</code>" directory by the following.</p>
<pre class="screen">$ cvs co -d new mx
$ cd new</pre>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Note]" src="images/note.png"/>
</td>
<th align="left">Note</th>
</tr>
<tr>
<td align="left" valign="top">
<p>In order to perform above procedure, you should have appropriate file permissions.</p>
</td>
</tr>
</table>
</div>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a id="_execution_bit_for_cvs_checkout"/>10.7.10. Execution bit for CVS checkout</h3>
</div>
</div>
</div>
<p>When you checkout files from CVS, their execution permission bit is retained.</p>
<p>Whenever you see execution permission problems in a checked out file, e.g. "<code class="literal">filename</code>", change its permission in the corresponding CVS repository by the following to fix it.</p>
<pre class="screen"># chmod ugo-x filename</pre>
</div>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title"><a id="_subversion"/>10.8. Subversion</h2>
</div>
</div>
</div>
<p>Subversion is an <span class="strong"><strong>older</strong></span> version control system before Git but after CVS. It lacks tagging and branching features found in CVS and Git.</p>
<p>You need to install <code class="literal">subversion</code>, <code class="literal">libapache2-mod-svn</code> and <code class="literal">subversion-tools</code> packages to set up a Subversion server.</p>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a id="_configuration_of_subversion_repository"/>10.8.1. Configuration of Subversion repository</h3>
</div>
</div>
</div>
<p>Currently, the <code class="literal">subversion</code> package does not set up a repository, so one must set it up manually. One possible location for a repository is in "<code class="literal">/srv/svn/project</code>".</p>
<p>Create a directory by the following.</p>
<pre class="screen"># mkdir -p /srv/svn/project</pre>
<p>Create the repository database by the following.</p>
<pre class="screen"># svnadmin create /srv/svn/project</pre>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a id="_access_to_subversion_via_apache2_server"/>10.8.2. Access to Subversion via Apache2 server</h3>
</div>
</div>
</div>
<p>If you only access Subversion repository via Apache2 server, you just need to make the repository only writable by the WWW server by the following.</p>
<pre class="screen"># chown -R www-data:www-data /srv/svn/project</pre>
<p>Add (or uncomment) the following in "<code class="literal">/etc/apache2/mods-available/dav_svn.conf</code>" to allow access to the repository via user authentication.</p>
<pre class="screen"><Location /project>
DAV svn
SVNPath /srv/svn/project
AuthType Basic
AuthName "Subversion repository"
AuthUserFile /etc/subversion/passwd
<LimitExcept GET PROPFIND OPTIONS REPORT>
Require valid-user
</LimitExcept>
</Location></pre>
<p>Create a user authentication file with the command by the following.</p>
<pre class="screen"># htpasswd2 -c /etc/subversion/passwd some-username</pre>
<p>Restart Apache2.</p>
<p>Your new Subversion repository is accessible at URL "<code class="literal">http://localhost/project</code>" and "<code class="literal">http://example.com/project</code>" from <span class="citerefentry"><span class="refentrytitle">svn</span>(1)</span> (assuming your URL of web server is "<code class="literal">http://example.com/</code>").</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a id="_local_access_to_subversion_by_group"/>10.8.3. Local access to Subversion by group</h3>
</div>
</div>
</div>
<p>The following sets up Subversion repository for the local access by a group, e.g. <code class="literal">project</code>.</p>
<pre class="screen"># chmod 2775 /srv/svn/project
# chown -R root:src /srv/svn/project
# chmod -R ug+rwX /srv/svn/project</pre>
<p>Your new Subversion repository is group accessible at URL "<code class="literal">file:///localhost/srv/svn/project</code>" or "<code class="literal">file:///srv/svn/project</code>" from <span class="citerefentry"><span class="refentrytitle">svn</span>(1)</span> for local users belonging to <code class="literal">project</code> group. You must run commands, such as <code class="literal">svn</code>, <code class="literal">svnserve</code>, <code class="literal">svnlook</code>, and <code class="literal">svnadmin</code> under "<code class="literal">umask 002</code>" to ensure group access.</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a id="_remote_access_to_subversion_via_ssh"/>10.8.4. Remote access to Subversion via SSH</h3>
</div>
</div>
</div>
<p>A group accessible Subversion repository is at URL "<code class="literal">example.com:/srv/svn/project</code>" for SSH, you can access it from <span class="citerefentry"><span class="refentrytitle">svn</span>(1)</span> at URL "<code class="literal">svn+ssh://example.com:/srv/svn/project</code>".</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a id="_subversion_directory_structure"/>10.8.5. Subversion directory structure</h3>
</div>
</div>
</div>
<p>Many projects uses directory tree similar to the following for Subversion to compensate its lack of branches and tags.</p>
<pre class="screen"> ----- module1
| |-- branches
| |-- tags
| | |-- release-1.0
| | `-- release-2.0
| |
| `-- trunk
| |-- file1
| |-- file2
| `-- file3
|
`-- module2</pre>
<div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Tip">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Tip]" src="images/tip.png"/>
</td>
<th align="left">Tip</th>
</tr>
<tr>
<td align="left" valign="top">
<p>You must use "<code class="literal">svn copy …</code>" command to mark branches and tags. This ensures Subversion to record modification history of files properly and saves storage spaces.</p>
</td>
</tr>
</table>
</div>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a id="_importing_a_new_source_to_subversion"/>10.8.6. Importing a new source to Subversion</h3>
</div>
</div>
</div>
<p>Create a new local source tree location at "<code class="literal">~/path/to/module1</code>" by the following.</p>
<pre class="screen">$ mkdir -p ~/path/to/module1; cd ~/path/to/module1</pre>
<p>Populate a new local source tree under "<code class="literal">~/path/to/module1</code>" with files.</p>
<p>Import it to Subversion with the following parameters.</p>
<div class="itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<p>
Module name: "<code class="literal">module1</code>"
</p>
</li>
<li class="listitem">
<p>
Subversion site URL: "<code class="literal">file:///srv/svn/project</code>"
</p>
</li>
<li class="listitem">
<p>
Subversion directory: "<code class="literal">module1/trunk</code>"
</p>
</li>
<li class="listitem">
<p>
Subversion tag: "<code class="literal">module1/tags/Release-initial</code>"
</p>
</li>
</ul>
</div>
<pre class="screen">$ cd ~/path/to/module1
$ svn import file:///srv/svn/project/module1/trunk -m "Start module1"
$ svn cp file:///srv/svn/project/module1/trunk file:///srv/svn/project/module1/tags/Release-initial</pre>
<p>Alternatively, by the following.</p>
<pre class="screen">$ svn import ~/path/to/module1 file:///srv/svn/project/module1/trunk -m "Start module1"
$ svn cp file:///srv/svn/project/module1/trunk file:///srv/svn/project/module1/tags/Release-initial</pre>
<div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Tip">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Tip]" src="images/tip.png"/>
</td>
<th align="left">Tip</th>
</tr>
<tr>
<td align="left" valign="top">
<p>You can replace URLs such as "<code class="literal">file:///…</code>" by any other URL formats such as "<code class="literal">http://…</code>" and "<code class="literal">svn+ssh://…</code>".</p>
</td>
</tr>
</table>
</div>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a id="_work_flow_of_subversion"/>10.8.7. Work flow of Subversion</h3>
</div>
</div>
</div>
<p>Here is an example of typical work flow using Subversion with its native client.</p>
<div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Tip">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Tip]" src="images/tip.png"/>
</td>
<th align="left">Tip</th>
</tr>
<tr>
<td align="left" valign="top">
<p>Client commands offered by the <code class="literal">git-svn</code> package may offer alternative work flow of Subversion using the <code class="literal">git</code> command. See <a class="xref" href="ch10.en.html#_git_for_the_subversion_repository" title="10.6.4. Git for the Subversion repository">Section 10.6.4, “Git for the Subversion repository”</a>.</p>
</td>
</tr>
</table>
</div>
<p>Check all available modules from Subversion project pointed by URL "<code class="literal">file:///srv/svn/project</code>" by the following.</p>
<pre class="screen">$ svn list file:///srv/svn/project
module1
module2
...</pre>
<p>Checkout "<code class="literal">module1/trunk</code>" to a directory "<code class="literal">module1</code>" by the following.</p>
<pre class="screen">$ cd ~/path/to
$ svn co file:///srv/svn/project/module1/trunk module1
$ cd module1</pre>
<p>Make changes to the content as needed.</p>
<p>Check changes by making "<code class="literal">diff -u [repository] [local]</code>" equivalent by the following.</p>
<pre class="screen">$ svn diff</pre>
<p>You find that you broke some file "<code class="literal">file_to_undo</code>" severely but other files are fine.</p>
<p>Overwrite "<code class="literal">file_to_undo</code>" file with the clean copy from Subversion by the following.</p>
<pre class="screen">$ svn revert file_to_undo</pre>
<p>Save the updated local source tree to Subversion by the following.</p>
<pre class="screen">$ svn ci -m "Describe change"</pre>
<p>Create and add "<code class="literal">file_to_add</code>" file to Subversion by the following.</p>
<pre class="screen">$ vi file_to_add
$ svn add file_to_add
$ svn ci -m "Added file_to_add"</pre>
<p>Merge the latest version from Subversion by the following.</p>
<pre class="screen">$ svn up</pre>
<p>Watch out for lines starting with "<code class="literal">C filename</code>" which indicates conflicting changes.</p>
<p>Look for unmodified code in, e.g., "<code class="literal">filename.r6</code>", "<code class="literal">filename.r9</code>", and "<code class="literal">filename.mine</code>".</p>
<p>Search for "<code class="literal"><<<<<<<</code>" and "<code class="literal">>>>>>>></code>" in files for conflicting changes.</p>
<p>Edit files to fix conflicts as needed.</p>
<p>Add a release tag "<code class="literal">Release-1</code>" by the following.</p>
<pre class="screen">$ svn ci -m "last commit for Release-1"
$ svn cp file:///srv/svn/project/module1/trunk file:///srv/svn/project/module1/tags/Release-1</pre>
<p>Edit further.</p>
<p>Remove the release tag "<code class="literal">Release-1</code>" by the following.</p>
<pre class="screen">$ svn rm file:///srv/svn/project/module1/tags/Release-1</pre>
<p>Check in changes to Subversion by the following.</p>
<pre class="screen">$ svn ci -m "real last commit for Release-1"</pre>
<p>Re-add the release tag "<code class="literal">Release-1</code>" from updated Subversion HEAD of trunk by the following.</p>
<pre class="screen">$ svn cp file:///srv/svn/project/module1/trunk file:///srv/svn/project/module1/tags/Release-1</pre>
<p>Create a branch with a path "<code class="literal">module1/branches/Release-initial-bugfixes</code>" from the original version pointed by the path "<code class="literal">module1/tags/Release-initial</code>" and check it out to "<code class="literal">~/path/to/old</code>" directory by the following.</p>
<pre class="screen">$ svn cp file:///srv/svn/project/module1/tags/Release-initial file:///srv/svn/project/module1/branches/Release-initial-bugfixes
$ cd ~/path/to
$ svn co file:///srv/svn/project/module1/branches/Release-initial-bugfixes old
$ cd old</pre>
<div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Tip">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Tip]" src="images/tip.png"/>
</td>
<th align="left">Tip</th>
</tr>
<tr>
<td align="left" valign="top">
<p>Use "<code class="literal">module1/trunk@{2005-12-20}</code>" (<a class="ulink" href="http://en.wikipedia.org/wiki/ISO_8601">ISO 8601</a> date format) instead of "<code class="literal">module1/tags/Release-initial</code>" to specify particular date as the branch point.</p>
</td>
</tr>
</table>
</div>
<p>Work on this local source tree pointing to branch "<code class="literal">Release-initial-bugfixes</code>" which is based on the original version.</p>
<p>Work on this branch by yourself … until someone else joins to this "<code class="literal">Release-initial-bugfixes</code>" branch.</p>
<p>Sync with files modified by others on this branch by the following.</p>
<pre class="screen">$ svn up</pre>
<p>Edit files to fix conflicts as needed.</p>
<p>Check in changes to Subversion by the following.</p>
<pre class="screen">$ svn ci -m "checked into this branch"</pre>
<p>Update the local tree with HEAD of trunk by the following.</p>
<pre class="screen">$ svn switch file:///srv/svn/project/module1/trunk</pre>
<p>Update the local tree (content = HEAD of trunk) by merging from the "<code class="literal">Release-initial-bugfixes</code>" branch by the following.</p>
<pre class="screen">$ svn merge file:///srv/svn/project/module1/branches/Release-initial-bugfixes</pre>
<p>Fix conflicts with editor.</p>
<p>Check in changes to Subversion by the following.</p>
<pre class="screen">$ svn ci -m "merged Release-initial-bugfixes"</pre>
<p>Make archive by the following.</p>
<pre class="screen">$ cd ..
$ mv old old-module1-bugfixes
$ tar -cvzf old-module1-bugfixes.tar.gz old-module1-bugfixes
$ rm -rf old-module1-bugfixes</pre>
<div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Tip">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Tip]" src="images/tip.png"/>
</td>
<th align="left">Tip</th>
</tr>
<tr>
<td align="left" valign="top">
<p>You can replace URLs such as "<code class="literal">file:///…</code>" by any other URL formats such as "<code class="literal">http://…</code>" and "<code class="literal">svn+ssh://…</code>".</p>
</td>
</tr>
</table>
</div>
<div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Tip">
<tr>
<td rowspan="2" align="center" valign="top">
<img alt="[Tip]" src="images/tip.png"/>
</td>
<th align="left">Tip</th>
</tr>
<tr>
<td align="left" valign="top">
<p>You can checkout only a sub directory of "<code class="literal">module1</code>" by providing its name as "<code class="literal">svn co file:///srv/svn/project/module1/trunk/subdir module1/subdir</code>", etc.</p>
</td>
</tr>
</table>
</div>
<div class="table">
<a id="notableoptionsfotargumentstosvnb"/>
<p class="title">
<strong>Table 10.15. Notable options for Subversion commands (use as first argument(s) to <span class="citerefentry"><span class="refentrytitle">svn</span>(1)</span>)</strong>
</p>
<div class="table-contents">
<table class="table" summary="Notable options for Subversion commands (use as first argument(s) to svn1)" border="1">
<colgroup>
<col style="text-align: left"/>
<col style="text-align: left"/>
</colgroup>
<thead>
<tr>
<th style="text-align: left">
option
</th>
<th style="text-align: left">
meaning
</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left">
<code class="literal">--dry-run</code>
</td>
<td style="text-align: left">
dry run, no effect
</td>
</tr>
<tr>
<td style="text-align: left">
<code class="literal">-v</code>
</td>
<td style="text-align: left">
display detail messages of svn activity
</td>
</tr>
</tbody>
</table>
</div>
</div>
<br class="table-break"/>
</div>
</div>
</div>
<div class="navfooter">
<hr/>
<table width="100%" summary="Navigation footer">
<tr>
<td align="left"><a accesskey="p" href="ch09.en.html"><img src="images/prev.png" alt="Prev"/></a> </td>
<td align="center"> </td>
<td align="right"> <a accesskey="n" href="ch11.en.html"><img src="images/next.png" alt="Next"/></a></td>
</tr>
<tr>
<td align="left" valign="top">Chapter 9. System tips </td>
<td align="center">
<a accesskey="h" href="index.en.html">
<img src="images/home.png" alt="Home"/>
</a>
</td>
<td align="right" valign="top"> Chapter 11. Data conversion</td>
</tr>
</table>
</div>
</body>
</html>
|