/usr/share/doc/cedar-backup2-doc/interface/CedarBackup2.peer-pysrc.html is in cedar-backup2-doc 2.27.0-2.
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 | <?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>CedarBackup2.peer</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th> <a
href="CedarBackup2-module.html">Home</a> </th>
<!-- Tree link -->
<th> <a
href="module-tree.html">Trees</a> </th>
<!-- Index link -->
<th> <a
href="identifier-index.html">Indices</a> </th>
<!-- Help link -->
<th> <a
href="help.html">Help</a> </th>
<!-- Project homepage -->
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
><a class="navbar" target="_top" href="https://bitbucket.org/cedarsolutions/cedar-backup2">CedarBackup2</a></th>
</tr></table></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="CedarBackup2-module.html">Package CedarBackup2</a> ::
Module peer
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>] | <a href="CedarBackup2.peer-pysrc.html"
target="_top">no frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<h1 class="epydoc">Source Code for <a href="CedarBackup2.peer-module.html">Module CedarBackup2.peer</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno"> 1</tt> <tt class="py-line"><tt class="py-comment"># -*- coding: iso-8859-1 -*-</tt> </tt>
<a name="L2"></a><tt class="py-lineno"> 2</tt> <tt class="py-line"><tt class="py-comment"># vim: set ft=python ts=3 sw=3 expandtab:</tt> </tt>
<a name="L3"></a><tt class="py-lineno"> 3</tt> <tt class="py-line"><tt class="py-comment"># # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #</tt> </tt>
<a name="L4"></a><tt class="py-lineno"> 4</tt> <tt class="py-line"><tt class="py-comment">#</tt> </tt>
<a name="L5"></a><tt class="py-lineno"> 5</tt> <tt class="py-line"><tt class="py-comment"># C E D A R</tt> </tt>
<a name="L6"></a><tt class="py-lineno"> 6</tt> <tt class="py-line"><tt class="py-comment"># S O L U T I O N S "Software done right."</tt> </tt>
<a name="L7"></a><tt class="py-lineno"> 7</tt> <tt class="py-line"><tt class="py-comment"># S O F T W A R E</tt> </tt>
<a name="L8"></a><tt class="py-lineno"> 8</tt> <tt class="py-line"><tt class="py-comment">#</tt> </tt>
<a name="L9"></a><tt class="py-lineno"> 9</tt> <tt class="py-line"><tt class="py-comment"># # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #</tt> </tt>
<a name="L10"></a><tt class="py-lineno"> 10</tt> <tt class="py-line"><tt class="py-comment">#</tt> </tt>
<a name="L11"></a><tt class="py-lineno"> 11</tt> <tt class="py-line"><tt class="py-comment"># Copyright (c) 2004-2008,2010 Kenneth J. Pronovici.</tt> </tt>
<a name="L12"></a><tt class="py-lineno"> 12</tt> <tt class="py-line"><tt class="py-comment"># All rights reserved.</tt> </tt>
<a name="L13"></a><tt class="py-lineno"> 13</tt> <tt class="py-line"><tt class="py-comment">#</tt> </tt>
<a name="L14"></a><tt class="py-lineno"> 14</tt> <tt class="py-line"><tt class="py-comment"># This program is free software; you can redistribute it and/or</tt> </tt>
<a name="L15"></a><tt class="py-lineno"> 15</tt> <tt class="py-line"><tt class="py-comment"># modify it under the terms of the GNU General Public License,</tt> </tt>
<a name="L16"></a><tt class="py-lineno"> 16</tt> <tt class="py-line"><tt class="py-comment"># Version 2, as published by the Free Software Foundation.</tt> </tt>
<a name="L17"></a><tt class="py-lineno"> 17</tt> <tt class="py-line"><tt class="py-comment">#</tt> </tt>
<a name="L18"></a><tt class="py-lineno"> 18</tt> <tt class="py-line"><tt class="py-comment"># This program is distributed in the hope that it will be useful,</tt> </tt>
<a name="L19"></a><tt class="py-lineno"> 19</tt> <tt class="py-line"><tt class="py-comment"># but WITHOUT ANY WARRANTY; without even the implied warranty of</tt> </tt>
<a name="L20"></a><tt class="py-lineno"> 20</tt> <tt class="py-line"><tt class="py-comment"># MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</tt> </tt>
<a name="L21"></a><tt class="py-lineno"> 21</tt> <tt class="py-line"><tt class="py-comment">#</tt> </tt>
<a name="L22"></a><tt class="py-lineno"> 22</tt> <tt class="py-line"><tt class="py-comment"># Copies of the GNU General Public License are available from</tt> </tt>
<a name="L23"></a><tt class="py-lineno"> 23</tt> <tt class="py-line"><tt class="py-comment"># the Free Software Foundation website, http://www.gnu.org/.</tt> </tt>
<a name="L24"></a><tt class="py-lineno"> 24</tt> <tt class="py-line"><tt class="py-comment">#</tt> </tt>
<a name="L25"></a><tt class="py-lineno"> 25</tt> <tt class="py-line"><tt class="py-comment"># # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #</tt> </tt>
<a name="L26"></a><tt class="py-lineno"> 26</tt> <tt class="py-line"><tt class="py-comment">#</tt> </tt>
<a name="L27"></a><tt class="py-lineno"> 27</tt> <tt class="py-line"><tt class="py-comment"># Author : Kenneth J. Pronovici <pronovic@ieee.org></tt> </tt>
<a name="L28"></a><tt class="py-lineno"> 28</tt> <tt class="py-line"><tt class="py-comment"># Language : Python 2 (>= 2.7)</tt> </tt>
<a name="L29"></a><tt class="py-lineno"> 29</tt> <tt class="py-line"><tt class="py-comment"># Project : Cedar Backup, release 2</tt> </tt>
<a name="L30"></a><tt class="py-lineno"> 30</tt> <tt class="py-line"><tt class="py-comment"># Purpose : Provides backup peer-related objects.</tt> </tt>
<a name="L31"></a><tt class="py-lineno"> 31</tt> <tt class="py-line"><tt class="py-comment">#</tt> </tt>
<a name="L32"></a><tt class="py-lineno"> 32</tt> <tt class="py-line"><tt class="py-comment"># # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #</tt> </tt>
<a name="L33"></a><tt class="py-lineno"> 33</tt> <tt class="py-line"> </tt>
<a name="L34"></a><tt class="py-lineno"> 34</tt> <tt class="py-line"><tt class="py-comment">########################################################################</tt> </tt>
<a name="L35"></a><tt class="py-lineno"> 35</tt> <tt class="py-line"><tt class="py-comment"># Module documentation</tt> </tt>
<a name="L36"></a><tt class="py-lineno"> 36</tt> <tt class="py-line"><tt class="py-comment">########################################################################</tt> </tt>
<a name="L37"></a><tt class="py-lineno"> 37</tt> <tt class="py-line"> </tt>
<a name="L38"></a><tt class="py-lineno"> 38</tt> <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L39"></a><tt class="py-lineno"> 39</tt> <tt class="py-line"><tt class="py-docstring">Provides backup peer-related objects and utility functions.</tt> </tt>
<a name="L40"></a><tt class="py-lineno"> 40</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L41"></a><tt class="py-lineno"> 41</tt> <tt class="py-line"><tt class="py-docstring">@sort: LocalPeer, RemotePeer</tt> </tt>
<a name="L42"></a><tt class="py-lineno"> 42</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L43"></a><tt class="py-lineno"> 43</tt> <tt class="py-line"><tt class="py-docstring">@var DEF_COLLECT_INDICATOR: Name of the default collect indicator file.</tt> </tt>
<a name="L44"></a><tt class="py-lineno"> 44</tt> <tt class="py-line"><tt class="py-docstring">@var DEF_STAGE_INDICATOR: Name of the default stage indicator file.</tt> </tt>
<a name="L45"></a><tt class="py-lineno"> 45</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L46"></a><tt class="py-lineno"> 46</tt> <tt class="py-line"><tt class="py-docstring">@author: Kenneth J. Pronovici <pronovic@ieee.org></tt> </tt>
<a name="L47"></a><tt class="py-lineno"> 47</tt> <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L48"></a><tt class="py-lineno"> 48</tt> <tt class="py-line"> </tt>
<a name="L49"></a><tt class="py-lineno"> 49</tt> <tt class="py-line"> </tt>
<a name="L50"></a><tt class="py-lineno"> 50</tt> <tt class="py-line"><tt class="py-comment">########################################################################</tt> </tt>
<a name="L51"></a><tt class="py-lineno"> 51</tt> <tt class="py-line"><tt class="py-comment"># Imported modules</tt> </tt>
<a name="L52"></a><tt class="py-lineno"> 52</tt> <tt class="py-line"><tt class="py-comment">########################################################################</tt> </tt>
<a name="L53"></a><tt class="py-lineno"> 53</tt> <tt class="py-line"> </tt>
<a name="L54"></a><tt class="py-lineno"> 54</tt> <tt class="py-line"><tt class="py-comment"># System modules</tt> </tt>
<a name="L55"></a><tt class="py-lineno"> 55</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">os</tt> </tt>
<a name="L56"></a><tt class="py-lineno"> 56</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">logging</tt> </tt>
<a name="L57"></a><tt class="py-lineno"> 57</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">shutil</tt> </tt>
<a name="L58"></a><tt class="py-lineno"> 58</tt> <tt class="py-line"> </tt>
<a name="L59"></a><tt class="py-lineno"> 59</tt> <tt class="py-line"><tt class="py-comment"># Cedar Backup modules</tt> </tt>
<a name="L60"></a><tt class="py-lineno"> 60</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-0" class="py-name" targets="Package CedarBackup2=CedarBackup2-module.html"><a title="CedarBackup2" class="py-name" href="#" onclick="return doclink('link-0', 'CedarBackup2', 'link-0');">CedarBackup2</a></tt><tt class="py-op">.</tt><tt id="link-1" class="py-name" targets="Module CedarBackup2.filesystem=CedarBackup2.filesystem-module.html"><a title="CedarBackup2.filesystem" class="py-name" href="#" onclick="return doclink('link-1', 'filesystem', 'link-1');">filesystem</a></tt> <tt class="py-keyword">import</tt> <tt id="link-2" class="py-name" targets="Class CedarBackup2.filesystem.FilesystemList=CedarBackup2.filesystem.FilesystemList-class.html"><a title="CedarBackup2.filesystem.FilesystemList" class="py-name" href="#" onclick="return doclink('link-2', 'FilesystemList', 'link-2');">FilesystemList</a></tt> </tt>
<a name="L61"></a><tt class="py-lineno"> 61</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-3" class="py-name"><a title="CedarBackup2" class="py-name" href="#" onclick="return doclink('link-3', 'CedarBackup2', 'link-0');">CedarBackup2</a></tt><tt class="py-op">.</tt><tt id="link-4" class="py-name" targets="Module CedarBackup2.actions.util=CedarBackup2.actions.util-module.html,Module CedarBackup2.util=CedarBackup2.util-module.html,Module CedarBackup2.writers.util=CedarBackup2.writers.util-module.html"><a title="CedarBackup2.actions.util
CedarBackup2.util
CedarBackup2.writers.util" class="py-name" href="#" onclick="return doclink('link-4', 'util', 'link-4');">util</a></tt> <tt class="py-keyword">import</tt> <tt id="link-5" class="py-name" targets="Function CedarBackup2.util.resolveCommand()=CedarBackup2.util-module.html#resolveCommand"><a title="CedarBackup2.util.resolveCommand" class="py-name" href="#" onclick="return doclink('link-5', 'resolveCommand', 'link-5');">resolveCommand</a></tt><tt class="py-op">,</tt> <tt id="link-6" class="py-name" targets="Function CedarBackup2.util.executeCommand()=CedarBackup2.util-module.html#executeCommand"><a title="CedarBackup2.util.executeCommand" class="py-name" href="#" onclick="return doclink('link-6', 'executeCommand', 'link-6');">executeCommand</a></tt><tt class="py-op">,</tt> <tt id="link-7" class="py-name" targets="Function CedarBackup2.util.isRunningAsRoot()=CedarBackup2.util-module.html#isRunningAsRoot"><a title="CedarBackup2.util.isRunningAsRoot" class="py-name" href="#" onclick="return doclink('link-7', 'isRunningAsRoot', 'link-7');">isRunningAsRoot</a></tt> </tt>
<a name="L62"></a><tt class="py-lineno"> 62</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-8" class="py-name"><a title="CedarBackup2" class="py-name" href="#" onclick="return doclink('link-8', 'CedarBackup2', 'link-0');">CedarBackup2</a></tt><tt class="py-op">.</tt><tt id="link-9" class="py-name"><a title="CedarBackup2.actions.util
CedarBackup2.util
CedarBackup2.writers.util" class="py-name" href="#" onclick="return doclink('link-9', 'util', 'link-4');">util</a></tt> <tt class="py-keyword">import</tt> <tt id="link-10" class="py-name" targets="Function CedarBackup2.util.splitCommandLine()=CedarBackup2.util-module.html#splitCommandLine"><a title="CedarBackup2.util.splitCommandLine" class="py-name" href="#" onclick="return doclink('link-10', 'splitCommandLine', 'link-10');">splitCommandLine</a></tt><tt class="py-op">,</tt> <tt id="link-11" class="py-name" targets="Function CedarBackup2.util.encodePath()=CedarBackup2.util-module.html#encodePath"><a title="CedarBackup2.util.encodePath" class="py-name" href="#" onclick="return doclink('link-11', 'encodePath', 'link-11');">encodePath</a></tt> </tt>
<a name="L63"></a><tt class="py-lineno"> 63</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-12" class="py-name"><a title="CedarBackup2" class="py-name" href="#" onclick="return doclink('link-12', 'CedarBackup2', 'link-0');">CedarBackup2</a></tt><tt class="py-op">.</tt><tt id="link-13" class="py-name" targets="Variable CedarBackup2.cli.Options.config=CedarBackup2.cli.Options-class.html#config,Module CedarBackup2.config=CedarBackup2.config-module.html"><a title="CedarBackup2.cli.Options.config
CedarBackup2.config" class="py-name" href="#" onclick="return doclink('link-13', 'config', 'link-13');">config</a></tt> <tt class="py-keyword">import</tt> <tt id="link-14" class="py-name" targets="Variable CedarBackup2.config.VALID_FAILURE_MODES=CedarBackup2.config-module.html#VALID_FAILURE_MODES"><a title="CedarBackup2.config.VALID_FAILURE_MODES" class="py-name" href="#" onclick="return doclink('link-14', 'VALID_FAILURE_MODES', 'link-14');">VALID_FAILURE_MODES</a></tt> </tt>
<a name="L64"></a><tt class="py-lineno"> 64</tt> <tt class="py-line"> </tt>
<a name="L65"></a><tt class="py-lineno"> 65</tt> <tt class="py-line"> </tt>
<a name="L66"></a><tt class="py-lineno"> 66</tt> <tt class="py-line"><tt class="py-comment">########################################################################</tt> </tt>
<a name="L67"></a><tt class="py-lineno"> 67</tt> <tt class="py-line"><tt class="py-comment"># Module-wide constants and variables</tt> </tt>
<a name="L68"></a><tt class="py-lineno"> 68</tt> <tt class="py-line"><tt class="py-comment">########################################################################</tt> </tt>
<a name="L69"></a><tt class="py-lineno"> 69</tt> <tt class="py-line"> </tt>
<a name="L70"></a><tt class="py-lineno"> 70</tt> <tt class="py-line"><tt id="link-15" class="py-name" targets="Variable CedarBackup2.actions.collect.logger=CedarBackup2.actions.collect-module.html#logger,Variable CedarBackup2.actions.initialize.logger=CedarBackup2.actions.initialize-module.html#logger,Variable CedarBackup2.actions.purge.logger=CedarBackup2.actions.purge-module.html#logger,Variable CedarBackup2.actions.rebuild.logger=CedarBackup2.actions.rebuild-module.html#logger,Variable CedarBackup2.actions.stage.logger=CedarBackup2.actions.stage-module.html#logger,Variable CedarBackup2.actions.store.logger=CedarBackup2.actions.store-module.html#logger,Variable CedarBackup2.actions.util.logger=CedarBackup2.actions.util-module.html#logger,Variable CedarBackup2.actions.validate.logger=CedarBackup2.actions.validate-module.html#logger,Variable CedarBackup2.cli.logger=CedarBackup2.cli-module.html#logger,Variable CedarBackup2.config.logger=CedarBackup2.config-module.html#logger,Variable CedarBackup2.customize.logger=CedarBackup2.customize-module.html#logger,Variable CedarBackup2.extend.amazons3.logger=CedarBackup2.extend.amazons3-module.html#logger,Variable CedarBackup2.extend.capacity.logger=CedarBackup2.extend.capacity-module.html#logger,Variable CedarBackup2.extend.encrypt.logger=CedarBackup2.extend.encrypt-module.html#logger,Variable CedarBackup2.extend.mbox.logger=CedarBackup2.extend.mbox-module.html#logger,Variable CedarBackup2.extend.mysql.logger=CedarBackup2.extend.mysql-module.html#logger,Variable CedarBackup2.extend.postgresql.logger=CedarBackup2.extend.postgresql-module.html#logger,Variable CedarBackup2.extend.split.logger=CedarBackup2.extend.split-module.html#logger,Variable CedarBackup2.extend.subversion.logger=CedarBackup2.extend.subversion-module.html#logger,Variable CedarBackup2.extend.sysinfo.logger=CedarBackup2.extend.sysinfo-module.html#logger,Variable CedarBackup2.filesystem.logger=CedarBackup2.filesystem-module.html#logger,Variable CedarBackup2.peer.logger=CedarBackup2.peer-module.html#logger,Variable CedarBackup2.tools.amazons3.logger=CedarBackup2.tools.amazons3-module.html#logger,Variable CedarBackup2.tools.span.logger=CedarBackup2.tools.span-module.html#logger,Variable CedarBackup2.util.logger=CedarBackup2.util-module.html#logger,Variable CedarBackup2.writers.cdwriter.logger=CedarBackup2.writers.cdwriter-module.html#logger,Variable CedarBackup2.writers.dvdwriter.logger=CedarBackup2.writers.dvdwriter-module.html#logger,Variable CedarBackup2.writers.util.logger=CedarBackup2.writers.util-module.html#logger,Variable CedarBackup2.xmlutil.logger=CedarBackup2.xmlutil-module.html#logger"><a title="CedarBackup2.actions.collect.logger
CedarBackup2.actions.initialize.logger
CedarBackup2.actions.purge.logger
CedarBackup2.actions.rebuild.logger
CedarBackup2.actions.stage.logger
CedarBackup2.actions.store.logger
CedarBackup2.actions.util.logger
CedarBackup2.actions.validate.logger
CedarBackup2.cli.logger
CedarBackup2.config.logger
CedarBackup2.customize.logger
CedarBackup2.extend.amazons3.logger
CedarBackup2.extend.capacity.logger
CedarBackup2.extend.encrypt.logger
CedarBackup2.extend.mbox.logger
CedarBackup2.extend.mysql.logger
CedarBackup2.extend.postgresql.logger
CedarBackup2.extend.split.logger
CedarBackup2.extend.subversion.logger
CedarBackup2.extend.sysinfo.logger
CedarBackup2.filesystem.logger
CedarBackup2.peer.logger
CedarBackup2.tools.amazons3.logger
CedarBackup2.tools.span.logger
CedarBackup2.util.logger
CedarBackup2.writers.cdwriter.logger
CedarBackup2.writers.dvdwriter.logger
CedarBackup2.writers.util.logger
CedarBackup2.xmlutil.logger" class="py-name" href="#" onclick="return doclink('link-15', 'logger', 'link-15');">logger</a></tt> <tt class="py-op">=</tt> <tt class="py-name">logging</tt><tt class="py-op">.</tt><tt class="py-name">getLogger</tt><tt class="py-op">(</tt><tt class="py-string">"CedarBackup2.log.peer"</tt><tt class="py-op">)</tt> </tt>
<a name="L71"></a><tt class="py-lineno"> 71</tt> <tt class="py-line"> </tt>
<a name="L72"></a><tt class="py-lineno"> 72</tt> <tt class="py-line"><tt id="link-16" class="py-name" targets="Variable CedarBackup2.peer.DEF_RCP_COMMAND=CedarBackup2.peer-module.html#DEF_RCP_COMMAND"><a title="CedarBackup2.peer.DEF_RCP_COMMAND" class="py-name" href="#" onclick="return doclink('link-16', 'DEF_RCP_COMMAND', 'link-16');">DEF_RCP_COMMAND</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt> <tt class="py-string">"/usr/bin/scp"</tt><tt class="py-op">,</tt> <tt class="py-string">"-B"</tt><tt class="py-op">,</tt> <tt class="py-string">"-q"</tt><tt class="py-op">,</tt> <tt class="py-string">"-C"</tt> <tt class="py-op">]</tt> </tt>
<a name="L73"></a><tt class="py-lineno"> 73</tt> <tt class="py-line"><tt id="link-17" class="py-name" targets="Variable CedarBackup2.peer.DEF_RSH_COMMAND=CedarBackup2.peer-module.html#DEF_RSH_COMMAND"><a title="CedarBackup2.peer.DEF_RSH_COMMAND" class="py-name" href="#" onclick="return doclink('link-17', 'DEF_RSH_COMMAND', 'link-17');">DEF_RSH_COMMAND</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt> <tt class="py-string">"/usr/bin/ssh"</tt><tt class="py-op">,</tt> <tt class="py-op">]</tt> </tt>
<a name="L74"></a><tt class="py-lineno"> 74</tt> <tt class="py-line"><tt id="link-18" class="py-name" targets="Variable CedarBackup2.peer.DEF_CBACK_COMMAND=CedarBackup2.peer-module.html#DEF_CBACK_COMMAND"><a title="CedarBackup2.peer.DEF_CBACK_COMMAND" class="py-name" href="#" onclick="return doclink('link-18', 'DEF_CBACK_COMMAND', 'link-18');">DEF_CBACK_COMMAND</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"/usr/bin/cback"</tt> </tt>
<a name="L75"></a><tt class="py-lineno"> 75</tt> <tt class="py-line"> </tt>
<a name="L76"></a><tt class="py-lineno"> 76</tt> <tt class="py-line"><tt id="link-19" class="py-name" targets="Variable CedarBackup2.peer.DEF_COLLECT_INDICATOR=CedarBackup2.peer-module.html#DEF_COLLECT_INDICATOR"><a title="CedarBackup2.peer.DEF_COLLECT_INDICATOR" class="py-name" href="#" onclick="return doclink('link-19', 'DEF_COLLECT_INDICATOR', 'link-19');">DEF_COLLECT_INDICATOR</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"cback.collect"</tt> </tt>
<a name="L77"></a><tt class="py-lineno"> 77</tt> <tt class="py-line"><tt id="link-20" class="py-name" targets="Variable CedarBackup2.peer.DEF_STAGE_INDICATOR=CedarBackup2.peer-module.html#DEF_STAGE_INDICATOR"><a title="CedarBackup2.peer.DEF_STAGE_INDICATOR" class="py-name" href="#" onclick="return doclink('link-20', 'DEF_STAGE_INDICATOR', 'link-20');">DEF_STAGE_INDICATOR</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"cback.stage"</tt> </tt>
<a name="L78"></a><tt class="py-lineno"> 78</tt> <tt class="py-line"> </tt>
<a name="L79"></a><tt class="py-lineno"> 79</tt> <tt class="py-line"><tt id="link-21" class="py-name" targets="Variable CedarBackup2.extend.amazons3.SU_COMMAND=CedarBackup2.extend.amazons3-module.html#SU_COMMAND,Variable CedarBackup2.peer.SU_COMMAND=CedarBackup2.peer-module.html#SU_COMMAND"><a title="CedarBackup2.extend.amazons3.SU_COMMAND
CedarBackup2.peer.SU_COMMAND" class="py-name" href="#" onclick="return doclink('link-21', 'SU_COMMAND', 'link-21');">SU_COMMAND</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt> <tt class="py-string">"su"</tt> <tt class="py-op">]</tt> </tt>
<a name="LocalPeer"></a><div id="LocalPeer-def"><a name="L80"></a><tt class="py-lineno"> 80</tt> <tt class="py-line"> </tt>
<a name="L81"></a><tt class="py-lineno"> 81</tt> <tt class="py-line"> </tt>
<a name="L82"></a><tt class="py-lineno"> 82</tt> <tt class="py-line"><tt class="py-comment">########################################################################</tt> </tt>
<a name="L83"></a><tt class="py-lineno"> 83</tt> <tt class="py-line"><tt class="py-comment"># LocalPeer class definition</tt> </tt>
<a name="L84"></a><tt class="py-lineno"> 84</tt> <tt class="py-line"><tt class="py-comment">########################################################################</tt> </tt>
<a name="L85"></a><tt class="py-lineno"> 85</tt> <tt class="py-line"> </tt>
<a name="L86"></a><tt class="py-lineno"> 86</tt> <a class="py-toggle" href="#" id="LocalPeer-toggle" onclick="return toggle('LocalPeer');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="CedarBackup2.peer.LocalPeer-class.html">LocalPeer</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="LocalPeer-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="LocalPeer-expanded"><a name="L87"></a><tt class="py-lineno"> 87</tt> <tt class="py-line"> </tt>
<a name="L88"></a><tt class="py-lineno"> 88</tt> <tt class="py-line"> <tt class="py-comment">######################</tt> </tt>
<a name="L89"></a><tt class="py-lineno"> 89</tt> <tt class="py-line"> <tt class="py-comment"># Class documentation</tt> </tt>
<a name="L90"></a><tt class="py-lineno"> 90</tt> <tt class="py-line"> <tt class="py-comment">######################</tt> </tt>
<a name="L91"></a><tt class="py-lineno"> 91</tt> <tt class="py-line"> </tt>
<a name="L92"></a><tt class="py-lineno"> 92</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
<a name="L93"></a><tt class="py-lineno"> 93</tt> <tt class="py-line"><tt class="py-docstring"> Backup peer representing a local peer in a backup pool.</tt> </tt>
<a name="L94"></a><tt class="py-lineno"> 94</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L95"></a><tt class="py-lineno"> 95</tt> <tt class="py-line"><tt class="py-docstring"> This is a class representing a local (non-network) peer in a backup pool.</tt> </tt>
<a name="L96"></a><tt class="py-lineno"> 96</tt> <tt class="py-line"><tt class="py-docstring"> Local peers are backed up by simple filesystem copy operations. A local</tt> </tt>
<a name="L97"></a><tt class="py-lineno"> 97</tt> <tt class="py-line"><tt class="py-docstring"> peer has associated with it a name (typically, but not necessarily, a</tt> </tt>
<a name="L98"></a><tt class="py-lineno"> 98</tt> <tt class="py-line"><tt class="py-docstring"> hostname) and a collect directory.</tt> </tt>
<a name="L99"></a><tt class="py-lineno"> 99</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L100"></a><tt class="py-lineno"> 100</tt> <tt class="py-line"><tt class="py-docstring"> The public methods other than the constructor are part of a "backup peer"</tt> </tt>
<a name="L101"></a><tt class="py-lineno"> 101</tt> <tt class="py-line"><tt class="py-docstring"> interface shared with the C{RemotePeer} class.</tt> </tt>
<a name="L102"></a><tt class="py-lineno"> 102</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L103"></a><tt class="py-lineno"> 103</tt> <tt class="py-line"><tt class="py-docstring"> @sort: __init__, stagePeer, checkCollectIndicator, writeStageIndicator,</tt> </tt>
<a name="L104"></a><tt class="py-lineno"> 104</tt> <tt class="py-line"><tt class="py-docstring"> _copyLocalDir, _copyLocalFile, name, collectDir</tt> </tt>
<a name="L105"></a><tt class="py-lineno"> 105</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="L106"></a><tt class="py-lineno"> 106</tt> <tt class="py-line"> </tt>
<a name="L107"></a><tt class="py-lineno"> 107</tt> <tt class="py-line"> <tt class="py-comment">##############</tt> </tt>
<a name="L108"></a><tt class="py-lineno"> 108</tt> <tt class="py-line"> <tt class="py-comment"># Constructor</tt> </tt>
<a name="L109"></a><tt class="py-lineno"> 109</tt> <tt class="py-line"> <tt class="py-comment">##############</tt> </tt>
<a name="L110"></a><tt class="py-lineno"> 110</tt> <tt class="py-line"> </tt>
<a name="LocalPeer.__init__"></a><div id="LocalPeer.__init__-def"><a name="L111"></a><tt class="py-lineno"> 111</tt> <a class="py-toggle" href="#" id="LocalPeer.__init__-toggle" onclick="return toggle('LocalPeer.__init__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="CedarBackup2.peer.LocalPeer-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">,</tt> <tt class="py-param">collectDir</tt><tt class="py-op">,</tt> <tt class="py-param">ignoreFailureMode</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="LocalPeer.__init__-collapsed" style="display:none;" pad="++++" indent="+++++++"></div><div id="LocalPeer.__init__-expanded"><a name="L112"></a><tt class="py-lineno"> 112</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
<a name="L113"></a><tt class="py-lineno"> 113</tt> <tt class="py-line"><tt class="py-docstring"> Initializes a local backup peer.</tt> </tt>
<a name="L114"></a><tt class="py-lineno"> 114</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L115"></a><tt class="py-lineno"> 115</tt> <tt class="py-line"><tt class="py-docstring"> Note that the collect directory must be an absolute path, but does not</tt> </tt>
<a name="L116"></a><tt class="py-lineno"> 116</tt> <tt class="py-line"><tt class="py-docstring"> have to exist when the object is instantiated. We do a lazy validation</tt> </tt>
<a name="L117"></a><tt class="py-lineno"> 117</tt> <tt class="py-line"><tt class="py-docstring"> on this value since we could (potentially) be creating peer objects</tt> </tt>
<a name="L118"></a><tt class="py-lineno"> 118</tt> <tt class="py-line"><tt class="py-docstring"> before an ongoing backup completed.</tt> </tt>
<a name="L119"></a><tt class="py-lineno"> 119</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L120"></a><tt class="py-lineno"> 120</tt> <tt class="py-line"><tt class="py-docstring"> @param name: Name of the backup peer</tt> </tt>
<a name="L121"></a><tt class="py-lineno"> 121</tt> <tt class="py-line"><tt class="py-docstring"> @type name: String, typically a hostname</tt> </tt>
<a name="L122"></a><tt class="py-lineno"> 122</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L123"></a><tt class="py-lineno"> 123</tt> <tt class="py-line"><tt class="py-docstring"> @param collectDir: Path to the peer's collect directory</tt> </tt>
<a name="L124"></a><tt class="py-lineno"> 124</tt> <tt class="py-line"><tt class="py-docstring"> @type collectDir: String representing an absolute local path on disk</tt> </tt>
<a name="L125"></a><tt class="py-lineno"> 125</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L126"></a><tt class="py-lineno"> 126</tt> <tt class="py-line"><tt class="py-docstring"> @param ignoreFailureMode: Ignore failure mode for this peer</tt> </tt>
<a name="L127"></a><tt class="py-lineno"> 127</tt> <tt class="py-line"><tt class="py-docstring"> @type ignoreFailureMode: One of VALID_FAILURE_MODES</tt> </tt>
<a name="L128"></a><tt class="py-lineno"> 128</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L129"></a><tt class="py-lineno"> 129</tt> <tt class="py-line"><tt class="py-docstring"> @raise ValueError: If the name is empty.</tt> </tt>
<a name="L130"></a><tt class="py-lineno"> 130</tt> <tt class="py-line"><tt class="py-docstring"> @raise ValueError: If collect directory is not an absolute path.</tt> </tt>
<a name="L131"></a><tt class="py-lineno"> 131</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="L132"></a><tt class="py-lineno"> 132</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_name</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L133"></a><tt class="py-lineno"> 133</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_collectDir</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L134"></a><tt class="py-lineno"> 134</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_ignoreFailureMode</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L135"></a><tt class="py-lineno"> 135</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-22" class="py-name" targets="Variable CedarBackup2.config.ExtendedAction.name=CedarBackup2.config.ExtendedAction-class.html#name,Variable CedarBackup2.config.LocalPeer.name=CedarBackup2.config.LocalPeer-class.html#name,Variable CedarBackup2.config.RemotePeer.name=CedarBackup2.config.RemotePeer-class.html#name,Variable CedarBackup2.peer.LocalPeer.name=CedarBackup2.peer.LocalPeer-class.html#name,Variable CedarBackup2.peer.RemotePeer.name=CedarBackup2.peer.RemotePeer-class.html#name,Variable CedarBackup2.util.DirectedGraph.name=CedarBackup2.util.DirectedGraph-class.html#name"><a title="CedarBackup2.config.ExtendedAction.name
CedarBackup2.config.LocalPeer.name
CedarBackup2.config.RemotePeer.name
CedarBackup2.peer.LocalPeer.name
CedarBackup2.peer.RemotePeer.name
CedarBackup2.util.DirectedGraph.name" class="py-name" href="#" onclick="return doclink('link-22', 'name', 'link-22');">name</a></tt> <tt class="py-op">=</tt> <tt id="link-23" class="py-name"><a title="CedarBackup2.config.ExtendedAction.name
CedarBackup2.config.LocalPeer.name
CedarBackup2.config.RemotePeer.name
CedarBackup2.peer.LocalPeer.name
CedarBackup2.peer.RemotePeer.name
CedarBackup2.util.DirectedGraph.name" class="py-name" href="#" onclick="return doclink('link-23', 'name', 'link-22');">name</a></tt> </tt>
<a name="L136"></a><tt class="py-lineno"> 136</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-24" class="py-name" targets="Variable CedarBackup2.config.LocalPeer.collectDir=CedarBackup2.config.LocalPeer-class.html#collectDir,Variable CedarBackup2.config.RemotePeer.collectDir=CedarBackup2.config.RemotePeer-class.html#collectDir,Variable CedarBackup2.peer.LocalPeer.collectDir=CedarBackup2.peer.LocalPeer-class.html#collectDir,Variable CedarBackup2.peer.RemotePeer.collectDir=CedarBackup2.peer.RemotePeer-class.html#collectDir"><a title="CedarBackup2.config.LocalPeer.collectDir
CedarBackup2.config.RemotePeer.collectDir
CedarBackup2.peer.LocalPeer.collectDir
CedarBackup2.peer.RemotePeer.collectDir" class="py-name" href="#" onclick="return doclink('link-24', 'collectDir', 'link-24');">collectDir</a></tt> <tt class="py-op">=</tt> <tt id="link-25" class="py-name"><a title="CedarBackup2.config.LocalPeer.collectDir
CedarBackup2.config.RemotePeer.collectDir
CedarBackup2.peer.LocalPeer.collectDir
CedarBackup2.peer.RemotePeer.collectDir" class="py-name" href="#" onclick="return doclink('link-25', 'collectDir', 'link-24');">collectDir</a></tt> </tt>
<a name="L137"></a><tt class="py-lineno"> 137</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-26" class="py-name" targets="Variable CedarBackup2.config.LocalPeer.ignoreFailureMode=CedarBackup2.config.LocalPeer-class.html#ignoreFailureMode,Variable CedarBackup2.config.RemotePeer.ignoreFailureMode=CedarBackup2.config.RemotePeer-class.html#ignoreFailureMode,Variable CedarBackup2.peer.LocalPeer.ignoreFailureMode=CedarBackup2.peer.LocalPeer-class.html#ignoreFailureMode,Variable CedarBackup2.peer.RemotePeer.ignoreFailureMode=CedarBackup2.peer.RemotePeer-class.html#ignoreFailureMode"><a title="CedarBackup2.config.LocalPeer.ignoreFailureMode
CedarBackup2.config.RemotePeer.ignoreFailureMode
CedarBackup2.peer.LocalPeer.ignoreFailureMode
CedarBackup2.peer.RemotePeer.ignoreFailureMode" class="py-name" href="#" onclick="return doclink('link-26', 'ignoreFailureMode', 'link-26');">ignoreFailureMode</a></tt> <tt class="py-op">=</tt> <tt id="link-27" class="py-name"><a title="CedarBackup2.config.LocalPeer.ignoreFailureMode
CedarBackup2.config.RemotePeer.ignoreFailureMode
CedarBackup2.peer.LocalPeer.ignoreFailureMode
CedarBackup2.peer.RemotePeer.ignoreFailureMode" class="py-name" href="#" onclick="return doclink('link-27', 'ignoreFailureMode', 'link-26');">ignoreFailureMode</a></tt> </tt>
</div><a name="L138"></a><tt class="py-lineno"> 138</tt> <tt class="py-line"> </tt>
<a name="L139"></a><tt class="py-lineno"> 139</tt> <tt class="py-line"> </tt>
<a name="L140"></a><tt class="py-lineno"> 140</tt> <tt class="py-line"> <tt class="py-comment">#############</tt> </tt>
<a name="L141"></a><tt class="py-lineno"> 141</tt> <tt class="py-line"> <tt class="py-comment"># Properties</tt> </tt>
<a name="L142"></a><tt class="py-lineno"> 142</tt> <tt class="py-line"> <tt class="py-comment">#############</tt> </tt>
<a name="L143"></a><tt class="py-lineno"> 143</tt> <tt class="py-line"> </tt>
<a name="LocalPeer._setName"></a><div id="LocalPeer._setName-def"><a name="L144"></a><tt class="py-lineno"> 144</tt> <a class="py-toggle" href="#" id="LocalPeer._setName-toggle" onclick="return toggle('LocalPeer._setName');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="CedarBackup2.peer.LocalPeer-class.html#_setName">_setName</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="LocalPeer._setName-collapsed" style="display:none;" pad="++++" indent="+++++++"></div><div id="LocalPeer._setName-expanded"><a name="L145"></a><tt class="py-lineno"> 145</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
<a name="L146"></a><tt class="py-lineno"> 146</tt> <tt class="py-line"><tt class="py-docstring"> Property target used to set the peer name.</tt> </tt>
<a name="L147"></a><tt class="py-lineno"> 147</tt> <tt class="py-line"><tt class="py-docstring"> The value must be a non-empty string and cannot be C{None}.</tt> </tt>
<a name="L148"></a><tt class="py-lineno"> 148</tt> <tt class="py-line"><tt class="py-docstring"> @raise ValueError: If the value is an empty string or C{None}.</tt> </tt>
<a name="L149"></a><tt class="py-lineno"> 149</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="L150"></a><tt class="py-lineno"> 150</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">value</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt> <tt class="py-keyword">or</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> <tt class="py-op"><</tt> <tt class="py-number">1</tt><tt class="py-op">:</tt> </tt>
<a name="L151"></a><tt class="py-lineno"> 151</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">(</tt><tt class="py-string">"Peer name must be a non-empty string."</tt><tt class="py-op">)</tt> </tt>
<a name="L152"></a><tt class="py-lineno"> 152</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_name</tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt> </tt>
</div><a name="L153"></a><tt class="py-lineno"> 153</tt> <tt class="py-line"> </tt>
<a name="LocalPeer._getName"></a><div id="LocalPeer._getName-def"><a name="L154"></a><tt class="py-lineno"> 154</tt> <a class="py-toggle" href="#" id="LocalPeer._getName-toggle" onclick="return toggle('LocalPeer._getName');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="CedarBackup2.peer.LocalPeer-class.html#_getName">_getName</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="LocalPeer._getName-collapsed" style="display:none;" pad="++++" indent="+++++++"></div><div id="LocalPeer._getName-expanded"><a name="L155"></a><tt class="py-lineno"> 155</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
<a name="L156"></a><tt class="py-lineno"> 156</tt> <tt class="py-line"><tt class="py-docstring"> Property target used to get the peer name.</tt> </tt>
<a name="L157"></a><tt class="py-lineno"> 157</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="L158"></a><tt class="py-lineno"> 158</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_name</tt> </tt>
</div><a name="L159"></a><tt class="py-lineno"> 159</tt> <tt class="py-line"> </tt>
<a name="LocalPeer._setCollectDir"></a><div id="LocalPeer._setCollectDir-def"><a name="L160"></a><tt class="py-lineno"> 160</tt> <a class="py-toggle" href="#" id="LocalPeer._setCollectDir-toggle" onclick="return toggle('LocalPeer._setCollectDir');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="CedarBackup2.peer.LocalPeer-class.html#_setCollectDir">_setCollectDir</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="LocalPeer._setCollectDir-collapsed" style="display:none;" pad="++++" indent="+++++++"></div><div id="LocalPeer._setCollectDir-expanded"><a name="L161"></a><tt class="py-lineno"> 161</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
<a name="L162"></a><tt class="py-lineno"> 162</tt> <tt class="py-line"><tt class="py-docstring"> Property target used to set the collect directory.</tt> </tt>
<a name="L163"></a><tt class="py-lineno"> 163</tt> <tt class="py-line"><tt class="py-docstring"> The value must be an absolute path and cannot be C{None}.</tt> </tt>
<a name="L164"></a><tt class="py-lineno"> 164</tt> <tt class="py-line"><tt class="py-docstring"> It does not have to exist on disk at the time of assignment.</tt> </tt>
<a name="L165"></a><tt class="py-lineno"> 165</tt> <tt class="py-line"><tt class="py-docstring"> @raise ValueError: If the value is C{None} or is not an absolute path.</tt> </tt>
<a name="L166"></a><tt class="py-lineno"> 166</tt> <tt class="py-line"><tt class="py-docstring"> @raise ValueError: If a path cannot be encoded properly.</tt> </tt>
<a name="L167"></a><tt class="py-lineno"> 167</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="L168"></a><tt class="py-lineno"> 168</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">value</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt> <tt class="py-keyword">or</tt> <tt class="py-keyword">not</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">isabs</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L169"></a><tt class="py-lineno"> 169</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">(</tt><tt class="py-string">"Collect directory must be an absolute path."</tt><tt class="py-op">)</tt> </tt>
<a name="L170"></a><tt class="py-lineno"> 170</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_collectDir</tt> <tt class="py-op">=</tt> <tt id="link-28" class="py-name"><a title="CedarBackup2.util.encodePath" class="py-name" href="#" onclick="return doclink('link-28', 'encodePath', 'link-11');">encodePath</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
</div><a name="L171"></a><tt class="py-lineno"> 171</tt> <tt class="py-line"> </tt>
<a name="LocalPeer._getCollectDir"></a><div id="LocalPeer._getCollectDir-def"><a name="L172"></a><tt class="py-lineno"> 172</tt> <a class="py-toggle" href="#" id="LocalPeer._getCollectDir-toggle" onclick="return toggle('LocalPeer._getCollectDir');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="CedarBackup2.peer.LocalPeer-class.html#_getCollectDir">_getCollectDir</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="LocalPeer._getCollectDir-collapsed" style="display:none;" pad="++++" indent="+++++++"></div><div id="LocalPeer._getCollectDir-expanded"><a name="L173"></a><tt class="py-lineno"> 173</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
<a name="L174"></a><tt class="py-lineno"> 174</tt> <tt class="py-line"><tt class="py-docstring"> Property target used to get the collect directory.</tt> </tt>
<a name="L175"></a><tt class="py-lineno"> 175</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="L176"></a><tt class="py-lineno"> 176</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_collectDir</tt> </tt>
</div><a name="L177"></a><tt class="py-lineno"> 177</tt> <tt class="py-line"> </tt>
<a name="LocalPeer._setIgnoreFailureMode"></a><div id="LocalPeer._setIgnoreFailureMode-def"><a name="L178"></a><tt class="py-lineno"> 178</tt> <a class="py-toggle" href="#" id="LocalPeer._setIgnoreFailureMode-toggle" onclick="return toggle('LocalPeer._setIgnoreFailureMode');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="CedarBackup2.peer.LocalPeer-class.html#_setIgnoreFailureMode">_setIgnoreFailureMode</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="LocalPeer._setIgnoreFailureMode-collapsed" style="display:none;" pad="++++" indent="+++++++"></div><div id="LocalPeer._setIgnoreFailureMode-expanded"><a name="L179"></a><tt class="py-lineno"> 179</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
<a name="L180"></a><tt class="py-lineno"> 180</tt> <tt class="py-line"><tt class="py-docstring"> Property target used to set the ignoreFailure mode.</tt> </tt>
<a name="L181"></a><tt class="py-lineno"> 181</tt> <tt class="py-line"><tt class="py-docstring"> If not C{None}, the mode must be one of the values in L{VALID_FAILURE_MODES}.</tt> </tt>
<a name="L182"></a><tt class="py-lineno"> 182</tt> <tt class="py-line"><tt class="py-docstring"> @raise ValueError: If the value is not valid.</tt> </tt>
<a name="L183"></a><tt class="py-lineno"> 183</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="L184"></a><tt class="py-lineno"> 184</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">value</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L185"></a><tt class="py-lineno"> 185</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">value</tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt id="link-29" class="py-name"><a title="CedarBackup2.config.VALID_FAILURE_MODES" class="py-name" href="#" onclick="return doclink('link-29', 'VALID_FAILURE_MODES', 'link-14');">VALID_FAILURE_MODES</a></tt><tt class="py-op">:</tt> </tt>
<a name="L186"></a><tt class="py-lineno"> 186</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">(</tt><tt class="py-string">"Ignore failure mode must be one of %s."</tt> <tt class="py-op">%</tt> <tt id="link-30" class="py-name"><a title="CedarBackup2.config.VALID_FAILURE_MODES" class="py-name" href="#" onclick="return doclink('link-30', 'VALID_FAILURE_MODES', 'link-14');">VALID_FAILURE_MODES</a></tt><tt class="py-op">)</tt> </tt>
<a name="L187"></a><tt class="py-lineno"> 187</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_ignoreFailureMode</tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt> </tt>
</div><a name="L188"></a><tt class="py-lineno"> 188</tt> <tt class="py-line"> </tt>
<a name="LocalPeer._getIgnoreFailureMode"></a><div id="LocalPeer._getIgnoreFailureMode-def"><a name="L189"></a><tt class="py-lineno"> 189</tt> <a class="py-toggle" href="#" id="LocalPeer._getIgnoreFailureMode-toggle" onclick="return toggle('LocalPeer._getIgnoreFailureMode');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="CedarBackup2.peer.LocalPeer-class.html#_getIgnoreFailureMode">_getIgnoreFailureMode</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="LocalPeer._getIgnoreFailureMode-collapsed" style="display:none;" pad="++++" indent="+++++++"></div><div id="LocalPeer._getIgnoreFailureMode-expanded"><a name="L190"></a><tt class="py-lineno"> 190</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
<a name="L191"></a><tt class="py-lineno"> 191</tt> <tt class="py-line"><tt class="py-docstring"> Property target used to get the ignoreFailure mode.</tt> </tt>
<a name="L192"></a><tt class="py-lineno"> 192</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="L193"></a><tt class="py-lineno"> 193</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_ignoreFailureMode</tt> </tt>
</div><a name="L194"></a><tt class="py-lineno"> 194</tt> <tt class="py-line"> </tt>
<a name="L195"></a><tt class="py-lineno"> 195</tt> <tt class="py-line"> <tt id="link-31" class="py-name"><a title="CedarBackup2.config.ExtendedAction.name
CedarBackup2.config.LocalPeer.name
CedarBackup2.config.RemotePeer.name
CedarBackup2.peer.LocalPeer.name
CedarBackup2.peer.RemotePeer.name
CedarBackup2.util.DirectedGraph.name" class="py-name" href="#" onclick="return doclink('link-31', 'name', 'link-22');">name</a></tt> <tt class="py-op">=</tt> <tt class="py-name">property</tt><tt class="py-op">(</tt><tt id="link-32" class="py-name" targets="Method CedarBackup2.config.ExtendedAction._getName()=CedarBackup2.config.ExtendedAction-class.html#_getName,Method CedarBackup2.config.LocalPeer._getName()=CedarBackup2.config.LocalPeer-class.html#_getName,Method CedarBackup2.config.RemotePeer._getName()=CedarBackup2.config.RemotePeer-class.html#_getName,Method CedarBackup2.peer.LocalPeer._getName()=CedarBackup2.peer.LocalPeer-class.html#_getName,Method CedarBackup2.peer.RemotePeer._getName()=CedarBackup2.peer.RemotePeer-class.html#_getName,Method CedarBackup2.util.DirectedGraph._getName()=CedarBackup2.util.DirectedGraph-class.html#_getName"><a title="CedarBackup2.config.ExtendedAction._getName
CedarBackup2.config.LocalPeer._getName
CedarBackup2.config.RemotePeer._getName
CedarBackup2.peer.LocalPeer._getName
CedarBackup2.peer.RemotePeer._getName
CedarBackup2.util.DirectedGraph._getName" class="py-name" href="#" onclick="return doclink('link-32', '_getName', 'link-32');">_getName</a></tt><tt class="py-op">,</tt> <tt id="link-33" class="py-name" targets="Method CedarBackup2.config.ExtendedAction._setName()=CedarBackup2.config.ExtendedAction-class.html#_setName,Method CedarBackup2.config.LocalPeer._setName()=CedarBackup2.config.LocalPeer-class.html#_setName,Method CedarBackup2.config.RemotePeer._setName()=CedarBackup2.config.RemotePeer-class.html#_setName,Method CedarBackup2.peer.LocalPeer._setName()=CedarBackup2.peer.LocalPeer-class.html#_setName,Method CedarBackup2.peer.RemotePeer._setName()=CedarBackup2.peer.RemotePeer-class.html#_setName"><a title="CedarBackup2.config.ExtendedAction._setName
CedarBackup2.config.LocalPeer._setName
CedarBackup2.config.RemotePeer._setName
CedarBackup2.peer.LocalPeer._setName
CedarBackup2.peer.RemotePeer._setName" class="py-name" href="#" onclick="return doclink('link-33', '_setName', 'link-33');">_setName</a></tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-string">"Name of the peer."</tt><tt class="py-op">)</tt> </tt>
<a name="L196"></a><tt class="py-lineno"> 196</tt> <tt class="py-line"> <tt id="link-34" class="py-name"><a title="CedarBackup2.config.LocalPeer.collectDir
CedarBackup2.config.RemotePeer.collectDir
CedarBackup2.peer.LocalPeer.collectDir
CedarBackup2.peer.RemotePeer.collectDir" class="py-name" href="#" onclick="return doclink('link-34', 'collectDir', 'link-24');">collectDir</a></tt> <tt class="py-op">=</tt> <tt class="py-name">property</tt><tt class="py-op">(</tt><tt id="link-35" class="py-name" targets="Method CedarBackup2.config.LocalPeer._getCollectDir()=CedarBackup2.config.LocalPeer-class.html#_getCollectDir,Method CedarBackup2.config.RemotePeer._getCollectDir()=CedarBackup2.config.RemotePeer-class.html#_getCollectDir,Method CedarBackup2.peer.LocalPeer._getCollectDir()=CedarBackup2.peer.LocalPeer-class.html#_getCollectDir,Method CedarBackup2.peer.RemotePeer._getCollectDir()=CedarBackup2.peer.RemotePeer-class.html#_getCollectDir"><a title="CedarBackup2.config.LocalPeer._getCollectDir
CedarBackup2.config.RemotePeer._getCollectDir
CedarBackup2.peer.LocalPeer._getCollectDir
CedarBackup2.peer.RemotePeer._getCollectDir" class="py-name" href="#" onclick="return doclink('link-35', '_getCollectDir', 'link-35');">_getCollectDir</a></tt><tt class="py-op">,</tt> <tt id="link-36" class="py-name" targets="Method CedarBackup2.config.LocalPeer._setCollectDir()=CedarBackup2.config.LocalPeer-class.html#_setCollectDir,Method CedarBackup2.config.RemotePeer._setCollectDir()=CedarBackup2.config.RemotePeer-class.html#_setCollectDir,Method CedarBackup2.peer.LocalPeer._setCollectDir()=CedarBackup2.peer.LocalPeer-class.html#_setCollectDir,Method CedarBackup2.peer.RemotePeer._setCollectDir()=CedarBackup2.peer.RemotePeer-class.html#_setCollectDir"><a title="CedarBackup2.config.LocalPeer._setCollectDir
CedarBackup2.config.RemotePeer._setCollectDir
CedarBackup2.peer.LocalPeer._setCollectDir
CedarBackup2.peer.RemotePeer._setCollectDir" class="py-name" href="#" onclick="return doclink('link-36', '_setCollectDir', 'link-36');">_setCollectDir</a></tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-string">"Path to the peer's collect directory (an absolute local path)."</tt><tt class="py-op">)</tt> </tt>
<a name="L197"></a><tt class="py-lineno"> 197</tt> <tt class="py-line"> <tt id="link-37" class="py-name"><a title="CedarBackup2.config.LocalPeer.ignoreFailureMode
CedarBackup2.config.RemotePeer.ignoreFailureMode
CedarBackup2.peer.LocalPeer.ignoreFailureMode
CedarBackup2.peer.RemotePeer.ignoreFailureMode" class="py-name" href="#" onclick="return doclink('link-37', 'ignoreFailureMode', 'link-26');">ignoreFailureMode</a></tt> <tt class="py-op">=</tt> <tt class="py-name">property</tt><tt class="py-op">(</tt><tt id="link-38" class="py-name" targets="Method CedarBackup2.config.LocalPeer._getIgnoreFailureMode()=CedarBackup2.config.LocalPeer-class.html#_getIgnoreFailureMode,Method CedarBackup2.config.RemotePeer._getIgnoreFailureMode()=CedarBackup2.config.RemotePeer-class.html#_getIgnoreFailureMode,Method CedarBackup2.peer.LocalPeer._getIgnoreFailureMode()=CedarBackup2.peer.LocalPeer-class.html#_getIgnoreFailureMode,Method CedarBackup2.peer.RemotePeer._getIgnoreFailureMode()=CedarBackup2.peer.RemotePeer-class.html#_getIgnoreFailureMode"><a title="CedarBackup2.config.LocalPeer._getIgnoreFailureMode
CedarBackup2.config.RemotePeer._getIgnoreFailureMode
CedarBackup2.peer.LocalPeer._getIgnoreFailureMode
CedarBackup2.peer.RemotePeer._getIgnoreFailureMode" class="py-name" href="#" onclick="return doclink('link-38', '_getIgnoreFailureMode', 'link-38');">_getIgnoreFailureMode</a></tt><tt class="py-op">,</tt> <tt id="link-39" class="py-name" targets="Method CedarBackup2.config.LocalPeer._setIgnoreFailureMode()=CedarBackup2.config.LocalPeer-class.html#_setIgnoreFailureMode,Method CedarBackup2.config.RemotePeer._setIgnoreFailureMode()=CedarBackup2.config.RemotePeer-class.html#_setIgnoreFailureMode,Method CedarBackup2.peer.LocalPeer._setIgnoreFailureMode()=CedarBackup2.peer.LocalPeer-class.html#_setIgnoreFailureMode,Method CedarBackup2.peer.RemotePeer._setIgnoreFailureMode()=CedarBackup2.peer.RemotePeer-class.html#_setIgnoreFailureMode"><a title="CedarBackup2.config.LocalPeer._setIgnoreFailureMode
CedarBackup2.config.RemotePeer._setIgnoreFailureMode
CedarBackup2.peer.LocalPeer._setIgnoreFailureMode
CedarBackup2.peer.RemotePeer._setIgnoreFailureMode" class="py-name" href="#" onclick="return doclink('link-39', '_setIgnoreFailureMode', 'link-39');">_setIgnoreFailureMode</a></tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-string">"Ignore failure mode for peer."</tt><tt class="py-op">)</tt> </tt>
<a name="L198"></a><tt class="py-lineno"> 198</tt> <tt class="py-line"> </tt>
<a name="L199"></a><tt class="py-lineno"> 199</tt> <tt class="py-line"> </tt>
<a name="L200"></a><tt class="py-lineno"> 200</tt> <tt class="py-line"> <tt class="py-comment">#################</tt> </tt>
<a name="L201"></a><tt class="py-lineno"> 201</tt> <tt class="py-line"> <tt class="py-comment"># Public methods</tt> </tt>
<a name="L202"></a><tt class="py-lineno"> 202</tt> <tt class="py-line"> <tt class="py-comment">#################</tt> </tt>
<a name="L203"></a><tt class="py-lineno"> 203</tt> <tt class="py-line"> </tt>
<a name="LocalPeer.stagePeer"></a><div id="LocalPeer.stagePeer-def"><a name="L204"></a><tt class="py-lineno"> 204</tt> <a class="py-toggle" href="#" id="LocalPeer.stagePeer-toggle" onclick="return toggle('LocalPeer.stagePeer');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="CedarBackup2.peer.LocalPeer-class.html#stagePeer">stagePeer</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">targetDir</tt><tt class="py-op">,</tt> <tt class="py-param">ownership</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">permissions</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="LocalPeer.stagePeer-collapsed" style="display:none;" pad="++++" indent="+++++++"></div><div id="LocalPeer.stagePeer-expanded"><a name="L205"></a><tt class="py-lineno"> 205</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
<a name="L206"></a><tt class="py-lineno"> 206</tt> <tt class="py-line"><tt class="py-docstring"> Stages data from the peer into the indicated local target directory.</tt> </tt>
<a name="L207"></a><tt class="py-lineno"> 207</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L208"></a><tt class="py-lineno"> 208</tt> <tt class="py-line"><tt class="py-docstring"> The collect and target directories must both already exist before this</tt> </tt>
<a name="L209"></a><tt class="py-lineno"> 209</tt> <tt class="py-line"><tt class="py-docstring"> method is called. If passed in, ownership and permissions will be</tt> </tt>
<a name="L210"></a><tt class="py-lineno"> 210</tt> <tt class="py-line"><tt class="py-docstring"> applied to the files that are copied.</tt> </tt>
<a name="L211"></a><tt class="py-lineno"> 211</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L212"></a><tt class="py-lineno"> 212</tt> <tt class="py-line"><tt class="py-docstring"> @note: The caller is responsible for checking that the indicator exists,</tt> </tt>
<a name="L213"></a><tt class="py-lineno"> 213</tt> <tt class="py-line"><tt class="py-docstring"> if they care. This function only stages the files within the directory.</tt> </tt>
<a name="L214"></a><tt class="py-lineno"> 214</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L215"></a><tt class="py-lineno"> 215</tt> <tt class="py-line"><tt class="py-docstring"> @note: If you have user/group as strings, call the L{util.getUidGid} function</tt> </tt>
<a name="L216"></a><tt class="py-lineno"> 216</tt> <tt class="py-line"><tt class="py-docstring"> to get the associated uid/gid as an ownership tuple.</tt> </tt>
<a name="L217"></a><tt class="py-lineno"> 217</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L218"></a><tt class="py-lineno"> 218</tt> <tt class="py-line"><tt class="py-docstring"> @param targetDir: Target directory to write data into</tt> </tt>
<a name="L219"></a><tt class="py-lineno"> 219</tt> <tt class="py-line"><tt class="py-docstring"> @type targetDir: String representing a directory on disk</tt> </tt>
<a name="L220"></a><tt class="py-lineno"> 220</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L221"></a><tt class="py-lineno"> 221</tt> <tt class="py-line"><tt class="py-docstring"> @param ownership: Owner and group that the staged files should have</tt> </tt>
<a name="L222"></a><tt class="py-lineno"> 222</tt> <tt class="py-line"><tt class="py-docstring"> @type ownership: Tuple of numeric ids C{(uid, gid)}</tt> </tt>
<a name="L223"></a><tt class="py-lineno"> 223</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L224"></a><tt class="py-lineno"> 224</tt> <tt class="py-line"><tt class="py-docstring"> @param permissions: Permissions that the staged files should have</tt> </tt>
<a name="L225"></a><tt class="py-lineno"> 225</tt> <tt class="py-line"><tt class="py-docstring"> @type permissions: UNIX permissions mode, specified in octal (i.e. C{0640}).</tt> </tt>
<a name="L226"></a><tt class="py-lineno"> 226</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L227"></a><tt class="py-lineno"> 227</tt> <tt class="py-line"><tt class="py-docstring"> @return: Number of files copied from the source directory to the target directory.</tt> </tt>
<a name="L228"></a><tt class="py-lineno"> 228</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L229"></a><tt class="py-lineno"> 229</tt> <tt class="py-line"><tt class="py-docstring"> @raise ValueError: If collect directory is not a directory or does not exist</tt> </tt>
<a name="L230"></a><tt class="py-lineno"> 230</tt> <tt class="py-line"><tt class="py-docstring"> @raise ValueError: If target directory is not a directory, does not exist or is not absolute.</tt> </tt>
<a name="L231"></a><tt class="py-lineno"> 231</tt> <tt class="py-line"><tt class="py-docstring"> @raise ValueError: If a path cannot be encoded properly.</tt> </tt>
<a name="L232"></a><tt class="py-lineno"> 232</tt> <tt class="py-line"><tt class="py-docstring"> @raise IOError: If there were no files to stage (i.e. the directory was empty)</tt> </tt>
<a name="L233"></a><tt class="py-lineno"> 233</tt> <tt class="py-line"><tt class="py-docstring"> @raise IOError: If there is an IO error copying a file.</tt> </tt>
<a name="L234"></a><tt class="py-lineno"> 234</tt> <tt class="py-line"><tt class="py-docstring"> @raise OSError: If there is an OS error copying or changing permissions on a file</tt> </tt>
<a name="L235"></a><tt class="py-lineno"> 235</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="L236"></a><tt class="py-lineno"> 236</tt> <tt class="py-line"> <tt id="link-40" class="py-name" targets="Variable CedarBackup2.config.CollectConfig.targetDir=CedarBackup2.config.CollectConfig-class.html#targetDir,Variable CedarBackup2.config.StageConfig.targetDir=CedarBackup2.config.StageConfig-class.html#targetDir"><a title="CedarBackup2.config.CollectConfig.targetDir
CedarBackup2.config.StageConfig.targetDir" class="py-name" href="#" onclick="return doclink('link-40', 'targetDir', 'link-40');">targetDir</a></tt> <tt class="py-op">=</tt> <tt id="link-41" class="py-name"><a title="CedarBackup2.util.encodePath" class="py-name" href="#" onclick="return doclink('link-41', 'encodePath', 'link-11');">encodePath</a></tt><tt class="py-op">(</tt><tt id="link-42" class="py-name"><a title="CedarBackup2.config.CollectConfig.targetDir
CedarBackup2.config.StageConfig.targetDir" class="py-name" href="#" onclick="return doclink('link-42', 'targetDir', 'link-40');">targetDir</a></tt><tt class="py-op">)</tt> </tt>
<a name="L237"></a><tt class="py-lineno"> 237</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">isabs</tt><tt class="py-op">(</tt><tt id="link-43" class="py-name"><a title="CedarBackup2.config.CollectConfig.targetDir
CedarBackup2.config.StageConfig.targetDir" class="py-name" href="#" onclick="return doclink('link-43', 'targetDir', 'link-40');">targetDir</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L238"></a><tt class="py-lineno"> 238</tt> <tt class="py-line"> <tt id="link-44" class="py-name"><a title="CedarBackup2.actions.collect.logger
CedarBackup2.actions.initialize.logger
CedarBackup2.actions.purge.logger
CedarBackup2.actions.rebuild.logger
CedarBackup2.actions.stage.logger
CedarBackup2.actions.store.logger
CedarBackup2.actions.util.logger
CedarBackup2.actions.validate.logger
CedarBackup2.cli.logger
CedarBackup2.config.logger
CedarBackup2.customize.logger
CedarBackup2.extend.amazons3.logger
CedarBackup2.extend.capacity.logger
CedarBackup2.extend.encrypt.logger
CedarBackup2.extend.mbox.logger
CedarBackup2.extend.mysql.logger
CedarBackup2.extend.postgresql.logger
CedarBackup2.extend.split.logger
CedarBackup2.extend.subversion.logger
CedarBackup2.extend.sysinfo.logger
CedarBackup2.filesystem.logger
CedarBackup2.peer.logger
CedarBackup2.tools.amazons3.logger
CedarBackup2.tools.span.logger
CedarBackup2.util.logger
CedarBackup2.writers.cdwriter.logger
CedarBackup2.writers.dvdwriter.logger
CedarBackup2.writers.util.logger
CedarBackup2.xmlutil.logger" class="py-name" href="#" onclick="return doclink('link-44', 'logger', 'link-15');">logger</a></tt><tt class="py-op">.</tt><tt id="link-45" class="py-name" targets="Variable CedarBackup2.cli.Options.debug=CedarBackup2.cli.Options-class.html#debug,Variable CedarBackup2.tools.amazons3.Options.debug=CedarBackup2.tools.amazons3.Options-class.html#debug"><a title="CedarBackup2.cli.Options.debug
CedarBackup2.tools.amazons3.Options.debug" class="py-name" href="#" onclick="return doclink('link-45', 'debug', 'link-45');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">"Target directory [%s] not an absolute path."</tt><tt class="py-op">,</tt> <tt id="link-46" class="py-name"><a title="CedarBackup2.config.CollectConfig.targetDir
CedarBackup2.config.StageConfig.targetDir" class="py-name" href="#" onclick="return doclink('link-46', 'targetDir', 'link-40');">targetDir</a></tt><tt class="py-op">)</tt> </tt>
<a name="L239"></a><tt class="py-lineno"> 239</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">(</tt><tt class="py-string">"Target directory must be an absolute path."</tt><tt class="py-op">)</tt> </tt>
<a name="L240"></a><tt class="py-lineno"> 240</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">exists</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-47" class="py-name"><a title="CedarBackup2.config.LocalPeer.collectDir
CedarBackup2.config.RemotePeer.collectDir
CedarBackup2.peer.LocalPeer.collectDir
CedarBackup2.peer.RemotePeer.collectDir" class="py-name" href="#" onclick="return doclink('link-47', 'collectDir', 'link-24');">collectDir</a></tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-keyword">not</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">isdir</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-48" class="py-name"><a title="CedarBackup2.config.LocalPeer.collectDir
CedarBackup2.config.RemotePeer.collectDir
CedarBackup2.peer.LocalPeer.collectDir
CedarBackup2.peer.RemotePeer.collectDir" class="py-name" href="#" onclick="return doclink('link-48', 'collectDir', 'link-24');">collectDir</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L241"></a><tt class="py-lineno"> 241</tt> <tt class="py-line"> <tt id="link-49" class="py-name"><a title="CedarBackup2.actions.collect.logger
CedarBackup2.actions.initialize.logger
CedarBackup2.actions.purge.logger
CedarBackup2.actions.rebuild.logger
CedarBackup2.actions.stage.logger
CedarBackup2.actions.store.logger
CedarBackup2.actions.util.logger
CedarBackup2.actions.validate.logger
CedarBackup2.cli.logger
CedarBackup2.config.logger
CedarBackup2.customize.logger
CedarBackup2.extend.amazons3.logger
CedarBackup2.extend.capacity.logger
CedarBackup2.extend.encrypt.logger
CedarBackup2.extend.mbox.logger
CedarBackup2.extend.mysql.logger
CedarBackup2.extend.postgresql.logger
CedarBackup2.extend.split.logger
CedarBackup2.extend.subversion.logger
CedarBackup2.extend.sysinfo.logger
CedarBackup2.filesystem.logger
CedarBackup2.peer.logger
CedarBackup2.tools.amazons3.logger
CedarBackup2.tools.span.logger
CedarBackup2.util.logger
CedarBackup2.writers.cdwriter.logger
CedarBackup2.writers.dvdwriter.logger
CedarBackup2.writers.util.logger
CedarBackup2.xmlutil.logger" class="py-name" href="#" onclick="return doclink('link-49', 'logger', 'link-15');">logger</a></tt><tt class="py-op">.</tt><tt id="link-50" class="py-name"><a title="CedarBackup2.cli.Options.debug
CedarBackup2.tools.amazons3.Options.debug" class="py-name" href="#" onclick="return doclink('link-50', 'debug', 'link-45');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">"Collect directory [%s] is not a directory or does not exist on disk."</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-51" class="py-name"><a title="CedarBackup2.config.LocalPeer.collectDir
CedarBackup2.config.RemotePeer.collectDir
CedarBackup2.peer.LocalPeer.collectDir
CedarBackup2.peer.RemotePeer.collectDir" class="py-name" href="#" onclick="return doclink('link-51', 'collectDir', 'link-24');">collectDir</a></tt><tt class="py-op">)</tt> </tt>
<a name="L242"></a><tt class="py-lineno"> 242</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">(</tt><tt class="py-string">"Collect directory is not a directory or does not exist on disk."</tt><tt class="py-op">)</tt> </tt>
<a name="L243"></a><tt class="py-lineno"> 243</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">exists</tt><tt class="py-op">(</tt><tt id="link-52" class="py-name"><a title="CedarBackup2.config.CollectConfig.targetDir
CedarBackup2.config.StageConfig.targetDir" class="py-name" href="#" onclick="return doclink('link-52', 'targetDir', 'link-40');">targetDir</a></tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-keyword">not</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">isdir</tt><tt class="py-op">(</tt><tt id="link-53" class="py-name"><a title="CedarBackup2.config.CollectConfig.targetDir
CedarBackup2.config.StageConfig.targetDir" class="py-name" href="#" onclick="return doclink('link-53', 'targetDir', 'link-40');">targetDir</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L244"></a><tt class="py-lineno"> 244</tt> <tt class="py-line"> <tt id="link-54" class="py-name"><a title="CedarBackup2.actions.collect.logger
CedarBackup2.actions.initialize.logger
CedarBackup2.actions.purge.logger
CedarBackup2.actions.rebuild.logger
CedarBackup2.actions.stage.logger
CedarBackup2.actions.store.logger
CedarBackup2.actions.util.logger
CedarBackup2.actions.validate.logger
CedarBackup2.cli.logger
CedarBackup2.config.logger
CedarBackup2.customize.logger
CedarBackup2.extend.amazons3.logger
CedarBackup2.extend.capacity.logger
CedarBackup2.extend.encrypt.logger
CedarBackup2.extend.mbox.logger
CedarBackup2.extend.mysql.logger
CedarBackup2.extend.postgresql.logger
CedarBackup2.extend.split.logger
CedarBackup2.extend.subversion.logger
CedarBackup2.extend.sysinfo.logger
CedarBackup2.filesystem.logger
CedarBackup2.peer.logger
CedarBackup2.tools.amazons3.logger
CedarBackup2.tools.span.logger
CedarBackup2.util.logger
CedarBackup2.writers.cdwriter.logger
CedarBackup2.writers.dvdwriter.logger
CedarBackup2.writers.util.logger
CedarBackup2.xmlutil.logger" class="py-name" href="#" onclick="return doclink('link-54', 'logger', 'link-15');">logger</a></tt><tt class="py-op">.</tt><tt id="link-55" class="py-name"><a title="CedarBackup2.cli.Options.debug
CedarBackup2.tools.amazons3.Options.debug" class="py-name" href="#" onclick="return doclink('link-55', 'debug', 'link-45');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">"Target directory [%s] is not a directory or does not exist on disk."</tt><tt class="py-op">,</tt> <tt id="link-56" class="py-name"><a title="CedarBackup2.config.CollectConfig.targetDir
CedarBackup2.config.StageConfig.targetDir" class="py-name" href="#" onclick="return doclink('link-56', 'targetDir', 'link-40');">targetDir</a></tt><tt class="py-op">)</tt> </tt>
<a name="L245"></a><tt class="py-lineno"> 245</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">(</tt><tt class="py-string">"Target directory is not a directory or does not exist on disk."</tt><tt class="py-op">)</tt> </tt>
<a name="L246"></a><tt class="py-lineno"> 246</tt> <tt class="py-line"> <tt class="py-name">count</tt> <tt class="py-op">=</tt> <tt id="link-57" class="py-name" targets="Class CedarBackup2.config.LocalPeer=CedarBackup2.config.LocalPeer-class.html,Class CedarBackup2.peer.LocalPeer=CedarBackup2.peer.LocalPeer-class.html"><a title="CedarBackup2.config.LocalPeer
CedarBackup2.peer.LocalPeer" class="py-name" href="#" onclick="return doclink('link-57', 'LocalPeer', 'link-57');">LocalPeer</a></tt><tt class="py-op">.</tt><tt id="link-58" class="py-name" targets="Static Method CedarBackup2.peer.LocalPeer._copyLocalDir()=CedarBackup2.peer.LocalPeer-class.html#_copyLocalDir"><a title="CedarBackup2.peer.LocalPeer._copyLocalDir" class="py-name" href="#" onclick="return doclink('link-58', '_copyLocalDir', 'link-58');">_copyLocalDir</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-59" class="py-name"><a title="CedarBackup2.config.LocalPeer.collectDir
CedarBackup2.config.RemotePeer.collectDir
CedarBackup2.peer.LocalPeer.collectDir
CedarBackup2.peer.RemotePeer.collectDir" class="py-name" href="#" onclick="return doclink('link-59', 'collectDir', 'link-24');">collectDir</a></tt><tt class="py-op">,</tt> <tt id="link-60" class="py-name"><a title="CedarBackup2.config.CollectConfig.targetDir
CedarBackup2.config.StageConfig.targetDir" class="py-name" href="#" onclick="return doclink('link-60', 'targetDir', 'link-40');">targetDir</a></tt><tt class="py-op">,</tt> <tt class="py-name">ownership</tt><tt class="py-op">,</tt> <tt class="py-name">permissions</tt><tt class="py-op">)</tt> </tt>
<a name="L247"></a><tt class="py-lineno"> 247</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">count</tt> <tt class="py-op">==</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L248"></a><tt class="py-lineno"> 248</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">IOError</tt><tt class="py-op">(</tt><tt class="py-string">"Did not copy any files from local peer."</tt><tt class="py-op">)</tt> </tt>
<a name="L249"></a><tt class="py-lineno"> 249</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">count</tt> </tt>
</div><a name="L250"></a><tt class="py-lineno"> 250</tt> <tt class="py-line"> </tt>
<a name="LocalPeer.checkCollectIndicator"></a><div id="LocalPeer.checkCollectIndicator-def"><a name="L251"></a><tt class="py-lineno"> 251</tt> <a class="py-toggle" href="#" id="LocalPeer.checkCollectIndicator-toggle" onclick="return toggle('LocalPeer.checkCollectIndicator');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="CedarBackup2.peer.LocalPeer-class.html#checkCollectIndicator">checkCollectIndicator</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">collectIndicator</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="LocalPeer.checkCollectIndicator-collapsed" style="display:none;" pad="++++" indent="+++++++"></div><div id="LocalPeer.checkCollectIndicator-expanded"><a name="L252"></a><tt class="py-lineno"> 252</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
<a name="L253"></a><tt class="py-lineno"> 253</tt> <tt class="py-line"><tt class="py-docstring"> Checks the collect indicator in the peer's staging directory.</tt> </tt>
<a name="L254"></a><tt class="py-lineno"> 254</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L255"></a><tt class="py-lineno"> 255</tt> <tt class="py-line"><tt class="py-docstring"> When a peer has completed collecting its backup files, it will write an</tt> </tt>
<a name="L256"></a><tt class="py-lineno"> 256</tt> <tt class="py-line"><tt class="py-docstring"> empty indicator file into its collect directory. This method checks to</tt> </tt>
<a name="L257"></a><tt class="py-lineno"> 257</tt> <tt class="py-line"><tt class="py-docstring"> see whether that indicator has been written. We're "stupid" here - if</tt> </tt>
<a name="L258"></a><tt class="py-lineno"> 258</tt> <tt class="py-line"><tt class="py-docstring"> the collect directory doesn't exist, you'll naturally get back C{False}.</tt> </tt>
<a name="L259"></a><tt class="py-lineno"> 259</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L260"></a><tt class="py-lineno"> 260</tt> <tt class="py-line"><tt class="py-docstring"> If you need to, you can override the name of the collect indicator file</tt> </tt>
<a name="L261"></a><tt class="py-lineno"> 261</tt> <tt class="py-line"><tt class="py-docstring"> by passing in a different name.</tt> </tt>
<a name="L262"></a><tt class="py-lineno"> 262</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L263"></a><tt class="py-lineno"> 263</tt> <tt class="py-line"><tt class="py-docstring"> @param collectIndicator: Name of the collect indicator file to check</tt> </tt>
<a name="L264"></a><tt class="py-lineno"> 264</tt> <tt class="py-line"><tt class="py-docstring"> @type collectIndicator: String representing name of a file in the collect directory</tt> </tt>
<a name="L265"></a><tt class="py-lineno"> 265</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L266"></a><tt class="py-lineno"> 266</tt> <tt class="py-line"><tt class="py-docstring"> @return: Boolean true/false depending on whether the indicator exists.</tt> </tt>
<a name="L267"></a><tt class="py-lineno"> 267</tt> <tt class="py-line"><tt class="py-docstring"> @raise ValueError: If a path cannot be encoded properly.</tt> </tt>
<a name="L268"></a><tt class="py-lineno"> 268</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="L269"></a><tt class="py-lineno"> 269</tt> <tt class="py-line"> <tt class="py-name">collectIndicator</tt> <tt class="py-op">=</tt> <tt id="link-61" class="py-name"><a title="CedarBackup2.util.encodePath" class="py-name" href="#" onclick="return doclink('link-61', 'encodePath', 'link-11');">encodePath</a></tt><tt class="py-op">(</tt><tt class="py-name">collectIndicator</tt><tt class="py-op">)</tt> </tt>
<a name="L270"></a><tt class="py-lineno"> 270</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">collectIndicator</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L271"></a><tt class="py-lineno"> 271</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">exists</tt><tt class="py-op">(</tt><tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-62" class="py-name"><a title="CedarBackup2.config.LocalPeer.collectDir
CedarBackup2.config.RemotePeer.collectDir
CedarBackup2.peer.LocalPeer.collectDir
CedarBackup2.peer.RemotePeer.collectDir" class="py-name" href="#" onclick="return doclink('link-62', 'collectDir', 'link-24');">collectDir</a></tt><tt class="py-op">,</tt> <tt id="link-63" class="py-name"><a title="CedarBackup2.peer.DEF_COLLECT_INDICATOR" class="py-name" href="#" onclick="return doclink('link-63', 'DEF_COLLECT_INDICATOR', 'link-19');">DEF_COLLECT_INDICATOR</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L272"></a><tt class="py-lineno"> 272</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L273"></a><tt class="py-lineno"> 273</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">exists</tt><tt class="py-op">(</tt><tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-64" class="py-name"><a title="CedarBackup2.config.LocalPeer.collectDir
CedarBackup2.config.RemotePeer.collectDir
CedarBackup2.peer.LocalPeer.collectDir
CedarBackup2.peer.RemotePeer.collectDir" class="py-name" href="#" onclick="return doclink('link-64', 'collectDir', 'link-24');">collectDir</a></tt><tt class="py-op">,</tt> <tt class="py-name">collectIndicator</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L274"></a><tt class="py-lineno"> 274</tt> <tt class="py-line"> </tt>
<a name="LocalPeer.writeStageIndicator"></a><div id="LocalPeer.writeStageIndicator-def"><a name="L275"></a><tt class="py-lineno"> 275</tt> <a class="py-toggle" href="#" id="LocalPeer.writeStageIndicator-toggle" onclick="return toggle('LocalPeer.writeStageIndicator');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="CedarBackup2.peer.LocalPeer-class.html#writeStageIndicator">writeStageIndicator</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">stageIndicator</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">ownership</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">permissions</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="LocalPeer.writeStageIndicator-collapsed" style="display:none;" pad="++++" indent="+++++++"></div><div id="LocalPeer.writeStageIndicator-expanded"><a name="L276"></a><tt class="py-lineno"> 276</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
<a name="L277"></a><tt class="py-lineno"> 277</tt> <tt class="py-line"><tt class="py-docstring"> Writes the stage indicator in the peer's staging directory.</tt> </tt>
<a name="L278"></a><tt class="py-lineno"> 278</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L279"></a><tt class="py-lineno"> 279</tt> <tt class="py-line"><tt class="py-docstring"> When the master has completed collecting its backup files, it will write</tt> </tt>
<a name="L280"></a><tt class="py-lineno"> 280</tt> <tt class="py-line"><tt class="py-docstring"> an empty indicator file into the peer's collect directory. The presence</tt> </tt>
<a name="L281"></a><tt class="py-lineno"> 281</tt> <tt class="py-line"><tt class="py-docstring"> of this file implies that the staging process is complete.</tt> </tt>
<a name="L282"></a><tt class="py-lineno"> 282</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L283"></a><tt class="py-lineno"> 283</tt> <tt class="py-line"><tt class="py-docstring"> If you need to, you can override the name of the stage indicator file by</tt> </tt>
<a name="L284"></a><tt class="py-lineno"> 284</tt> <tt class="py-line"><tt class="py-docstring"> passing in a different name.</tt> </tt>
<a name="L285"></a><tt class="py-lineno"> 285</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L286"></a><tt class="py-lineno"> 286</tt> <tt class="py-line"><tt class="py-docstring"> @note: If you have user/group as strings, call the L{util.getUidGid}</tt> </tt>
<a name="L287"></a><tt class="py-lineno"> 287</tt> <tt class="py-line"><tt class="py-docstring"> function to get the associated uid/gid as an ownership tuple.</tt> </tt>
<a name="L288"></a><tt class="py-lineno"> 288</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L289"></a><tt class="py-lineno"> 289</tt> <tt class="py-line"><tt class="py-docstring"> @param stageIndicator: Name of the indicator file to write</tt> </tt>
<a name="L290"></a><tt class="py-lineno"> 290</tt> <tt class="py-line"><tt class="py-docstring"> @type stageIndicator: String representing name of a file in the collect directory</tt> </tt>
<a name="L291"></a><tt class="py-lineno"> 291</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L292"></a><tt class="py-lineno"> 292</tt> <tt class="py-line"><tt class="py-docstring"> @param ownership: Owner and group that the indicator file should have</tt> </tt>
<a name="L293"></a><tt class="py-lineno"> 293</tt> <tt class="py-line"><tt class="py-docstring"> @type ownership: Tuple of numeric ids C{(uid, gid)}</tt> </tt>
<a name="L294"></a><tt class="py-lineno"> 294</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L295"></a><tt class="py-lineno"> 295</tt> <tt class="py-line"><tt class="py-docstring"> @param permissions: Permissions that the indicator file should have</tt> </tt>
<a name="L296"></a><tt class="py-lineno"> 296</tt> <tt class="py-line"><tt class="py-docstring"> @type permissions: UNIX permissions mode, specified in octal (i.e. C{0640}).</tt> </tt>
<a name="L297"></a><tt class="py-lineno"> 297</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L298"></a><tt class="py-lineno"> 298</tt> <tt class="py-line"><tt class="py-docstring"> @raise ValueError: If collect directory is not a directory or does not exist</tt> </tt>
<a name="L299"></a><tt class="py-lineno"> 299</tt> <tt class="py-line"><tt class="py-docstring"> @raise ValueError: If a path cannot be encoded properly.</tt> </tt>
<a name="L300"></a><tt class="py-lineno"> 300</tt> <tt class="py-line"><tt class="py-docstring"> @raise IOError: If there is an IO error creating the file.</tt> </tt>
<a name="L301"></a><tt class="py-lineno"> 301</tt> <tt class="py-line"><tt class="py-docstring"> @raise OSError: If there is an OS error creating or changing permissions on the file</tt> </tt>
<a name="L302"></a><tt class="py-lineno"> 302</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="L303"></a><tt class="py-lineno"> 303</tt> <tt class="py-line"> <tt class="py-name">stageIndicator</tt> <tt class="py-op">=</tt> <tt id="link-65" class="py-name"><a title="CedarBackup2.util.encodePath" class="py-name" href="#" onclick="return doclink('link-65', 'encodePath', 'link-11');">encodePath</a></tt><tt class="py-op">(</tt><tt class="py-name">stageIndicator</tt><tt class="py-op">)</tt> </tt>
<a name="L304"></a><tt class="py-lineno"> 304</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">exists</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-66" class="py-name"><a title="CedarBackup2.config.LocalPeer.collectDir
CedarBackup2.config.RemotePeer.collectDir
CedarBackup2.peer.LocalPeer.collectDir
CedarBackup2.peer.RemotePeer.collectDir" class="py-name" href="#" onclick="return doclink('link-66', 'collectDir', 'link-24');">collectDir</a></tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-keyword">not</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">isdir</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-67" class="py-name"><a title="CedarBackup2.config.LocalPeer.collectDir
CedarBackup2.config.RemotePeer.collectDir
CedarBackup2.peer.LocalPeer.collectDir
CedarBackup2.peer.RemotePeer.collectDir" class="py-name" href="#" onclick="return doclink('link-67', 'collectDir', 'link-24');">collectDir</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L305"></a><tt class="py-lineno"> 305</tt> <tt class="py-line"> <tt id="link-68" class="py-name"><a title="CedarBackup2.actions.collect.logger
CedarBackup2.actions.initialize.logger
CedarBackup2.actions.purge.logger
CedarBackup2.actions.rebuild.logger
CedarBackup2.actions.stage.logger
CedarBackup2.actions.store.logger
CedarBackup2.actions.util.logger
CedarBackup2.actions.validate.logger
CedarBackup2.cli.logger
CedarBackup2.config.logger
CedarBackup2.customize.logger
CedarBackup2.extend.amazons3.logger
CedarBackup2.extend.capacity.logger
CedarBackup2.extend.encrypt.logger
CedarBackup2.extend.mbox.logger
CedarBackup2.extend.mysql.logger
CedarBackup2.extend.postgresql.logger
CedarBackup2.extend.split.logger
CedarBackup2.extend.subversion.logger
CedarBackup2.extend.sysinfo.logger
CedarBackup2.filesystem.logger
CedarBackup2.peer.logger
CedarBackup2.tools.amazons3.logger
CedarBackup2.tools.span.logger
CedarBackup2.util.logger
CedarBackup2.writers.cdwriter.logger
CedarBackup2.writers.dvdwriter.logger
CedarBackup2.writers.util.logger
CedarBackup2.xmlutil.logger" class="py-name" href="#" onclick="return doclink('link-68', 'logger', 'link-15');">logger</a></tt><tt class="py-op">.</tt><tt id="link-69" class="py-name"><a title="CedarBackup2.cli.Options.debug
CedarBackup2.tools.amazons3.Options.debug" class="py-name" href="#" onclick="return doclink('link-69', 'debug', 'link-45');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">"Collect directory [%s] is not a directory or does not exist on disk."</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-70" class="py-name"><a title="CedarBackup2.config.LocalPeer.collectDir
CedarBackup2.config.RemotePeer.collectDir
CedarBackup2.peer.LocalPeer.collectDir
CedarBackup2.peer.RemotePeer.collectDir" class="py-name" href="#" onclick="return doclink('link-70', 'collectDir', 'link-24');">collectDir</a></tt><tt class="py-op">)</tt> </tt>
<a name="L306"></a><tt class="py-lineno"> 306</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">(</tt><tt class="py-string">"Collect directory is not a directory or does not exist on disk."</tt><tt class="py-op">)</tt> </tt>
<a name="L307"></a><tt class="py-lineno"> 307</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">stageIndicator</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L308"></a><tt class="py-lineno"> 308</tt> <tt class="py-line"> <tt class="py-name">fileName</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-71" class="py-name"><a title="CedarBackup2.config.LocalPeer.collectDir
CedarBackup2.config.RemotePeer.collectDir
CedarBackup2.peer.LocalPeer.collectDir
CedarBackup2.peer.RemotePeer.collectDir" class="py-name" href="#" onclick="return doclink('link-71', 'collectDir', 'link-24');">collectDir</a></tt><tt class="py-op">,</tt> <tt id="link-72" class="py-name"><a title="CedarBackup2.peer.DEF_STAGE_INDICATOR" class="py-name" href="#" onclick="return doclink('link-72', 'DEF_STAGE_INDICATOR', 'link-20');">DEF_STAGE_INDICATOR</a></tt><tt class="py-op">)</tt> </tt>
<a name="L309"></a><tt class="py-lineno"> 309</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L310"></a><tt class="py-lineno"> 310</tt> <tt class="py-line"> <tt class="py-name">fileName</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-73" class="py-name"><a title="CedarBackup2.config.LocalPeer.collectDir
CedarBackup2.config.RemotePeer.collectDir
CedarBackup2.peer.LocalPeer.collectDir
CedarBackup2.peer.RemotePeer.collectDir" class="py-name" href="#" onclick="return doclink('link-73', 'collectDir', 'link-24');">collectDir</a></tt><tt class="py-op">,</tt> <tt class="py-name">stageIndicator</tt><tt class="py-op">)</tt> </tt>
<a name="L311"></a><tt class="py-lineno"> 311</tt> <tt class="py-line"> <tt id="link-74" class="py-name"><a title="CedarBackup2.config.LocalPeer
CedarBackup2.peer.LocalPeer" class="py-name" href="#" onclick="return doclink('link-74', 'LocalPeer', 'link-57');">LocalPeer</a></tt><tt class="py-op">.</tt><tt id="link-75" class="py-name" targets="Static Method CedarBackup2.peer.LocalPeer._copyLocalFile()=CedarBackup2.peer.LocalPeer-class.html#_copyLocalFile"><a title="CedarBackup2.peer.LocalPeer._copyLocalFile" class="py-name" href="#" onclick="return doclink('link-75', '_copyLocalFile', 'link-75');">_copyLocalFile</a></tt><tt class="py-op">(</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-name">fileName</tt><tt class="py-op">,</tt> <tt class="py-name">ownership</tt><tt class="py-op">,</tt> <tt class="py-name">permissions</tt><tt class="py-op">)</tt> <tt class="py-comment"># None for sourceFile results in an empty target</tt> </tt>
</div><a name="L312"></a><tt class="py-lineno"> 312</tt> <tt class="py-line"> </tt>
<a name="L313"></a><tt class="py-lineno"> 313</tt> <tt class="py-line"> </tt>
<a name="L314"></a><tt class="py-lineno"> 314</tt> <tt class="py-line"> <tt class="py-comment">##################</tt> </tt>
<a name="L315"></a><tt class="py-lineno"> 315</tt> <tt class="py-line"> <tt class="py-comment"># Private methods</tt> </tt>
<a name="L316"></a><tt class="py-lineno"> 316</tt> <tt class="py-line"> <tt class="py-comment">##################</tt> </tt>
<a name="L317"></a><tt class="py-lineno"> 317</tt> <tt class="py-line"> </tt>
<a name="L318"></a><tt class="py-lineno"> 318</tt> <tt class="py-line"> <tt class="py-decorator">@</tt><tt class="py-decorator">staticmethod</tt> </tt>
<a name="LocalPeer._copyLocalDir"></a><div id="LocalPeer._copyLocalDir-def"><a name="L319"></a><tt class="py-lineno"> 319</tt> <a class="py-toggle" href="#" id="LocalPeer._copyLocalDir-toggle" onclick="return toggle('LocalPeer._copyLocalDir');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="CedarBackup2.peer.LocalPeer-class.html#_copyLocalDir">_copyLocalDir</a><tt class="py-op">(</tt><tt class="py-param">sourceDir</tt><tt class="py-op">,</tt> <tt class="py-param">targetDir</tt><tt class="py-op">,</tt> <tt class="py-param">ownership</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">permissions</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="LocalPeer._copyLocalDir-collapsed" style="display:none;" pad="++++" indent="+++++++"></div><div id="LocalPeer._copyLocalDir-expanded"><a name="L320"></a><tt class="py-lineno"> 320</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
<a name="L321"></a><tt class="py-lineno"> 321</tt> <tt class="py-line"><tt class="py-docstring"> Copies files from the source directory to the target directory.</tt> </tt>
<a name="L322"></a><tt class="py-lineno"> 322</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L323"></a><tt class="py-lineno"> 323</tt> <tt class="py-line"><tt class="py-docstring"> This function is not recursive. Only the files in the directory will be</tt> </tt>
<a name="L324"></a><tt class="py-lineno"> 324</tt> <tt class="py-line"><tt class="py-docstring"> copied. Ownership and permissions will be left at their default values</tt> </tt>
<a name="L325"></a><tt class="py-lineno"> 325</tt> <tt class="py-line"><tt class="py-docstring"> if new values are not specified. The source and target directories are</tt> </tt>
<a name="L326"></a><tt class="py-lineno"> 326</tt> <tt class="py-line"><tt class="py-docstring"> allowed to be soft links to a directory, but besides that soft links are</tt> </tt>
<a name="L327"></a><tt class="py-lineno"> 327</tt> <tt class="py-line"><tt class="py-docstring"> ignored.</tt> </tt>
<a name="L328"></a><tt class="py-lineno"> 328</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L329"></a><tt class="py-lineno"> 329</tt> <tt class="py-line"><tt class="py-docstring"> @note: If you have user/group as strings, call the L{util.getUidGid}</tt> </tt>
<a name="L330"></a><tt class="py-lineno"> 330</tt> <tt class="py-line"><tt class="py-docstring"> function to get the associated uid/gid as an ownership tuple.</tt> </tt>
<a name="L331"></a><tt class="py-lineno"> 331</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L332"></a><tt class="py-lineno"> 332</tt> <tt class="py-line"><tt class="py-docstring"> @param sourceDir: Source directory</tt> </tt>
<a name="L333"></a><tt class="py-lineno"> 333</tt> <tt class="py-line"><tt class="py-docstring"> @type sourceDir: String representing a directory on disk</tt> </tt>
<a name="L334"></a><tt class="py-lineno"> 334</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L335"></a><tt class="py-lineno"> 335</tt> <tt class="py-line"><tt class="py-docstring"> @param targetDir: Target directory</tt> </tt>
<a name="L336"></a><tt class="py-lineno"> 336</tt> <tt class="py-line"><tt class="py-docstring"> @type targetDir: String representing a directory on disk</tt> </tt>
<a name="L337"></a><tt class="py-lineno"> 337</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L338"></a><tt class="py-lineno"> 338</tt> <tt class="py-line"><tt class="py-docstring"> @param ownership: Owner and group that the copied files should have</tt> </tt>
<a name="L339"></a><tt class="py-lineno"> 339</tt> <tt class="py-line"><tt class="py-docstring"> @type ownership: Tuple of numeric ids C{(uid, gid)}</tt> </tt>
<a name="L340"></a><tt class="py-lineno"> 340</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L341"></a><tt class="py-lineno"> 341</tt> <tt class="py-line"><tt class="py-docstring"> @param permissions: Permissions that the staged files should have</tt> </tt>
<a name="L342"></a><tt class="py-lineno"> 342</tt> <tt class="py-line"><tt class="py-docstring"> @type permissions: UNIX permissions mode, specified in octal (i.e. C{0640}).</tt> </tt>
<a name="L343"></a><tt class="py-lineno"> 343</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L344"></a><tt class="py-lineno"> 344</tt> <tt class="py-line"><tt class="py-docstring"> @return: Number of files copied from the source directory to the target directory.</tt> </tt>
<a name="L345"></a><tt class="py-lineno"> 345</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L346"></a><tt class="py-lineno"> 346</tt> <tt class="py-line"><tt class="py-docstring"> @raise ValueError: If source or target is not a directory or does not exist.</tt> </tt>
<a name="L347"></a><tt class="py-lineno"> 347</tt> <tt class="py-line"><tt class="py-docstring"> @raise ValueError: If a path cannot be encoded properly.</tt> </tt>
<a name="L348"></a><tt class="py-lineno"> 348</tt> <tt class="py-line"><tt class="py-docstring"> @raise IOError: If there is an IO error copying the files.</tt> </tt>
<a name="L349"></a><tt class="py-lineno"> 349</tt> <tt class="py-line"><tt class="py-docstring"> @raise OSError: If there is an OS error copying or changing permissions on a files</tt> </tt>
<a name="L350"></a><tt class="py-lineno"> 350</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="L351"></a><tt class="py-lineno"> 351</tt> <tt class="py-line"> <tt class="py-name">filesCopied</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
<a name="L352"></a><tt class="py-lineno"> 352</tt> <tt class="py-line"> <tt id="link-76" class="py-name" targets="Variable CedarBackup2.config.StoreConfig.sourceDir=CedarBackup2.config.StoreConfig-class.html#sourceDir,Variable CedarBackup2.tools.amazons3.Options.sourceDir=CedarBackup2.tools.amazons3.Options-class.html#sourceDir"><a title="CedarBackup2.config.StoreConfig.sourceDir
CedarBackup2.tools.amazons3.Options.sourceDir" class="py-name" href="#" onclick="return doclink('link-76', 'sourceDir', 'link-76');">sourceDir</a></tt> <tt class="py-op">=</tt> <tt id="link-77" class="py-name"><a title="CedarBackup2.util.encodePath" class="py-name" href="#" onclick="return doclink('link-77', 'encodePath', 'link-11');">encodePath</a></tt><tt class="py-op">(</tt><tt id="link-78" class="py-name"><a title="CedarBackup2.config.StoreConfig.sourceDir
CedarBackup2.tools.amazons3.Options.sourceDir" class="py-name" href="#" onclick="return doclink('link-78', 'sourceDir', 'link-76');">sourceDir</a></tt><tt class="py-op">)</tt> </tt>
<a name="L353"></a><tt class="py-lineno"> 353</tt> <tt class="py-line"> <tt id="link-79" class="py-name"><a title="CedarBackup2.config.CollectConfig.targetDir
CedarBackup2.config.StageConfig.targetDir" class="py-name" href="#" onclick="return doclink('link-79', 'targetDir', 'link-40');">targetDir</a></tt> <tt class="py-op">=</tt> <tt id="link-80" class="py-name"><a title="CedarBackup2.util.encodePath" class="py-name" href="#" onclick="return doclink('link-80', 'encodePath', 'link-11');">encodePath</a></tt><tt class="py-op">(</tt><tt id="link-81" class="py-name"><a title="CedarBackup2.config.CollectConfig.targetDir
CedarBackup2.config.StageConfig.targetDir" class="py-name" href="#" onclick="return doclink('link-81', 'targetDir', 'link-40');">targetDir</a></tt><tt class="py-op">)</tt> </tt>
<a name="L354"></a><tt class="py-lineno"> 354</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">fileName</tt> <tt class="py-keyword">in</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">listdir</tt><tt class="py-op">(</tt><tt id="link-82" class="py-name"><a title="CedarBackup2.config.StoreConfig.sourceDir
CedarBackup2.tools.amazons3.Options.sourceDir" class="py-name" href="#" onclick="return doclink('link-82', 'sourceDir', 'link-76');">sourceDir</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L355"></a><tt class="py-lineno"> 355</tt> <tt class="py-line"> <tt class="py-name">sourceFile</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt id="link-83" class="py-name"><a title="CedarBackup2.config.StoreConfig.sourceDir
CedarBackup2.tools.amazons3.Options.sourceDir" class="py-name" href="#" onclick="return doclink('link-83', 'sourceDir', 'link-76');">sourceDir</a></tt><tt class="py-op">,</tt> <tt class="py-name">fileName</tt><tt class="py-op">)</tt> </tt>
<a name="L356"></a><tt class="py-lineno"> 356</tt> <tt class="py-line"> <tt class="py-name">targetFile</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt id="link-84" class="py-name"><a title="CedarBackup2.config.CollectConfig.targetDir
CedarBackup2.config.StageConfig.targetDir" class="py-name" href="#" onclick="return doclink('link-84', 'targetDir', 'link-40');">targetDir</a></tt><tt class="py-op">,</tt> <tt class="py-name">fileName</tt><tt class="py-op">)</tt> </tt>
<a name="L357"></a><tt class="py-lineno"> 357</tt> <tt class="py-line"> <tt id="link-85" class="py-name"><a title="CedarBackup2.config.LocalPeer
CedarBackup2.peer.LocalPeer" class="py-name" href="#" onclick="return doclink('link-85', 'LocalPeer', 'link-57');">LocalPeer</a></tt><tt class="py-op">.</tt><tt id="link-86" class="py-name"><a title="CedarBackup2.peer.LocalPeer._copyLocalFile" class="py-name" href="#" onclick="return doclink('link-86', '_copyLocalFile', 'link-75');">_copyLocalFile</a></tt><tt class="py-op">(</tt><tt class="py-name">sourceFile</tt><tt class="py-op">,</tt> <tt class="py-name">targetFile</tt><tt class="py-op">,</tt> <tt class="py-name">ownership</tt><tt class="py-op">,</tt> <tt class="py-name">permissions</tt><tt class="py-op">)</tt> </tt>
<a name="L358"></a><tt class="py-lineno"> 358</tt> <tt class="py-line"> <tt class="py-name">filesCopied</tt> <tt class="py-op">+=</tt> <tt class="py-number">1</tt> </tt>
<a name="L359"></a><tt class="py-lineno"> 359</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">filesCopied</tt> </tt>
</div><a name="L360"></a><tt class="py-lineno"> 360</tt> <tt class="py-line"> </tt>
<a name="L361"></a><tt class="py-lineno"> 361</tt> <tt class="py-line"> <tt class="py-decorator">@</tt><tt class="py-decorator">staticmethod</tt> </tt>
<a name="LocalPeer._copyLocalFile"></a><div id="LocalPeer._copyLocalFile-def"><a name="L362"></a><tt class="py-lineno"> 362</tt> <a class="py-toggle" href="#" id="LocalPeer._copyLocalFile-toggle" onclick="return toggle('LocalPeer._copyLocalFile');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="CedarBackup2.peer.LocalPeer-class.html#_copyLocalFile">_copyLocalFile</a><tt class="py-op">(</tt><tt class="py-param">sourceFile</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">targetFile</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">ownership</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">permissions</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">overwrite</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="LocalPeer._copyLocalFile-collapsed" style="display:none;" pad="++++" indent="+++++++"></div><div id="LocalPeer._copyLocalFile-expanded"><a name="L363"></a><tt class="py-lineno"> 363</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
<a name="L364"></a><tt class="py-lineno"> 364</tt> <tt class="py-line"><tt class="py-docstring"> Copies a source file to a target file.</tt> </tt>
<a name="L365"></a><tt class="py-lineno"> 365</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L366"></a><tt class="py-lineno"> 366</tt> <tt class="py-line"><tt class="py-docstring"> If the source file is C{None} then the target file will be created or</tt> </tt>
<a name="L367"></a><tt class="py-lineno"> 367</tt> <tt class="py-line"><tt class="py-docstring"> overwritten as an empty file. If the target file is C{None}, this method</tt> </tt>
<a name="L368"></a><tt class="py-lineno"> 368</tt> <tt class="py-line"><tt class="py-docstring"> is a no-op. Attempting to copy a soft link or a directory will result in</tt> </tt>
<a name="L369"></a><tt class="py-lineno"> 369</tt> <tt class="py-line"><tt class="py-docstring"> an exception.</tt> </tt>
<a name="L370"></a><tt class="py-lineno"> 370</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L371"></a><tt class="py-lineno"> 371</tt> <tt class="py-line"><tt class="py-docstring"> @note: If you have user/group as strings, call the L{util.getUidGid}</tt> </tt>
<a name="L372"></a><tt class="py-lineno"> 372</tt> <tt class="py-line"><tt class="py-docstring"> function to get the associated uid/gid as an ownership tuple.</tt> </tt>
<a name="L373"></a><tt class="py-lineno"> 373</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L374"></a><tt class="py-lineno"> 374</tt> <tt class="py-line"><tt class="py-docstring"> @note: We will not overwrite a target file that exists when this method</tt> </tt>
<a name="L375"></a><tt class="py-lineno"> 375</tt> <tt class="py-line"><tt class="py-docstring"> is invoked. If the target already exists, we'll raise an exception.</tt> </tt>
<a name="L376"></a><tt class="py-lineno"> 376</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L377"></a><tt class="py-lineno"> 377</tt> <tt class="py-line"><tt class="py-docstring"> @param sourceFile: Source file to copy</tt> </tt>
<a name="L378"></a><tt class="py-lineno"> 378</tt> <tt class="py-line"><tt class="py-docstring"> @type sourceFile: String representing a file on disk, as an absolute path</tt> </tt>
<a name="L379"></a><tt class="py-lineno"> 379</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L380"></a><tt class="py-lineno"> 380</tt> <tt class="py-line"><tt class="py-docstring"> @param targetFile: Target file to create</tt> </tt>
<a name="L381"></a><tt class="py-lineno"> 381</tt> <tt class="py-line"><tt class="py-docstring"> @type targetFile: String representing a file on disk, as an absolute path</tt> </tt>
<a name="L382"></a><tt class="py-lineno"> 382</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L383"></a><tt class="py-lineno"> 383</tt> <tt class="py-line"><tt class="py-docstring"> @param ownership: Owner and group that the copied should have</tt> </tt>
<a name="L384"></a><tt class="py-lineno"> 384</tt> <tt class="py-line"><tt class="py-docstring"> @type ownership: Tuple of numeric ids C{(uid, gid)}</tt> </tt>
<a name="L385"></a><tt class="py-lineno"> 385</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L386"></a><tt class="py-lineno"> 386</tt> <tt class="py-line"><tt class="py-docstring"> @param permissions: Permissions that the staged files should have</tt> </tt>
<a name="L387"></a><tt class="py-lineno"> 387</tt> <tt class="py-line"><tt class="py-docstring"> @type permissions: UNIX permissions mode, specified in octal (i.e. C{0640}).</tt> </tt>
<a name="L388"></a><tt class="py-lineno"> 388</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L389"></a><tt class="py-lineno"> 389</tt> <tt class="py-line"><tt class="py-docstring"> @param overwrite: Indicates whether it's OK to overwrite the target file.</tt> </tt>
<a name="L390"></a><tt class="py-lineno"> 390</tt> <tt class="py-line"><tt class="py-docstring"> @type overwrite: Boolean true/false.</tt> </tt>
<a name="L391"></a><tt class="py-lineno"> 391</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L392"></a><tt class="py-lineno"> 392</tt> <tt class="py-line"><tt class="py-docstring"> @raise ValueError: If the passed-in source file is not a regular file.</tt> </tt>
<a name="L393"></a><tt class="py-lineno"> 393</tt> <tt class="py-line"><tt class="py-docstring"> @raise ValueError: If a path cannot be encoded properly.</tt> </tt>
<a name="L394"></a><tt class="py-lineno"> 394</tt> <tt class="py-line"><tt class="py-docstring"> @raise IOError: If the target file already exists.</tt> </tt>
<a name="L395"></a><tt class="py-lineno"> 395</tt> <tt class="py-line"><tt class="py-docstring"> @raise IOError: If there is an IO error copying the file</tt> </tt>
<a name="L396"></a><tt class="py-lineno"> 396</tt> <tt class="py-line"><tt class="py-docstring"> @raise OSError: If there is an OS error copying or changing permissions on a file</tt> </tt>
<a name="L397"></a><tt class="py-lineno"> 397</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="L398"></a><tt class="py-lineno"> 398</tt> <tt class="py-line"> <tt class="py-name">targetFile</tt> <tt class="py-op">=</tt> <tt id="link-87" class="py-name"><a title="CedarBackup2.util.encodePath" class="py-name" href="#" onclick="return doclink('link-87', 'encodePath', 'link-11');">encodePath</a></tt><tt class="py-op">(</tt><tt class="py-name">targetFile</tt><tt class="py-op">)</tt> </tt>
<a name="L399"></a><tt class="py-lineno"> 399</tt> <tt class="py-line"> <tt class="py-name">sourceFile</tt> <tt class="py-op">=</tt> <tt id="link-88" class="py-name"><a title="CedarBackup2.util.encodePath" class="py-name" href="#" onclick="return doclink('link-88', 'encodePath', 'link-11');">encodePath</a></tt><tt class="py-op">(</tt><tt class="py-name">sourceFile</tt><tt class="py-op">)</tt> </tt>
<a name="L400"></a><tt class="py-lineno"> 400</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">targetFile</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L401"></a><tt class="py-lineno"> 401</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> </tt>
<a name="L402"></a><tt class="py-lineno"> 402</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">overwrite</tt><tt class="py-op">:</tt> </tt>
<a name="L403"></a><tt class="py-lineno"> 403</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">exists</tt><tt class="py-op">(</tt><tt class="py-name">targetFile</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L404"></a><tt class="py-lineno"> 404</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">IOError</tt><tt class="py-op">(</tt><tt class="py-string">"Target file [%s] already exists."</tt> <tt class="py-op">%</tt> <tt class="py-name">targetFile</tt><tt class="py-op">)</tt> </tt>
<a name="L405"></a><tt class="py-lineno"> 405</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">sourceFile</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L406"></a><tt class="py-lineno"> 406</tt> <tt class="py-line"> <tt class="py-name">open</tt><tt class="py-op">(</tt><tt class="py-name">targetFile</tt><tt class="py-op">,</tt> <tt class="py-string">"w"</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">write</tt><tt class="py-op">(</tt><tt class="py-string">""</tt><tt class="py-op">)</tt> </tt>
<a name="L407"></a><tt class="py-lineno"> 407</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L408"></a><tt class="py-lineno"> 408</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">isfile</tt><tt class="py-op">(</tt><tt class="py-name">sourceFile</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">islink</tt><tt class="py-op">(</tt><tt class="py-name">sourceFile</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L409"></a><tt class="py-lineno"> 409</tt> <tt class="py-line"> <tt class="py-name">shutil</tt><tt class="py-op">.</tt><tt class="py-name">copy</tt><tt class="py-op">(</tt><tt class="py-name">sourceFile</tt><tt class="py-op">,</tt> <tt class="py-name">targetFile</tt><tt class="py-op">)</tt> </tt>
<a name="L410"></a><tt class="py-lineno"> 410</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L411"></a><tt class="py-lineno"> 411</tt> <tt class="py-line"> <tt id="link-89" class="py-name"><a title="CedarBackup2.actions.collect.logger
CedarBackup2.actions.initialize.logger
CedarBackup2.actions.purge.logger
CedarBackup2.actions.rebuild.logger
CedarBackup2.actions.stage.logger
CedarBackup2.actions.store.logger
CedarBackup2.actions.util.logger
CedarBackup2.actions.validate.logger
CedarBackup2.cli.logger
CedarBackup2.config.logger
CedarBackup2.customize.logger
CedarBackup2.extend.amazons3.logger
CedarBackup2.extend.capacity.logger
CedarBackup2.extend.encrypt.logger
CedarBackup2.extend.mbox.logger
CedarBackup2.extend.mysql.logger
CedarBackup2.extend.postgresql.logger
CedarBackup2.extend.split.logger
CedarBackup2.extend.subversion.logger
CedarBackup2.extend.sysinfo.logger
CedarBackup2.filesystem.logger
CedarBackup2.peer.logger
CedarBackup2.tools.amazons3.logger
CedarBackup2.tools.span.logger
CedarBackup2.util.logger
CedarBackup2.writers.cdwriter.logger
CedarBackup2.writers.dvdwriter.logger
CedarBackup2.writers.util.logger
CedarBackup2.xmlutil.logger" class="py-name" href="#" onclick="return doclink('link-89', 'logger', 'link-15');">logger</a></tt><tt class="py-op">.</tt><tt id="link-90" class="py-name"><a title="CedarBackup2.cli.Options.debug
CedarBackup2.tools.amazons3.Options.debug" class="py-name" href="#" onclick="return doclink('link-90', 'debug', 'link-45');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">"Source [%s] is not a regular file."</tt><tt class="py-op">,</tt> <tt class="py-name">sourceFile</tt><tt class="py-op">)</tt> </tt>
<a name="L412"></a><tt class="py-lineno"> 412</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">(</tt><tt class="py-string">"Source is not a regular file."</tt><tt class="py-op">)</tt> </tt>
<a name="L413"></a><tt class="py-lineno"> 413</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">ownership</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L414"></a><tt class="py-lineno"> 414</tt> <tt class="py-line"> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">chown</tt><tt class="py-op">(</tt><tt class="py-name">targetFile</tt><tt class="py-op">,</tt> <tt class="py-name">ownership</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">ownership</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L415"></a><tt class="py-lineno"> 415</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">permissions</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L416"></a><tt class="py-lineno"> 416</tt> <tt class="py-line"> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">chmod</tt><tt class="py-op">(</tt><tt class="py-name">targetFile</tt><tt class="py-op">,</tt> <tt class="py-name">permissions</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L417"></a><tt class="py-lineno"> 417</tt> <tt class="py-line"> </tt>
<a name="RemotePeer"></a><div id="RemotePeer-def"><a name="L418"></a><tt class="py-lineno"> 418</tt> <tt class="py-line"> </tt>
<a name="L419"></a><tt class="py-lineno"> 419</tt> <tt class="py-line"><tt class="py-comment">########################################################################</tt> </tt>
<a name="L420"></a><tt class="py-lineno"> 420</tt> <tt class="py-line"><tt class="py-comment"># RemotePeer class definition</tt> </tt>
<a name="L421"></a><tt class="py-lineno"> 421</tt> <tt class="py-line"><tt class="py-comment">########################################################################</tt> </tt>
<a name="L422"></a><tt class="py-lineno"> 422</tt> <tt class="py-line"> </tt>
<a name="L423"></a><tt class="py-lineno"> 423</tt> <a class="py-toggle" href="#" id="RemotePeer-toggle" onclick="return toggle('RemotePeer');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="CedarBackup2.peer.RemotePeer-class.html">RemotePeer</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="RemotePeer-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="RemotePeer-expanded"><a name="L424"></a><tt class="py-lineno"> 424</tt> <tt class="py-line"> </tt>
<a name="L425"></a><tt class="py-lineno"> 425</tt> <tt class="py-line"> <tt class="py-comment">######################</tt> </tt>
<a name="L426"></a><tt class="py-lineno"> 426</tt> <tt class="py-line"> <tt class="py-comment"># Class documentation</tt> </tt>
<a name="L427"></a><tt class="py-lineno"> 427</tt> <tt class="py-line"> <tt class="py-comment">######################</tt> </tt>
<a name="L428"></a><tt class="py-lineno"> 428</tt> <tt class="py-line"> </tt>
<a name="L429"></a><tt class="py-lineno"> 429</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
<a name="L430"></a><tt class="py-lineno"> 430</tt> <tt class="py-line"><tt class="py-docstring"> Backup peer representing a remote peer in a backup pool.</tt> </tt>
<a name="L431"></a><tt class="py-lineno"> 431</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L432"></a><tt class="py-lineno"> 432</tt> <tt class="py-line"><tt class="py-docstring"> This is a class representing a remote (networked) peer in a backup pool.</tt> </tt>
<a name="L433"></a><tt class="py-lineno"> 433</tt> <tt class="py-line"><tt class="py-docstring"> Remote peers are backed up using an rcp-compatible copy command. A remote</tt> </tt>
<a name="L434"></a><tt class="py-lineno"> 434</tt> <tt class="py-line"><tt class="py-docstring"> peer has associated with it a name (which must be a valid hostname), a</tt> </tt>
<a name="L435"></a><tt class="py-lineno"> 435</tt> <tt class="py-line"><tt class="py-docstring"> collect directory, a working directory and a copy method (an rcp-compatible</tt> </tt>
<a name="L436"></a><tt class="py-lineno"> 436</tt> <tt class="py-line"><tt class="py-docstring"> command).</tt> </tt>
<a name="L437"></a><tt class="py-lineno"> 437</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L438"></a><tt class="py-lineno"> 438</tt> <tt class="py-line"><tt class="py-docstring"> You can also set an optional local user value. This username will be used</tt> </tt>
<a name="L439"></a><tt class="py-lineno"> 439</tt> <tt class="py-line"><tt class="py-docstring"> as the local user for any remote copies that are required. It can only be</tt> </tt>
<a name="L440"></a><tt class="py-lineno"> 440</tt> <tt class="py-line"><tt class="py-docstring"> used if the root user is executing the backup. The root user will C{su} to</tt> </tt>
<a name="L441"></a><tt class="py-lineno"> 441</tt> <tt class="py-line"><tt class="py-docstring"> the local user and execute the remote copies as that user.</tt> </tt>
<a name="L442"></a><tt class="py-lineno"> 442</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L443"></a><tt class="py-lineno"> 443</tt> <tt class="py-line"><tt class="py-docstring"> The copy method is associated with the peer and not with the actual request</tt> </tt>
<a name="L444"></a><tt class="py-lineno"> 444</tt> <tt class="py-line"><tt class="py-docstring"> to copy, because we can envision that each remote host might have a</tt> </tt>
<a name="L445"></a><tt class="py-lineno"> 445</tt> <tt class="py-line"><tt class="py-docstring"> different connect method.</tt> </tt>
<a name="L446"></a><tt class="py-lineno"> 446</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L447"></a><tt class="py-lineno"> 447</tt> <tt class="py-line"><tt class="py-docstring"> The public methods other than the constructor are part of a "backup peer"</tt> </tt>
<a name="L448"></a><tt class="py-lineno"> 448</tt> <tt class="py-line"><tt class="py-docstring"> interface shared with the C{LocalPeer} class.</tt> </tt>
<a name="L449"></a><tt class="py-lineno"> 449</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L450"></a><tt class="py-lineno"> 450</tt> <tt class="py-line"><tt class="py-docstring"> @sort: __init__, stagePeer, checkCollectIndicator, writeStageIndicator,</tt> </tt>
<a name="L451"></a><tt class="py-lineno"> 451</tt> <tt class="py-line"><tt class="py-docstring"> executeRemoteCommand, executeManagedAction, _getDirContents,</tt> </tt>
<a name="L452"></a><tt class="py-lineno"> 452</tt> <tt class="py-line"><tt class="py-docstring"> _copyRemoteDir, _copyRemoteFile, _pushLocalFile, name, collectDir,</tt> </tt>
<a name="L453"></a><tt class="py-lineno"> 453</tt> <tt class="py-line"><tt class="py-docstring"> remoteUser, rcpCommand, rshCommand, cbackCommand</tt> </tt>
<a name="L454"></a><tt class="py-lineno"> 454</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="L455"></a><tt class="py-lineno"> 455</tt> <tt class="py-line"> </tt>
<a name="L456"></a><tt class="py-lineno"> 456</tt> <tt class="py-line"> <tt class="py-comment">##############</tt> </tt>
<a name="L457"></a><tt class="py-lineno"> 457</tt> <tt class="py-line"> <tt class="py-comment"># Constructor</tt> </tt>
<a name="L458"></a><tt class="py-lineno"> 458</tt> <tt class="py-line"> <tt class="py-comment">##############</tt> </tt>
<a name="L459"></a><tt class="py-lineno"> 459</tt> <tt class="py-line"> </tt>
<a name="RemotePeer.__init__"></a><div id="RemotePeer.__init__-def"><a name="L460"></a><tt class="py-lineno"> 460</tt> <a class="py-toggle" href="#" id="RemotePeer.__init__-toggle" onclick="return toggle('RemotePeer.__init__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="CedarBackup2.peer.RemotePeer-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">collectDir</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">workingDir</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">remoteUser</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L461"></a><tt class="py-lineno"> 461</tt> <tt class="py-line"> <tt class="py-param">rcpCommand</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">localUser</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">rshCommand</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">cbackCommand</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L462"></a><tt class="py-lineno"> 462</tt> <tt class="py-line"> <tt class="py-param">ignoreFailureMode</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="RemotePeer.__init__-collapsed" style="display:none;" pad="++++" indent="+++++++"></div><div id="RemotePeer.__init__-expanded"><a name="L463"></a><tt class="py-lineno"> 463</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
<a name="L464"></a><tt class="py-lineno"> 464</tt> <tt class="py-line"><tt class="py-docstring"> Initializes a remote backup peer.</tt> </tt>
<a name="L465"></a><tt class="py-lineno"> 465</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L466"></a><tt class="py-lineno"> 466</tt> <tt class="py-line"><tt class="py-docstring"> @note: If provided, each command will eventually be parsed into a list of</tt> </tt>
<a name="L467"></a><tt class="py-lineno"> 467</tt> <tt class="py-line"><tt class="py-docstring"> strings suitable for passing to C{util.executeCommand} in order to avoid</tt> </tt>
<a name="L468"></a><tt class="py-lineno"> 468</tt> <tt class="py-line"><tt class="py-docstring"> security holes related to shell interpolation. This parsing will be</tt> </tt>
<a name="L469"></a><tt class="py-lineno"> 469</tt> <tt class="py-line"><tt class="py-docstring"> done by the L{util.splitCommandLine} function. See the documentation for</tt> </tt>
<a name="L470"></a><tt class="py-lineno"> 470</tt> <tt class="py-line"><tt class="py-docstring"> that function for some important notes about its limitations.</tt> </tt>
<a name="L471"></a><tt class="py-lineno"> 471</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L472"></a><tt class="py-lineno"> 472</tt> <tt class="py-line"><tt class="py-docstring"> @param name: Name of the backup peer</tt> </tt>
<a name="L473"></a><tt class="py-lineno"> 473</tt> <tt class="py-line"><tt class="py-docstring"> @type name: String, must be a valid DNS hostname</tt> </tt>
<a name="L474"></a><tt class="py-lineno"> 474</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L475"></a><tt class="py-lineno"> 475</tt> <tt class="py-line"><tt class="py-docstring"> @param collectDir: Path to the peer's collect directory</tt> </tt>
<a name="L476"></a><tt class="py-lineno"> 476</tt> <tt class="py-line"><tt class="py-docstring"> @type collectDir: String representing an absolute path on the remote peer</tt> </tt>
<a name="L477"></a><tt class="py-lineno"> 477</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L478"></a><tt class="py-lineno"> 478</tt> <tt class="py-line"><tt class="py-docstring"> @param workingDir: Working directory that can be used to create temporary files, etc.</tt> </tt>
<a name="L479"></a><tt class="py-lineno"> 479</tt> <tt class="py-line"><tt class="py-docstring"> @type workingDir: String representing an absolute path on the current host.</tt> </tt>
<a name="L480"></a><tt class="py-lineno"> 480</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L481"></a><tt class="py-lineno"> 481</tt> <tt class="py-line"><tt class="py-docstring"> @param remoteUser: Name of the Cedar Backup user on the remote peer</tt> </tt>
<a name="L482"></a><tt class="py-lineno"> 482</tt> <tt class="py-line"><tt class="py-docstring"> @type remoteUser: String representing a username, valid via remote shell to the peer</tt> </tt>
<a name="L483"></a><tt class="py-lineno"> 483</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L484"></a><tt class="py-lineno"> 484</tt> <tt class="py-line"><tt class="py-docstring"> @param localUser: Name of the Cedar Backup user on the current host</tt> </tt>
<a name="L485"></a><tt class="py-lineno"> 485</tt> <tt class="py-line"><tt class="py-docstring"> @type localUser: String representing a username, valid on the current host</tt> </tt>
<a name="L486"></a><tt class="py-lineno"> 486</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L487"></a><tt class="py-lineno"> 487</tt> <tt class="py-line"><tt class="py-docstring"> @param rcpCommand: An rcp-compatible copy command to use for copying files from the peer</tt> </tt>
<a name="L488"></a><tt class="py-lineno"> 488</tt> <tt class="py-line"><tt class="py-docstring"> @type rcpCommand: String representing a system command including required arguments</tt> </tt>
<a name="L489"></a><tt class="py-lineno"> 489</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L490"></a><tt class="py-lineno"> 490</tt> <tt class="py-line"><tt class="py-docstring"> @param rshCommand: An rsh-compatible copy command to use for remote shells to the peer</tt> </tt>
<a name="L491"></a><tt class="py-lineno"> 491</tt> <tt class="py-line"><tt class="py-docstring"> @type rshCommand: String representing a system command including required arguments</tt> </tt>
<a name="L492"></a><tt class="py-lineno"> 492</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L493"></a><tt class="py-lineno"> 493</tt> <tt class="py-line"><tt class="py-docstring"> @param cbackCommand: A chack-compatible command to use for executing managed actions</tt> </tt>
<a name="L494"></a><tt class="py-lineno"> 494</tt> <tt class="py-line"><tt class="py-docstring"> @type cbackCommand: String representing a system command including required arguments</tt> </tt>
<a name="L495"></a><tt class="py-lineno"> 495</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L496"></a><tt class="py-lineno"> 496</tt> <tt class="py-line"><tt class="py-docstring"> @param ignoreFailureMode: Ignore failure mode for this peer</tt> </tt>
<a name="L497"></a><tt class="py-lineno"> 497</tt> <tt class="py-line"><tt class="py-docstring"> @type ignoreFailureMode: One of VALID_FAILURE_MODES</tt> </tt>
<a name="L498"></a><tt class="py-lineno"> 498</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L499"></a><tt class="py-lineno"> 499</tt> <tt class="py-line"><tt class="py-docstring"> @raise ValueError: If collect directory is not an absolute path</tt> </tt>
<a name="L500"></a><tt class="py-lineno"> 500</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="L501"></a><tt class="py-lineno"> 501</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_name</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L502"></a><tt class="py-lineno"> 502</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_collectDir</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L503"></a><tt class="py-lineno"> 503</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_workingDir</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L504"></a><tt class="py-lineno"> 504</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_remoteUser</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L505"></a><tt class="py-lineno"> 505</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_localUser</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L506"></a><tt class="py-lineno"> 506</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_rcpCommand</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L507"></a><tt class="py-lineno"> 507</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_rcpCommandList</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L508"></a><tt class="py-lineno"> 508</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_rshCommand</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L509"></a><tt class="py-lineno"> 509</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_rshCommandList</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L510"></a><tt class="py-lineno"> 510</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_cbackCommand</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L511"></a><tt class="py-lineno"> 511</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_ignoreFailureMode</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L512"></a><tt class="py-lineno"> 512</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-91" class="py-name"><a title="CedarBackup2.config.ExtendedAction.name
CedarBackup2.config.LocalPeer.name
CedarBackup2.config.RemotePeer.name
CedarBackup2.peer.LocalPeer.name
CedarBackup2.peer.RemotePeer.name
CedarBackup2.util.DirectedGraph.name" class="py-name" href="#" onclick="return doclink('link-91', 'name', 'link-22');">name</a></tt> <tt class="py-op">=</tt> <tt id="link-92" class="py-name"><a title="CedarBackup2.config.ExtendedAction.name
CedarBackup2.config.LocalPeer.name
CedarBackup2.config.RemotePeer.name
CedarBackup2.peer.LocalPeer.name
CedarBackup2.peer.RemotePeer.name
CedarBackup2.util.DirectedGraph.name" class="py-name" href="#" onclick="return doclink('link-92', 'name', 'link-22');">name</a></tt> </tt>
<a name="L513"></a><tt class="py-lineno"> 513</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-93" class="py-name"><a title="CedarBackup2.config.LocalPeer.collectDir
CedarBackup2.config.RemotePeer.collectDir
CedarBackup2.peer.LocalPeer.collectDir
CedarBackup2.peer.RemotePeer.collectDir" class="py-name" href="#" onclick="return doclink('link-93', 'collectDir', 'link-24');">collectDir</a></tt> <tt class="py-op">=</tt> <tt id="link-94" class="py-name"><a title="CedarBackup2.config.LocalPeer.collectDir
CedarBackup2.config.RemotePeer.collectDir
CedarBackup2.peer.LocalPeer.collectDir
CedarBackup2.peer.RemotePeer.collectDir" class="py-name" href="#" onclick="return doclink('link-94', 'collectDir', 'link-24');">collectDir</a></tt> </tt>
<a name="L514"></a><tt class="py-lineno"> 514</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-95" class="py-name" targets="Variable CedarBackup2.config.OptionsConfig.workingDir=CedarBackup2.config.OptionsConfig-class.html#workingDir,Variable CedarBackup2.peer.RemotePeer.workingDir=CedarBackup2.peer.RemotePeer-class.html#workingDir"><a title="CedarBackup2.config.OptionsConfig.workingDir
CedarBackup2.peer.RemotePeer.workingDir" class="py-name" href="#" onclick="return doclink('link-95', 'workingDir', 'link-95');">workingDir</a></tt> <tt class="py-op">=</tt> <tt id="link-96" class="py-name"><a title="CedarBackup2.config.OptionsConfig.workingDir
CedarBackup2.peer.RemotePeer.workingDir" class="py-name" href="#" onclick="return doclink('link-96', 'workingDir', 'link-95');">workingDir</a></tt> </tt>
<a name="L515"></a><tt class="py-lineno"> 515</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-97" class="py-name" targets="Variable CedarBackup2.config.RemotePeer.remoteUser=CedarBackup2.config.RemotePeer-class.html#remoteUser,Variable CedarBackup2.peer.RemotePeer.remoteUser=CedarBackup2.peer.RemotePeer-class.html#remoteUser"><a title="CedarBackup2.config.RemotePeer.remoteUser
CedarBackup2.peer.RemotePeer.remoteUser" class="py-name" href="#" onclick="return doclink('link-97', 'remoteUser', 'link-97');">remoteUser</a></tt> <tt class="py-op">=</tt> <tt id="link-98" class="py-name"><a title="CedarBackup2.config.RemotePeer.remoteUser
CedarBackup2.peer.RemotePeer.remoteUser" class="py-name" href="#" onclick="return doclink('link-98', 'remoteUser', 'link-97');">remoteUser</a></tt> </tt>
<a name="L516"></a><tt class="py-lineno"> 516</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-99" class="py-name" targets="Variable CedarBackup2.peer.RemotePeer.localUser=CedarBackup2.peer.RemotePeer-class.html#localUser"><a title="CedarBackup2.peer.RemotePeer.localUser" class="py-name" href="#" onclick="return doclink('link-99', 'localUser', 'link-99');">localUser</a></tt> <tt class="py-op">=</tt> <tt id="link-100" class="py-name"><a title="CedarBackup2.peer.RemotePeer.localUser" class="py-name" href="#" onclick="return doclink('link-100', 'localUser', 'link-99');">localUser</a></tt> </tt>
<a name="L517"></a><tt class="py-lineno"> 517</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-101" class="py-name" targets="Variable CedarBackup2.config.OptionsConfig.rcpCommand=CedarBackup2.config.OptionsConfig-class.html#rcpCommand,Variable CedarBackup2.config.RemotePeer.rcpCommand=CedarBackup2.config.RemotePeer-class.html#rcpCommand,Variable CedarBackup2.peer.RemotePeer.rcpCommand=CedarBackup2.peer.RemotePeer-class.html#rcpCommand"><a title="CedarBackup2.config.OptionsConfig.rcpCommand
CedarBackup2.config.RemotePeer.rcpCommand
CedarBackup2.peer.RemotePeer.rcpCommand" class="py-name" href="#" onclick="return doclink('link-101', 'rcpCommand', 'link-101');">rcpCommand</a></tt> <tt class="py-op">=</tt> <tt id="link-102" class="py-name"><a title="CedarBackup2.config.OptionsConfig.rcpCommand
CedarBackup2.config.RemotePeer.rcpCommand
CedarBackup2.peer.RemotePeer.rcpCommand" class="py-name" href="#" onclick="return doclink('link-102', 'rcpCommand', 'link-101');">rcpCommand</a></tt> </tt>
<a name="L518"></a><tt class="py-lineno"> 518</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-103" class="py-name" targets="Variable CedarBackup2.config.OptionsConfig.rshCommand=CedarBackup2.config.OptionsConfig-class.html#rshCommand,Variable CedarBackup2.config.RemotePeer.rshCommand=CedarBackup2.config.RemotePeer-class.html#rshCommand,Variable CedarBackup2.peer.RemotePeer.rshCommand=CedarBackup2.peer.RemotePeer-class.html#rshCommand"><a title="CedarBackup2.config.OptionsConfig.rshCommand
CedarBackup2.config.RemotePeer.rshCommand
CedarBackup2.peer.RemotePeer.rshCommand" class="py-name" href="#" onclick="return doclink('link-103', 'rshCommand', 'link-103');">rshCommand</a></tt> <tt class="py-op">=</tt> <tt id="link-104" class="py-name"><a title="CedarBackup2.config.OptionsConfig.rshCommand
CedarBackup2.config.RemotePeer.rshCommand
CedarBackup2.peer.RemotePeer.rshCommand" class="py-name" href="#" onclick="return doclink('link-104', 'rshCommand', 'link-103');">rshCommand</a></tt> </tt>
<a name="L519"></a><tt class="py-lineno"> 519</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-105" class="py-name" targets="Variable CedarBackup2.config.OptionsConfig.cbackCommand=CedarBackup2.config.OptionsConfig-class.html#cbackCommand,Variable CedarBackup2.config.RemotePeer.cbackCommand=CedarBackup2.config.RemotePeer-class.html#cbackCommand,Variable CedarBackup2.peer.RemotePeer.cbackCommand=CedarBackup2.peer.RemotePeer-class.html#cbackCommand"><a title="CedarBackup2.config.OptionsConfig.cbackCommand
CedarBackup2.config.RemotePeer.cbackCommand
CedarBackup2.peer.RemotePeer.cbackCommand" class="py-name" href="#" onclick="return doclink('link-105', 'cbackCommand', 'link-105');">cbackCommand</a></tt> <tt class="py-op">=</tt> <tt id="link-106" class="py-name"><a title="CedarBackup2.config.OptionsConfig.cbackCommand
CedarBackup2.config.RemotePeer.cbackCommand
CedarBackup2.peer.RemotePeer.cbackCommand" class="py-name" href="#" onclick="return doclink('link-106', 'cbackCommand', 'link-105');">cbackCommand</a></tt> </tt>
<a name="L520"></a><tt class="py-lineno"> 520</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-107" class="py-name"><a title="CedarBackup2.config.LocalPeer.ignoreFailureMode
CedarBackup2.config.RemotePeer.ignoreFailureMode
CedarBackup2.peer.LocalPeer.ignoreFailureMode
CedarBackup2.peer.RemotePeer.ignoreFailureMode" class="py-name" href="#" onclick="return doclink('link-107', 'ignoreFailureMode', 'link-26');">ignoreFailureMode</a></tt> <tt class="py-op">=</tt> <tt id="link-108" class="py-name"><a title="CedarBackup2.config.LocalPeer.ignoreFailureMode
CedarBackup2.config.RemotePeer.ignoreFailureMode
CedarBackup2.peer.LocalPeer.ignoreFailureMode
CedarBackup2.peer.RemotePeer.ignoreFailureMode" class="py-name" href="#" onclick="return doclink('link-108', 'ignoreFailureMode', 'link-26');">ignoreFailureMode</a></tt> </tt>
</div><a name="L521"></a><tt class="py-lineno"> 521</tt> <tt class="py-line"> </tt>
<a name="L522"></a><tt class="py-lineno"> 522</tt> <tt class="py-line"> </tt>
<a name="L523"></a><tt class="py-lineno"> 523</tt> <tt class="py-line"> <tt class="py-comment">#############</tt> </tt>
<a name="L524"></a><tt class="py-lineno"> 524</tt> <tt class="py-line"> <tt class="py-comment"># Properties</tt> </tt>
<a name="L525"></a><tt class="py-lineno"> 525</tt> <tt class="py-line"> <tt class="py-comment">#############</tt> </tt>
<a name="L526"></a><tt class="py-lineno"> 526</tt> <tt class="py-line"> </tt>
<a name="RemotePeer._setName"></a><div id="RemotePeer._setName-def"><a name="L527"></a><tt class="py-lineno"> 527</tt> <a class="py-toggle" href="#" id="RemotePeer._setName-toggle" onclick="return toggle('RemotePeer._setName');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="CedarBackup2.peer.RemotePeer-class.html#_setName">_setName</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="RemotePeer._setName-collapsed" style="display:none;" pad="++++" indent="+++++++"></div><div id="RemotePeer._setName-expanded"><a name="L528"></a><tt class="py-lineno"> 528</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
<a name="L529"></a><tt class="py-lineno"> 529</tt> <tt class="py-line"><tt class="py-docstring"> Property target used to set the peer name.</tt> </tt>
<a name="L530"></a><tt class="py-lineno"> 530</tt> <tt class="py-line"><tt class="py-docstring"> The value must be a non-empty string and cannot be C{None}.</tt> </tt>
<a name="L531"></a><tt class="py-lineno"> 531</tt> <tt class="py-line"><tt class="py-docstring"> @raise ValueError: If the value is an empty string or C{None}.</tt> </tt>
<a name="L532"></a><tt class="py-lineno"> 532</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="L533"></a><tt class="py-lineno"> 533</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">value</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt> <tt class="py-keyword">or</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> <tt class="py-op"><</tt> <tt class="py-number">1</tt><tt class="py-op">:</tt> </tt>
<a name="L534"></a><tt class="py-lineno"> 534</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">(</tt><tt class="py-string">"Peer name must be a non-empty string."</tt><tt class="py-op">)</tt> </tt>
<a name="L535"></a><tt class="py-lineno"> 535</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_name</tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt> </tt>
</div><a name="L536"></a><tt class="py-lineno"> 536</tt> <tt class="py-line"> </tt>
<a name="RemotePeer._getName"></a><div id="RemotePeer._getName-def"><a name="L537"></a><tt class="py-lineno"> 537</tt> <a class="py-toggle" href="#" id="RemotePeer._getName-toggle" onclick="return toggle('RemotePeer._getName');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="CedarBackup2.peer.RemotePeer-class.html#_getName">_getName</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="RemotePeer._getName-collapsed" style="display:none;" pad="++++" indent="+++++++"></div><div id="RemotePeer._getName-expanded"><a name="L538"></a><tt class="py-lineno"> 538</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
<a name="L539"></a><tt class="py-lineno"> 539</tt> <tt class="py-line"><tt class="py-docstring"> Property target used to get the peer name.</tt> </tt>
<a name="L540"></a><tt class="py-lineno"> 540</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="L541"></a><tt class="py-lineno"> 541</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_name</tt> </tt>
</div><a name="L542"></a><tt class="py-lineno"> 542</tt> <tt class="py-line"> </tt>
<a name="RemotePeer._setCollectDir"></a><div id="RemotePeer._setCollectDir-def"><a name="L543"></a><tt class="py-lineno"> 543</tt> <a class="py-toggle" href="#" id="RemotePeer._setCollectDir-toggle" onclick="return toggle('RemotePeer._setCollectDir');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="CedarBackup2.peer.RemotePeer-class.html#_setCollectDir">_setCollectDir</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="RemotePeer._setCollectDir-collapsed" style="display:none;" pad="++++" indent="+++++++"></div><div id="RemotePeer._setCollectDir-expanded"><a name="L544"></a><tt class="py-lineno"> 544</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
<a name="L545"></a><tt class="py-lineno"> 545</tt> <tt class="py-line"><tt class="py-docstring"> Property target used to set the collect directory.</tt> </tt>
<a name="L546"></a><tt class="py-lineno"> 546</tt> <tt class="py-line"><tt class="py-docstring"> The value must be an absolute path and cannot be C{None}.</tt> </tt>
<a name="L547"></a><tt class="py-lineno"> 547</tt> <tt class="py-line"><tt class="py-docstring"> It does not have to exist on disk at the time of assignment.</tt> </tt>
<a name="L548"></a><tt class="py-lineno"> 548</tt> <tt class="py-line"><tt class="py-docstring"> @raise ValueError: If the value is C{None} or is not an absolute path.</tt> </tt>
<a name="L549"></a><tt class="py-lineno"> 549</tt> <tt class="py-line"><tt class="py-docstring"> @raise ValueError: If the value cannot be encoded properly.</tt> </tt>
<a name="L550"></a><tt class="py-lineno"> 550</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="L551"></a><tt class="py-lineno"> 551</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">value</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L552"></a><tt class="py-lineno"> 552</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">isabs</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L553"></a><tt class="py-lineno"> 553</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">(</tt><tt class="py-string">"Collect directory must be an absolute path."</tt><tt class="py-op">)</tt> </tt>
<a name="L554"></a><tt class="py-lineno"> 554</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_collectDir</tt> <tt class="py-op">=</tt> <tt id="link-109" class="py-name"><a title="CedarBackup2.util.encodePath" class="py-name" href="#" onclick="return doclink('link-109', 'encodePath', 'link-11');">encodePath</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
</div><a name="L555"></a><tt class="py-lineno"> 555</tt> <tt class="py-line"> </tt>
<a name="RemotePeer._getCollectDir"></a><div id="RemotePeer._getCollectDir-def"><a name="L556"></a><tt class="py-lineno"> 556</tt> <a class="py-toggle" href="#" id="RemotePeer._getCollectDir-toggle" onclick="return toggle('RemotePeer._getCollectDir');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="CedarBackup2.peer.RemotePeer-class.html#_getCollectDir">_getCollectDir</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="RemotePeer._getCollectDir-collapsed" style="display:none;" pad="++++" indent="+++++++"></div><div id="RemotePeer._getCollectDir-expanded"><a name="L557"></a><tt class="py-lineno"> 557</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
<a name="L558"></a><tt class="py-lineno"> 558</tt> <tt class="py-line"><tt class="py-docstring"> Property target used to get the collect directory.</tt> </tt>
<a name="L559"></a><tt class="py-lineno"> 559</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="L560"></a><tt class="py-lineno"> 560</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_collectDir</tt> </tt>
</div><a name="L561"></a><tt class="py-lineno"> 561</tt> <tt class="py-line"> </tt>
<a name="RemotePeer._setWorkingDir"></a><div id="RemotePeer._setWorkingDir-def"><a name="L562"></a><tt class="py-lineno"> 562</tt> <a class="py-toggle" href="#" id="RemotePeer._setWorkingDir-toggle" onclick="return toggle('RemotePeer._setWorkingDir');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="CedarBackup2.peer.RemotePeer-class.html#_setWorkingDir">_setWorkingDir</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="RemotePeer._setWorkingDir-collapsed" style="display:none;" pad="++++" indent="+++++++"></div><div id="RemotePeer._setWorkingDir-expanded"><a name="L563"></a><tt class="py-lineno"> 563</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
<a name="L564"></a><tt class="py-lineno"> 564</tt> <tt class="py-line"><tt class="py-docstring"> Property target used to set the working directory.</tt> </tt>
<a name="L565"></a><tt class="py-lineno"> 565</tt> <tt class="py-line"><tt class="py-docstring"> The value must be an absolute path and cannot be C{None}.</tt> </tt>
<a name="L566"></a><tt class="py-lineno"> 566</tt> <tt class="py-line"><tt class="py-docstring"> @raise ValueError: If the value is C{None} or is not an absolute path.</tt> </tt>
<a name="L567"></a><tt class="py-lineno"> 567</tt> <tt class="py-line"><tt class="py-docstring"> @raise ValueError: If the value cannot be encoded properly.</tt> </tt>
<a name="L568"></a><tt class="py-lineno"> 568</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="L569"></a><tt class="py-lineno"> 569</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">value</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L570"></a><tt class="py-lineno"> 570</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">isabs</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L571"></a><tt class="py-lineno"> 571</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">(</tt><tt class="py-string">"Working directory must be an absolute path."</tt><tt class="py-op">)</tt> </tt>
<a name="L572"></a><tt class="py-lineno"> 572</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_workingDir</tt> <tt class="py-op">=</tt> <tt id="link-110" class="py-name"><a title="CedarBackup2.util.encodePath" class="py-name" href="#" onclick="return doclink('link-110', 'encodePath', 'link-11');">encodePath</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
</div><a name="L573"></a><tt class="py-lineno"> 573</tt> <tt class="py-line"> </tt>
<a name="RemotePeer._getWorkingDir"></a><div id="RemotePeer._getWorkingDir-def"><a name="L574"></a><tt class="py-lineno"> 574</tt> <a class="py-toggle" href="#" id="RemotePeer._getWorkingDir-toggle" onclick="return toggle('RemotePeer._getWorkingDir');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="CedarBackup2.peer.RemotePeer-class.html#_getWorkingDir">_getWorkingDir</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="RemotePeer._getWorkingDir-collapsed" style="display:none;" pad="++++" indent="+++++++"></div><div id="RemotePeer._getWorkingDir-expanded"><a name="L575"></a><tt class="py-lineno"> 575</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
<a name="L576"></a><tt class="py-lineno"> 576</tt> <tt class="py-line"><tt class="py-docstring"> Property target used to get the working directory.</tt> </tt>
<a name="L577"></a><tt class="py-lineno"> 577</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="L578"></a><tt class="py-lineno"> 578</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_workingDir</tt> </tt>
</div><a name="L579"></a><tt class="py-lineno"> 579</tt> <tt class="py-line"> </tt>
<a name="RemotePeer._setRemoteUser"></a><div id="RemotePeer._setRemoteUser-def"><a name="L580"></a><tt class="py-lineno"> 580</tt> <a class="py-toggle" href="#" id="RemotePeer._setRemoteUser-toggle" onclick="return toggle('RemotePeer._setRemoteUser');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="CedarBackup2.peer.RemotePeer-class.html#_setRemoteUser">_setRemoteUser</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="RemotePeer._setRemoteUser-collapsed" style="display:none;" pad="++++" indent="+++++++"></div><div id="RemotePeer._setRemoteUser-expanded"><a name="L581"></a><tt class="py-lineno"> 581</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
<a name="L582"></a><tt class="py-lineno"> 582</tt> <tt class="py-line"><tt class="py-docstring"> Property target used to set the remote user.</tt> </tt>
<a name="L583"></a><tt class="py-lineno"> 583</tt> <tt class="py-line"><tt class="py-docstring"> The value must be a non-empty string and cannot be C{None}.</tt> </tt>
<a name="L584"></a><tt class="py-lineno"> 584</tt> <tt class="py-line"><tt class="py-docstring"> @raise ValueError: If the value is an empty string or C{None}.</tt> </tt>
<a name="L585"></a><tt class="py-lineno"> 585</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="L586"></a><tt class="py-lineno"> 586</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">value</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt> <tt class="py-keyword">or</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> <tt class="py-op"><</tt> <tt class="py-number">1</tt><tt class="py-op">:</tt> </tt>
<a name="L587"></a><tt class="py-lineno"> 587</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">(</tt><tt class="py-string">"Peer remote user must be a non-empty string."</tt><tt class="py-op">)</tt> </tt>
<a name="L588"></a><tt class="py-lineno"> 588</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_remoteUser</tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt> </tt>
</div><a name="L589"></a><tt class="py-lineno"> 589</tt> <tt class="py-line"> </tt>
<a name="RemotePeer._getRemoteUser"></a><div id="RemotePeer._getRemoteUser-def"><a name="L590"></a><tt class="py-lineno"> 590</tt> <a class="py-toggle" href="#" id="RemotePeer._getRemoteUser-toggle" onclick="return toggle('RemotePeer._getRemoteUser');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="CedarBackup2.peer.RemotePeer-class.html#_getRemoteUser">_getRemoteUser</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="RemotePeer._getRemoteUser-collapsed" style="display:none;" pad="++++" indent="+++++++"></div><div id="RemotePeer._getRemoteUser-expanded"><a name="L591"></a><tt class="py-lineno"> 591</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
<a name="L592"></a><tt class="py-lineno"> 592</tt> <tt class="py-line"><tt class="py-docstring"> Property target used to get the remote user.</tt> </tt>
<a name="L593"></a><tt class="py-lineno"> 593</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="L594"></a><tt class="py-lineno"> 594</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_remoteUser</tt> </tt>
</div><a name="L595"></a><tt class="py-lineno"> 595</tt> <tt class="py-line"> </tt>
<a name="RemotePeer._setLocalUser"></a><div id="RemotePeer._setLocalUser-def"><a name="L596"></a><tt class="py-lineno"> 596</tt> <a class="py-toggle" href="#" id="RemotePeer._setLocalUser-toggle" onclick="return toggle('RemotePeer._setLocalUser');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="CedarBackup2.peer.RemotePeer-class.html#_setLocalUser">_setLocalUser</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="RemotePeer._setLocalUser-collapsed" style="display:none;" pad="++++" indent="+++++++"></div><div id="RemotePeer._setLocalUser-expanded"><a name="L597"></a><tt class="py-lineno"> 597</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
<a name="L598"></a><tt class="py-lineno"> 598</tt> <tt class="py-line"><tt class="py-docstring"> Property target used to set the local user.</tt> </tt>
<a name="L599"></a><tt class="py-lineno"> 599</tt> <tt class="py-line"><tt class="py-docstring"> The value must be a non-empty string if it is not C{None}.</tt> </tt>
<a name="L600"></a><tt class="py-lineno"> 600</tt> <tt class="py-line"><tt class="py-docstring"> @raise ValueError: If the value is an empty string.</tt> </tt>
<a name="L601"></a><tt class="py-lineno"> 601</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="L602"></a><tt class="py-lineno"> 602</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">value</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L603"></a><tt class="py-lineno"> 603</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> <tt class="py-op"><</tt> <tt class="py-number">1</tt><tt class="py-op">:</tt> </tt>
<a name="L604"></a><tt class="py-lineno"> 604</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">(</tt><tt class="py-string">"Peer local user must be a non-empty string."</tt><tt class="py-op">)</tt> </tt>
<a name="L605"></a><tt class="py-lineno"> 605</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_localUser</tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt> </tt>
</div><a name="L606"></a><tt class="py-lineno"> 606</tt> <tt class="py-line"> </tt>
<a name="RemotePeer._getLocalUser"></a><div id="RemotePeer._getLocalUser-def"><a name="L607"></a><tt class="py-lineno"> 607</tt> <a class="py-toggle" href="#" id="RemotePeer._getLocalUser-toggle" onclick="return toggle('RemotePeer._getLocalUser');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="CedarBackup2.peer.RemotePeer-class.html#_getLocalUser">_getLocalUser</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="RemotePeer._getLocalUser-collapsed" style="display:none;" pad="++++" indent="+++++++"></div><div id="RemotePeer._getLocalUser-expanded"><a name="L608"></a><tt class="py-lineno"> 608</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
<a name="L609"></a><tt class="py-lineno"> 609</tt> <tt class="py-line"><tt class="py-docstring"> Property target used to get the local user.</tt> </tt>
<a name="L610"></a><tt class="py-lineno"> 610</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="L611"></a><tt class="py-lineno"> 611</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_localUser</tt> </tt>
</div><a name="L612"></a><tt class="py-lineno"> 612</tt> <tt class="py-line"> </tt>
<a name="RemotePeer._setRcpCommand"></a><div id="RemotePeer._setRcpCommand-def"><a name="L613"></a><tt class="py-lineno"> 613</tt> <a class="py-toggle" href="#" id="RemotePeer._setRcpCommand-toggle" onclick="return toggle('RemotePeer._setRcpCommand');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="CedarBackup2.peer.RemotePeer-class.html#_setRcpCommand">_setRcpCommand</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="RemotePeer._setRcpCommand-collapsed" style="display:none;" pad="++++" indent="+++++++"></div><div id="RemotePeer._setRcpCommand-expanded"><a name="L614"></a><tt class="py-lineno"> 614</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
<a name="L615"></a><tt class="py-lineno"> 615</tt> <tt class="py-line"><tt class="py-docstring"> Property target to set the rcp command.</tt> </tt>
<a name="L616"></a><tt class="py-lineno"> 616</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L617"></a><tt class="py-lineno"> 617</tt> <tt class="py-line"><tt class="py-docstring"> The value must be a non-empty string or C{None}. Its value is stored in</tt> </tt>
<a name="L618"></a><tt class="py-lineno"> 618</tt> <tt class="py-line"><tt class="py-docstring"> the two forms: "raw" as provided by the client, and "parsed" into a list</tt> </tt>
<a name="L619"></a><tt class="py-lineno"> 619</tt> <tt class="py-line"><tt class="py-docstring"> suitable for being passed to L{util.executeCommand} via</tt> </tt>
<a name="L620"></a><tt class="py-lineno"> 620</tt> <tt class="py-line"><tt class="py-docstring"> L{util.splitCommandLine}.</tt> </tt>
<a name="L621"></a><tt class="py-lineno"> 621</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L622"></a><tt class="py-lineno"> 622</tt> <tt class="py-line"><tt class="py-docstring"> However, all the caller will ever see via the property is the actual</tt> </tt>
<a name="L623"></a><tt class="py-lineno"> 623</tt> <tt class="py-line"><tt class="py-docstring"> value they set (which includes seeing C{None}, even if we translate that</tt> </tt>
<a name="L624"></a><tt class="py-lineno"> 624</tt> <tt class="py-line"><tt class="py-docstring"> internally to C{DEF_RCP_COMMAND}). Internally, we should always use</tt> </tt>
<a name="L625"></a><tt class="py-lineno"> 625</tt> <tt class="py-line"><tt class="py-docstring"> C{self._rcpCommandList} if we want the actual command list.</tt> </tt>
<a name="L626"></a><tt class="py-lineno"> 626</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L627"></a><tt class="py-lineno"> 627</tt> <tt class="py-line"><tt class="py-docstring"> @raise ValueError: If the value is an empty string.</tt> </tt>
<a name="L628"></a><tt class="py-lineno"> 628</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="L629"></a><tt class="py-lineno"> 629</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">value</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L630"></a><tt class="py-lineno"> 630</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_rcpCommand</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L631"></a><tt class="py-lineno"> 631</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_rcpCommandList</tt> <tt class="py-op">=</tt> <tt id="link-111" class="py-name"><a title="CedarBackup2.peer.DEF_RCP_COMMAND" class="py-name" href="#" onclick="return doclink('link-111', 'DEF_RCP_COMMAND', 'link-16');">DEF_RCP_COMMAND</a></tt> </tt>
<a name="L632"></a><tt class="py-lineno"> 632</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L633"></a><tt class="py-lineno"> 633</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> <tt class="py-op">>=</tt> <tt class="py-number">1</tt><tt class="py-op">:</tt> </tt>
<a name="L634"></a><tt class="py-lineno"> 634</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_rcpCommand</tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt> </tt>
<a name="L635"></a><tt class="py-lineno"> 635</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_rcpCommandList</tt> <tt class="py-op">=</tt> <tt id="link-112" class="py-name"><a title="CedarBackup2.util.splitCommandLine" class="py-name" href="#" onclick="return doclink('link-112', 'splitCommandLine', 'link-10');">splitCommandLine</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_rcpCommand</tt><tt class="py-op">)</tt> </tt>
<a name="L636"></a><tt class="py-lineno"> 636</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L637"></a><tt class="py-lineno"> 637</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">(</tt><tt class="py-string">"The rcp command must be a non-empty string."</tt><tt class="py-op">)</tt> </tt>
</div><a name="L638"></a><tt class="py-lineno"> 638</tt> <tt class="py-line"> </tt>
<a name="RemotePeer._getRcpCommand"></a><div id="RemotePeer._getRcpCommand-def"><a name="L639"></a><tt class="py-lineno"> 639</tt> <a class="py-toggle" href="#" id="RemotePeer._getRcpCommand-toggle" onclick="return toggle('RemotePeer._getRcpCommand');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="CedarBackup2.peer.RemotePeer-class.html#_getRcpCommand">_getRcpCommand</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="RemotePeer._getRcpCommand-collapsed" style="display:none;" pad="++++" indent="+++++++"></div><div id="RemotePeer._getRcpCommand-expanded"><a name="L640"></a><tt class="py-lineno"> 640</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
<a name="L641"></a><tt class="py-lineno"> 641</tt> <tt class="py-line"><tt class="py-docstring"> Property target used to get the rcp command.</tt> </tt>
<a name="L642"></a><tt class="py-lineno"> 642</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="L643"></a><tt class="py-lineno"> 643</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_rcpCommand</tt> </tt>
</div><a name="L644"></a><tt class="py-lineno"> 644</tt> <tt class="py-line"> </tt>
<a name="RemotePeer._setRshCommand"></a><div id="RemotePeer._setRshCommand-def"><a name="L645"></a><tt class="py-lineno"> 645</tt> <a class="py-toggle" href="#" id="RemotePeer._setRshCommand-toggle" onclick="return toggle('RemotePeer._setRshCommand');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="CedarBackup2.peer.RemotePeer-class.html#_setRshCommand">_setRshCommand</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="RemotePeer._setRshCommand-collapsed" style="display:none;" pad="++++" indent="+++++++"></div><div id="RemotePeer._setRshCommand-expanded"><a name="L646"></a><tt class="py-lineno"> 646</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
<a name="L647"></a><tt class="py-lineno"> 647</tt> <tt class="py-line"><tt class="py-docstring"> Property target to set the rsh command.</tt> </tt>
<a name="L648"></a><tt class="py-lineno"> 648</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L649"></a><tt class="py-lineno"> 649</tt> <tt class="py-line"><tt class="py-docstring"> The value must be a non-empty string or C{None}. Its value is stored in</tt> </tt>
<a name="L650"></a><tt class="py-lineno"> 650</tt> <tt class="py-line"><tt class="py-docstring"> the two forms: "raw" as provided by the client, and "parsed" into a list</tt> </tt>
<a name="L651"></a><tt class="py-lineno"> 651</tt> <tt class="py-line"><tt class="py-docstring"> suitable for being passed to L{util.executeCommand} via</tt> </tt>
<a name="L652"></a><tt class="py-lineno"> 652</tt> <tt class="py-line"><tt class="py-docstring"> L{util.splitCommandLine}.</tt> </tt>
<a name="L653"></a><tt class="py-lineno"> 653</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L654"></a><tt class="py-lineno"> 654</tt> <tt class="py-line"><tt class="py-docstring"> However, all the caller will ever see via the property is the actual</tt> </tt>
<a name="L655"></a><tt class="py-lineno"> 655</tt> <tt class="py-line"><tt class="py-docstring"> value they set (which includes seeing C{None}, even if we translate that</tt> </tt>
<a name="L656"></a><tt class="py-lineno"> 656</tt> <tt class="py-line"><tt class="py-docstring"> internally to C{DEF_RSH_COMMAND}). Internally, we should always use</tt> </tt>
<a name="L657"></a><tt class="py-lineno"> 657</tt> <tt class="py-line"><tt class="py-docstring"> C{self._rshCommandList} if we want the actual command list.</tt> </tt>
<a name="L658"></a><tt class="py-lineno"> 658</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L659"></a><tt class="py-lineno"> 659</tt> <tt class="py-line"><tt class="py-docstring"> @raise ValueError: If the value is an empty string.</tt> </tt>
<a name="L660"></a><tt class="py-lineno"> 660</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="L661"></a><tt class="py-lineno"> 661</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">value</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L662"></a><tt class="py-lineno"> 662</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_rshCommand</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L663"></a><tt class="py-lineno"> 663</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_rshCommandList</tt> <tt class="py-op">=</tt> <tt id="link-113" class="py-name"><a title="CedarBackup2.peer.DEF_RSH_COMMAND" class="py-name" href="#" onclick="return doclink('link-113', 'DEF_RSH_COMMAND', 'link-17');">DEF_RSH_COMMAND</a></tt> </tt>
<a name="L664"></a><tt class="py-lineno"> 664</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L665"></a><tt class="py-lineno"> 665</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> <tt class="py-op">>=</tt> <tt class="py-number">1</tt><tt class="py-op">:</tt> </tt>
<a name="L666"></a><tt class="py-lineno"> 666</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_rshCommand</tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt> </tt>
<a name="L667"></a><tt class="py-lineno"> 667</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_rshCommandList</tt> <tt class="py-op">=</tt> <tt id="link-114" class="py-name"><a title="CedarBackup2.util.splitCommandLine" class="py-name" href="#" onclick="return doclink('link-114', 'splitCommandLine', 'link-10');">splitCommandLine</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_rshCommand</tt><tt class="py-op">)</tt> </tt>
<a name="L668"></a><tt class="py-lineno"> 668</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L669"></a><tt class="py-lineno"> 669</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">(</tt><tt class="py-string">"The rsh command must be a non-empty string."</tt><tt class="py-op">)</tt> </tt>
</div><a name="L670"></a><tt class="py-lineno"> 670</tt> <tt class="py-line"> </tt>
<a name="RemotePeer._getRshCommand"></a><div id="RemotePeer._getRshCommand-def"><a name="L671"></a><tt class="py-lineno"> 671</tt> <a class="py-toggle" href="#" id="RemotePeer._getRshCommand-toggle" onclick="return toggle('RemotePeer._getRshCommand');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="CedarBackup2.peer.RemotePeer-class.html#_getRshCommand">_getRshCommand</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="RemotePeer._getRshCommand-collapsed" style="display:none;" pad="++++" indent="+++++++"></div><div id="RemotePeer._getRshCommand-expanded"><a name="L672"></a><tt class="py-lineno"> 672</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
<a name="L673"></a><tt class="py-lineno"> 673</tt> <tt class="py-line"><tt class="py-docstring"> Property target used to get the rsh command.</tt> </tt>
<a name="L674"></a><tt class="py-lineno"> 674</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="L675"></a><tt class="py-lineno"> 675</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_rshCommand</tt> </tt>
</div><a name="L676"></a><tt class="py-lineno"> 676</tt> <tt class="py-line"> </tt>
<a name="RemotePeer._setCbackCommand"></a><div id="RemotePeer._setCbackCommand-def"><a name="L677"></a><tt class="py-lineno"> 677</tt> <a class="py-toggle" href="#" id="RemotePeer._setCbackCommand-toggle" onclick="return toggle('RemotePeer._setCbackCommand');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="CedarBackup2.peer.RemotePeer-class.html#_setCbackCommand">_setCbackCommand</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="RemotePeer._setCbackCommand-collapsed" style="display:none;" pad="++++" indent="+++++++"></div><div id="RemotePeer._setCbackCommand-expanded"><a name="L678"></a><tt class="py-lineno"> 678</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
<a name="L679"></a><tt class="py-lineno"> 679</tt> <tt class="py-line"><tt class="py-docstring"> Property target to set the cback command.</tt> </tt>
<a name="L680"></a><tt class="py-lineno"> 680</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L681"></a><tt class="py-lineno"> 681</tt> <tt class="py-line"><tt class="py-docstring"> The value must be a non-empty string or C{None}. Unlike the other</tt> </tt>
<a name="L682"></a><tt class="py-lineno"> 682</tt> <tt class="py-line"><tt class="py-docstring"> command, this value is only stored in the "raw" form provided by the</tt> </tt>
<a name="L683"></a><tt class="py-lineno"> 683</tt> <tt class="py-line"><tt class="py-docstring"> client.</tt> </tt>
<a name="L684"></a><tt class="py-lineno"> 684</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L685"></a><tt class="py-lineno"> 685</tt> <tt class="py-line"><tt class="py-docstring"> @raise ValueError: If the value is an empty string.</tt> </tt>
<a name="L686"></a><tt class="py-lineno"> 686</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="L687"></a><tt class="py-lineno"> 687</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">value</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L688"></a><tt class="py-lineno"> 688</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_cbackCommand</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L689"></a><tt class="py-lineno"> 689</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L690"></a><tt class="py-lineno"> 690</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> <tt class="py-op">>=</tt> <tt class="py-number">1</tt><tt class="py-op">:</tt> </tt>
<a name="L691"></a><tt class="py-lineno"> 691</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_cbackCommand</tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt> </tt>
<a name="L692"></a><tt class="py-lineno"> 692</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L693"></a><tt class="py-lineno"> 693</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">(</tt><tt class="py-string">"The cback command must be a non-empty string."</tt><tt class="py-op">)</tt> </tt>
</div><a name="L694"></a><tt class="py-lineno"> 694</tt> <tt class="py-line"> </tt>
<a name="RemotePeer._getCbackCommand"></a><div id="RemotePeer._getCbackCommand-def"><a name="L695"></a><tt class="py-lineno"> 695</tt> <a class="py-toggle" href="#" id="RemotePeer._getCbackCommand-toggle" onclick="return toggle('RemotePeer._getCbackCommand');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="CedarBackup2.peer.RemotePeer-class.html#_getCbackCommand">_getCbackCommand</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="RemotePeer._getCbackCommand-collapsed" style="display:none;" pad="++++" indent="+++++++"></div><div id="RemotePeer._getCbackCommand-expanded"><a name="L696"></a><tt class="py-lineno"> 696</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
<a name="L697"></a><tt class="py-lineno"> 697</tt> <tt class="py-line"><tt class="py-docstring"> Property target used to get the cback command.</tt> </tt>
<a name="L698"></a><tt class="py-lineno"> 698</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="L699"></a><tt class="py-lineno"> 699</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_cbackCommand</tt> </tt>
</div><a name="L700"></a><tt class="py-lineno"> 700</tt> <tt class="py-line"> </tt>
<a name="RemotePeer._setIgnoreFailureMode"></a><div id="RemotePeer._setIgnoreFailureMode-def"><a name="L701"></a><tt class="py-lineno"> 701</tt> <a class="py-toggle" href="#" id="RemotePeer._setIgnoreFailureMode-toggle" onclick="return toggle('RemotePeer._setIgnoreFailureMode');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="CedarBackup2.peer.RemotePeer-class.html#_setIgnoreFailureMode">_setIgnoreFailureMode</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="RemotePeer._setIgnoreFailureMode-collapsed" style="display:none;" pad="++++" indent="+++++++"></div><div id="RemotePeer._setIgnoreFailureMode-expanded"><a name="L702"></a><tt class="py-lineno"> 702</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
<a name="L703"></a><tt class="py-lineno"> 703</tt> <tt class="py-line"><tt class="py-docstring"> Property target used to set the ignoreFailure mode.</tt> </tt>
<a name="L704"></a><tt class="py-lineno"> 704</tt> <tt class="py-line"><tt class="py-docstring"> If not C{None}, the mode must be one of the values in L{VALID_FAILURE_MODES}.</tt> </tt>
<a name="L705"></a><tt class="py-lineno"> 705</tt> <tt class="py-line"><tt class="py-docstring"> @raise ValueError: If the value is not valid.</tt> </tt>
<a name="L706"></a><tt class="py-lineno"> 706</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="L707"></a><tt class="py-lineno"> 707</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">value</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L708"></a><tt class="py-lineno"> 708</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">value</tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt id="link-115" class="py-name"><a title="CedarBackup2.config.VALID_FAILURE_MODES" class="py-name" href="#" onclick="return doclink('link-115', 'VALID_FAILURE_MODES', 'link-14');">VALID_FAILURE_MODES</a></tt><tt class="py-op">:</tt> </tt>
<a name="L709"></a><tt class="py-lineno"> 709</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">(</tt><tt class="py-string">"Ignore failure mode must be one of %s."</tt> <tt class="py-op">%</tt> <tt id="link-116" class="py-name"><a title="CedarBackup2.config.VALID_FAILURE_MODES" class="py-name" href="#" onclick="return doclink('link-116', 'VALID_FAILURE_MODES', 'link-14');">VALID_FAILURE_MODES</a></tt><tt class="py-op">)</tt> </tt>
<a name="L710"></a><tt class="py-lineno"> 710</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_ignoreFailureMode</tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt> </tt>
</div><a name="L711"></a><tt class="py-lineno"> 711</tt> <tt class="py-line"> </tt>
<a name="RemotePeer._getIgnoreFailureMode"></a><div id="RemotePeer._getIgnoreFailureMode-def"><a name="L712"></a><tt class="py-lineno"> 712</tt> <a class="py-toggle" href="#" id="RemotePeer._getIgnoreFailureMode-toggle" onclick="return toggle('RemotePeer._getIgnoreFailureMode');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="CedarBackup2.peer.RemotePeer-class.html#_getIgnoreFailureMode">_getIgnoreFailureMode</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="RemotePeer._getIgnoreFailureMode-collapsed" style="display:none;" pad="++++" indent="+++++++"></div><div id="RemotePeer._getIgnoreFailureMode-expanded"><a name="L713"></a><tt class="py-lineno"> 713</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
<a name="L714"></a><tt class="py-lineno"> 714</tt> <tt class="py-line"><tt class="py-docstring"> Property target used to get the ignoreFailure mode.</tt> </tt>
<a name="L715"></a><tt class="py-lineno"> 715</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="L716"></a><tt class="py-lineno"> 716</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_ignoreFailureMode</tt> </tt>
</div><a name="L717"></a><tt class="py-lineno"> 717</tt> <tt class="py-line"> </tt>
<a name="L718"></a><tt class="py-lineno"> 718</tt> <tt class="py-line"> <tt id="link-117" class="py-name"><a title="CedarBackup2.config.ExtendedAction.name
CedarBackup2.config.LocalPeer.name
CedarBackup2.config.RemotePeer.name
CedarBackup2.peer.LocalPeer.name
CedarBackup2.peer.RemotePeer.name
CedarBackup2.util.DirectedGraph.name" class="py-name" href="#" onclick="return doclink('link-117', 'name', 'link-22');">name</a></tt> <tt class="py-op">=</tt> <tt class="py-name">property</tt><tt class="py-op">(</tt><tt id="link-118" class="py-name"><a title="CedarBackup2.config.ExtendedAction._getName
CedarBackup2.config.LocalPeer._getName
CedarBackup2.config.RemotePeer._getName
CedarBackup2.peer.LocalPeer._getName
CedarBackup2.peer.RemotePeer._getName
CedarBackup2.util.DirectedGraph._getName" class="py-name" href="#" onclick="return doclink('link-118', '_getName', 'link-32');">_getName</a></tt><tt class="py-op">,</tt> <tt id="link-119" class="py-name"><a title="CedarBackup2.config.ExtendedAction._setName
CedarBackup2.config.LocalPeer._setName
CedarBackup2.config.RemotePeer._setName
CedarBackup2.peer.LocalPeer._setName
CedarBackup2.peer.RemotePeer._setName" class="py-name" href="#" onclick="return doclink('link-119', '_setName', 'link-33');">_setName</a></tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-string">"Name of the peer (a valid DNS hostname)."</tt><tt class="py-op">)</tt> </tt>
<a name="L719"></a><tt class="py-lineno"> 719</tt> <tt class="py-line"> <tt id="link-120" class="py-name"><a title="CedarBackup2.config.LocalPeer.collectDir
CedarBackup2.config.RemotePeer.collectDir
CedarBackup2.peer.LocalPeer.collectDir
CedarBackup2.peer.RemotePeer.collectDir" class="py-name" href="#" onclick="return doclink('link-120', 'collectDir', 'link-24');">collectDir</a></tt> <tt class="py-op">=</tt> <tt class="py-name">property</tt><tt class="py-op">(</tt><tt id="link-121" class="py-name"><a title="CedarBackup2.config.LocalPeer._getCollectDir
CedarBackup2.config.RemotePeer._getCollectDir
CedarBackup2.peer.LocalPeer._getCollectDir
CedarBackup2.peer.RemotePeer._getCollectDir" class="py-name" href="#" onclick="return doclink('link-121', '_getCollectDir', 'link-35');">_getCollectDir</a></tt><tt class="py-op">,</tt> <tt id="link-122" class="py-name"><a title="CedarBackup2.config.LocalPeer._setCollectDir
CedarBackup2.config.RemotePeer._setCollectDir
CedarBackup2.peer.LocalPeer._setCollectDir
CedarBackup2.peer.RemotePeer._setCollectDir" class="py-name" href="#" onclick="return doclink('link-122', '_setCollectDir', 'link-36');">_setCollectDir</a></tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-string">"Path to the peer's collect directory (an absolute local path)."</tt><tt class="py-op">)</tt> </tt>
<a name="L720"></a><tt class="py-lineno"> 720</tt> <tt class="py-line"> <tt id="link-123" class="py-name"><a title="CedarBackup2.config.OptionsConfig.workingDir
CedarBackup2.peer.RemotePeer.workingDir" class="py-name" href="#" onclick="return doclink('link-123', 'workingDir', 'link-95');">workingDir</a></tt> <tt class="py-op">=</tt> <tt class="py-name">property</tt><tt class="py-op">(</tt><tt id="link-124" class="py-name" targets="Method CedarBackup2.config.OptionsConfig._getWorkingDir()=CedarBackup2.config.OptionsConfig-class.html#_getWorkingDir,Method CedarBackup2.peer.RemotePeer._getWorkingDir()=CedarBackup2.peer.RemotePeer-class.html#_getWorkingDir"><a title="CedarBackup2.config.OptionsConfig._getWorkingDir
CedarBackup2.peer.RemotePeer._getWorkingDir" class="py-name" href="#" onclick="return doclink('link-124', '_getWorkingDir', 'link-124');">_getWorkingDir</a></tt><tt class="py-op">,</tt> <tt id="link-125" class="py-name" targets="Method CedarBackup2.config.OptionsConfig._setWorkingDir()=CedarBackup2.config.OptionsConfig-class.html#_setWorkingDir,Method CedarBackup2.peer.RemotePeer._setWorkingDir()=CedarBackup2.peer.RemotePeer-class.html#_setWorkingDir"><a title="CedarBackup2.config.OptionsConfig._setWorkingDir
CedarBackup2.peer.RemotePeer._setWorkingDir" class="py-name" href="#" onclick="return doclink('link-125', '_setWorkingDir', 'link-125');">_setWorkingDir</a></tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-string">"Path to the peer's working directory (an absolute local path)."</tt><tt class="py-op">)</tt> </tt>
<a name="L721"></a><tt class="py-lineno"> 721</tt> <tt class="py-line"> <tt id="link-126" class="py-name"><a title="CedarBackup2.config.RemotePeer.remoteUser
CedarBackup2.peer.RemotePeer.remoteUser" class="py-name" href="#" onclick="return doclink('link-126', 'remoteUser', 'link-97');">remoteUser</a></tt> <tt class="py-op">=</tt> <tt class="py-name">property</tt><tt class="py-op">(</tt><tt id="link-127" class="py-name" targets="Function CedarBackup2.actions.stage._getRemoteUser()=CedarBackup2.actions.stage-module.html#_getRemoteUser,Static Method CedarBackup2.cli._ActionSet._getRemoteUser()=CedarBackup2.cli._ActionSet-class.html#_getRemoteUser,Method CedarBackup2.config.RemotePeer._getRemoteUser()=CedarBackup2.config.RemotePeer-class.html#_getRemoteUser,Method CedarBackup2.peer.RemotePeer._getRemoteUser()=CedarBackup2.peer.RemotePeer-class.html#_getRemoteUser"><a title="CedarBackup2.actions.stage._getRemoteUser
CedarBackup2.cli._ActionSet._getRemoteUser
CedarBackup2.config.RemotePeer._getRemoteUser
CedarBackup2.peer.RemotePeer._getRemoteUser" class="py-name" href="#" onclick="return doclink('link-127', '_getRemoteUser', 'link-127');">_getRemoteUser</a></tt><tt class="py-op">,</tt> <tt id="link-128" class="py-name" targets="Method CedarBackup2.config.RemotePeer._setRemoteUser()=CedarBackup2.config.RemotePeer-class.html#_setRemoteUser,Method CedarBackup2.peer.RemotePeer._setRemoteUser()=CedarBackup2.peer.RemotePeer-class.html#_setRemoteUser"><a title="CedarBackup2.config.RemotePeer._setRemoteUser
CedarBackup2.peer.RemotePeer._setRemoteUser" class="py-name" href="#" onclick="return doclink('link-128', '_setRemoteUser', 'link-128');">_setRemoteUser</a></tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-string">"Name of the Cedar Backup user on the remote peer."</tt><tt class="py-op">)</tt> </tt>
<a name="L722"></a><tt class="py-lineno"> 722</tt> <tt class="py-line"> <tt id="link-129" class="py-name"><a title="CedarBackup2.peer.RemotePeer.localUser" class="py-name" href="#" onclick="return doclink('link-129', 'localUser', 'link-99');">localUser</a></tt> <tt class="py-op">=</tt> <tt class="py-name">property</tt><tt class="py-op">(</tt><tt id="link-130" class="py-name" targets="Function CedarBackup2.actions.stage._getLocalUser()=CedarBackup2.actions.stage-module.html#_getLocalUser,Method CedarBackup2.peer.RemotePeer._getLocalUser()=CedarBackup2.peer.RemotePeer-class.html#_getLocalUser"><a title="CedarBackup2.actions.stage._getLocalUser
CedarBackup2.peer.RemotePeer._getLocalUser" class="py-name" href="#" onclick="return doclink('link-130', '_getLocalUser', 'link-130');">_getLocalUser</a></tt><tt class="py-op">,</tt> <tt id="link-131" class="py-name" targets="Method CedarBackup2.peer.RemotePeer._setLocalUser()=CedarBackup2.peer.RemotePeer-class.html#_setLocalUser"><a title="CedarBackup2.peer.RemotePeer._setLocalUser" class="py-name" href="#" onclick="return doclink('link-131', '_setLocalUser', 'link-131');">_setLocalUser</a></tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-string">"Name of the Cedar Backup user on the current host."</tt><tt class="py-op">)</tt> </tt>
<a name="L723"></a><tt class="py-lineno"> 723</tt> <tt class="py-line"> <tt id="link-132" class="py-name"><a title="CedarBackup2.config.OptionsConfig.rcpCommand
CedarBackup2.config.RemotePeer.rcpCommand
CedarBackup2.peer.RemotePeer.rcpCommand" class="py-name" href="#" onclick="return doclink('link-132', 'rcpCommand', 'link-101');">rcpCommand</a></tt> <tt class="py-op">=</tt> <tt class="py-name">property</tt><tt class="py-op">(</tt><tt id="link-133" class="py-name" targets="Function CedarBackup2.actions.stage._getRcpCommand()=CedarBackup2.actions.stage-module.html#_getRcpCommand,Method CedarBackup2.config.OptionsConfig._getRcpCommand()=CedarBackup2.config.OptionsConfig-class.html#_getRcpCommand,Method CedarBackup2.config.RemotePeer._getRcpCommand()=CedarBackup2.config.RemotePeer-class.html#_getRcpCommand,Method CedarBackup2.peer.RemotePeer._getRcpCommand()=CedarBackup2.peer.RemotePeer-class.html#_getRcpCommand"><a title="CedarBackup2.actions.stage._getRcpCommand
CedarBackup2.config.OptionsConfig._getRcpCommand
CedarBackup2.config.RemotePeer._getRcpCommand
CedarBackup2.peer.RemotePeer._getRcpCommand" class="py-name" href="#" onclick="return doclink('link-133', '_getRcpCommand', 'link-133');">_getRcpCommand</a></tt><tt class="py-op">,</tt> <tt id="link-134" class="py-name" targets="Method CedarBackup2.config.OptionsConfig._setRcpCommand()=CedarBackup2.config.OptionsConfig-class.html#_setRcpCommand,Method CedarBackup2.config.RemotePeer._setRcpCommand()=CedarBackup2.config.RemotePeer-class.html#_setRcpCommand,Method CedarBackup2.peer.RemotePeer._setRcpCommand()=CedarBackup2.peer.RemotePeer-class.html#_setRcpCommand"><a title="CedarBackup2.config.OptionsConfig._setRcpCommand
CedarBackup2.config.RemotePeer._setRcpCommand
CedarBackup2.peer.RemotePeer._setRcpCommand" class="py-name" href="#" onclick="return doclink('link-134', '_setRcpCommand', 'link-134');">_setRcpCommand</a></tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-string">"An rcp-compatible copy command to use for copying files."</tt><tt class="py-op">)</tt> </tt>
<a name="L724"></a><tt class="py-lineno"> 724</tt> <tt class="py-line"> <tt id="link-135" class="py-name"><a title="CedarBackup2.config.OptionsConfig.rshCommand
CedarBackup2.config.RemotePeer.rshCommand
CedarBackup2.peer.RemotePeer.rshCommand" class="py-name" href="#" onclick="return doclink('link-135', 'rshCommand', 'link-103');">rshCommand</a></tt> <tt class="py-op">=</tt> <tt class="py-name">property</tt><tt class="py-op">(</tt><tt id="link-136" class="py-name" targets="Static Method CedarBackup2.cli._ActionSet._getRshCommand()=CedarBackup2.cli._ActionSet-class.html#_getRshCommand,Method CedarBackup2.config.OptionsConfig._getRshCommand()=CedarBackup2.config.OptionsConfig-class.html#_getRshCommand,Method CedarBackup2.config.RemotePeer._getRshCommand()=CedarBackup2.config.RemotePeer-class.html#_getRshCommand,Method CedarBackup2.peer.RemotePeer._getRshCommand()=CedarBackup2.peer.RemotePeer-class.html#_getRshCommand"><a title="CedarBackup2.cli._ActionSet._getRshCommand
CedarBackup2.config.OptionsConfig._getRshCommand
CedarBackup2.config.RemotePeer._getRshCommand
CedarBackup2.peer.RemotePeer._getRshCommand" class="py-name" href="#" onclick="return doclink('link-136', '_getRshCommand', 'link-136');">_getRshCommand</a></tt><tt class="py-op">,</tt> <tt id="link-137" class="py-name" targets="Method CedarBackup2.config.OptionsConfig._setRshCommand()=CedarBackup2.config.OptionsConfig-class.html#_setRshCommand,Method CedarBackup2.config.RemotePeer._setRshCommand()=CedarBackup2.config.RemotePeer-class.html#_setRshCommand,Method CedarBackup2.peer.RemotePeer._setRshCommand()=CedarBackup2.peer.RemotePeer-class.html#_setRshCommand"><a title="CedarBackup2.config.OptionsConfig._setRshCommand
CedarBackup2.config.RemotePeer._setRshCommand
CedarBackup2.peer.RemotePeer._setRshCommand" class="py-name" href="#" onclick="return doclink('link-137', '_setRshCommand', 'link-137');">_setRshCommand</a></tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-string">"An rsh-compatible command to use for remote shells to the peer."</tt><tt class="py-op">)</tt> </tt>
<a name="L725"></a><tt class="py-lineno"> 725</tt> <tt class="py-line"> <tt id="link-138" class="py-name"><a title="CedarBackup2.config.OptionsConfig.cbackCommand
CedarBackup2.config.RemotePeer.cbackCommand
CedarBackup2.peer.RemotePeer.cbackCommand" class="py-name" href="#" onclick="return doclink('link-138', 'cbackCommand', 'link-105');">cbackCommand</a></tt> <tt class="py-op">=</tt> <tt class="py-name">property</tt><tt class="py-op">(</tt><tt id="link-139" class="py-name" targets="Static Method CedarBackup2.cli._ActionSet._getCbackCommand()=CedarBackup2.cli._ActionSet-class.html#_getCbackCommand,Method CedarBackup2.config.OptionsConfig._getCbackCommand()=CedarBackup2.config.OptionsConfig-class.html#_getCbackCommand,Method CedarBackup2.config.RemotePeer._getCbackCommand()=CedarBackup2.config.RemotePeer-class.html#_getCbackCommand,Method CedarBackup2.peer.RemotePeer._getCbackCommand()=CedarBackup2.peer.RemotePeer-class.html#_getCbackCommand"><a title="CedarBackup2.cli._ActionSet._getCbackCommand
CedarBackup2.config.OptionsConfig._getCbackCommand
CedarBackup2.config.RemotePeer._getCbackCommand
CedarBackup2.peer.RemotePeer._getCbackCommand" class="py-name" href="#" onclick="return doclink('link-139', '_getCbackCommand', 'link-139');">_getCbackCommand</a></tt><tt class="py-op">,</tt> <tt id="link-140" class="py-name" targets="Method CedarBackup2.config.OptionsConfig._setCbackCommand()=CedarBackup2.config.OptionsConfig-class.html#_setCbackCommand,Method CedarBackup2.config.RemotePeer._setCbackCommand()=CedarBackup2.config.RemotePeer-class.html#_setCbackCommand,Method CedarBackup2.peer.RemotePeer._setCbackCommand()=CedarBackup2.peer.RemotePeer-class.html#_setCbackCommand"><a title="CedarBackup2.config.OptionsConfig._setCbackCommand
CedarBackup2.config.RemotePeer._setCbackCommand
CedarBackup2.peer.RemotePeer._setCbackCommand" class="py-name" href="#" onclick="return doclink('link-140', '_setCbackCommand', 'link-140');">_setCbackCommand</a></tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-string">"A chack-compatible command to use for executing managed actions."</tt><tt class="py-op">)</tt> </tt>
<a name="L726"></a><tt class="py-lineno"> 726</tt> <tt class="py-line"> <tt id="link-141" class="py-name"><a title="CedarBackup2.config.LocalPeer.ignoreFailureMode
CedarBackup2.config.RemotePeer.ignoreFailureMode
CedarBackup2.peer.LocalPeer.ignoreFailureMode
CedarBackup2.peer.RemotePeer.ignoreFailureMode" class="py-name" href="#" onclick="return doclink('link-141', 'ignoreFailureMode', 'link-26');">ignoreFailureMode</a></tt> <tt class="py-op">=</tt> <tt class="py-name">property</tt><tt class="py-op">(</tt><tt id="link-142" class="py-name"><a title="CedarBackup2.config.LocalPeer._getIgnoreFailureMode
CedarBackup2.config.RemotePeer._getIgnoreFailureMode
CedarBackup2.peer.LocalPeer._getIgnoreFailureMode
CedarBackup2.peer.RemotePeer._getIgnoreFailureMode" class="py-name" href="#" onclick="return doclink('link-142', '_getIgnoreFailureMode', 'link-38');">_getIgnoreFailureMode</a></tt><tt class="py-op">,</tt> <tt id="link-143" class="py-name"><a title="CedarBackup2.config.LocalPeer._setIgnoreFailureMode
CedarBackup2.config.RemotePeer._setIgnoreFailureMode
CedarBackup2.peer.LocalPeer._setIgnoreFailureMode
CedarBackup2.peer.RemotePeer._setIgnoreFailureMode" class="py-name" href="#" onclick="return doclink('link-143', '_setIgnoreFailureMode', 'link-39');">_setIgnoreFailureMode</a></tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-string">"Ignore failure mode for peer."</tt><tt class="py-op">)</tt> </tt>
<a name="L727"></a><tt class="py-lineno"> 727</tt> <tt class="py-line"> </tt>
<a name="L728"></a><tt class="py-lineno"> 728</tt> <tt class="py-line"> </tt>
<a name="L729"></a><tt class="py-lineno"> 729</tt> <tt class="py-line"> <tt class="py-comment">#################</tt> </tt>
<a name="L730"></a><tt class="py-lineno"> 730</tt> <tt class="py-line"> <tt class="py-comment"># Public methods</tt> </tt>
<a name="L731"></a><tt class="py-lineno"> 731</tt> <tt class="py-line"> <tt class="py-comment">#################</tt> </tt>
<a name="L732"></a><tt class="py-lineno"> 732</tt> <tt class="py-line"> </tt>
<a name="RemotePeer.stagePeer"></a><div id="RemotePeer.stagePeer-def"><a name="L733"></a><tt class="py-lineno"> 733</tt> <a class="py-toggle" href="#" id="RemotePeer.stagePeer-toggle" onclick="return toggle('RemotePeer.stagePeer');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="CedarBackup2.peer.RemotePeer-class.html#stagePeer">stagePeer</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">targetDir</tt><tt class="py-op">,</tt> <tt class="py-param">ownership</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">permissions</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="RemotePeer.stagePeer-collapsed" style="display:none;" pad="++++" indent="+++++++"></div><div id="RemotePeer.stagePeer-expanded"><a name="L734"></a><tt class="py-lineno"> 734</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
<a name="L735"></a><tt class="py-lineno"> 735</tt> <tt class="py-line"><tt class="py-docstring"> Stages data from the peer into the indicated local target directory.</tt> </tt>
<a name="L736"></a><tt class="py-lineno"> 736</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L737"></a><tt class="py-lineno"> 737</tt> <tt class="py-line"><tt class="py-docstring"> The target directory must already exist before this method is called. If</tt> </tt>
<a name="L738"></a><tt class="py-lineno"> 738</tt> <tt class="py-line"><tt class="py-docstring"> passed in, ownership and permissions will be applied to the files that</tt> </tt>
<a name="L739"></a><tt class="py-lineno"> 739</tt> <tt class="py-line"><tt class="py-docstring"> are copied.</tt> </tt>
<a name="L740"></a><tt class="py-lineno"> 740</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L741"></a><tt class="py-lineno"> 741</tt> <tt class="py-line"><tt class="py-docstring"> @note: The returned count of copied files might be inaccurate if some of</tt> </tt>
<a name="L742"></a><tt class="py-lineno"> 742</tt> <tt class="py-line"><tt class="py-docstring"> the copied files already existed in the staging directory prior to the</tt> </tt>
<a name="L743"></a><tt class="py-lineno"> 743</tt> <tt class="py-line"><tt class="py-docstring"> copy taking place. We don't clear the staging directory first, because</tt> </tt>
<a name="L744"></a><tt class="py-lineno"> 744</tt> <tt class="py-line"><tt class="py-docstring"> some extension might also be using it.</tt> </tt>
<a name="L745"></a><tt class="py-lineno"> 745</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L746"></a><tt class="py-lineno"> 746</tt> <tt class="py-line"><tt class="py-docstring"> @note: If you have user/group as strings, call the L{util.getUidGid} function</tt> </tt>
<a name="L747"></a><tt class="py-lineno"> 747</tt> <tt class="py-line"><tt class="py-docstring"> to get the associated uid/gid as an ownership tuple.</tt> </tt>
<a name="L748"></a><tt class="py-lineno"> 748</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L749"></a><tt class="py-lineno"> 749</tt> <tt class="py-line"><tt class="py-docstring"> @note: Unlike the local peer version of this method, an I/O error might</tt> </tt>
<a name="L750"></a><tt class="py-lineno"> 750</tt> <tt class="py-line"><tt class="py-docstring"> or might not be raised if the directory is empty. Since we're using a</tt> </tt>
<a name="L751"></a><tt class="py-lineno"> 751</tt> <tt class="py-line"><tt class="py-docstring"> remote copy method, we just don't have the fine-grained control over our</tt> </tt>
<a name="L752"></a><tt class="py-lineno"> 752</tt> <tt class="py-line"><tt class="py-docstring"> exceptions that's available when we can look directly at the filesystem,</tt> </tt>
<a name="L753"></a><tt class="py-lineno"> 753</tt> <tt class="py-line"><tt class="py-docstring"> and we can't control whether the remote copy method thinks an empty</tt> </tt>
<a name="L754"></a><tt class="py-lineno"> 754</tt> <tt class="py-line"><tt class="py-docstring"> directory is an error.</tt> </tt>
<a name="L755"></a><tt class="py-lineno"> 755</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L756"></a><tt class="py-lineno"> 756</tt> <tt class="py-line"><tt class="py-docstring"> @param targetDir: Target directory to write data into</tt> </tt>
<a name="L757"></a><tt class="py-lineno"> 757</tt> <tt class="py-line"><tt class="py-docstring"> @type targetDir: String representing a directory on disk</tt> </tt>
<a name="L758"></a><tt class="py-lineno"> 758</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L759"></a><tt class="py-lineno"> 759</tt> <tt class="py-line"><tt class="py-docstring"> @param ownership: Owner and group that the staged files should have</tt> </tt>
<a name="L760"></a><tt class="py-lineno"> 760</tt> <tt class="py-line"><tt class="py-docstring"> @type ownership: Tuple of numeric ids C{(uid, gid)}</tt> </tt>
<a name="L761"></a><tt class="py-lineno"> 761</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L762"></a><tt class="py-lineno"> 762</tt> <tt class="py-line"><tt class="py-docstring"> @param permissions: Permissions that the staged files should have</tt> </tt>
<a name="L763"></a><tt class="py-lineno"> 763</tt> <tt class="py-line"><tt class="py-docstring"> @type permissions: UNIX permissions mode, specified in octal (i.e. C{0640}).</tt> </tt>
<a name="L764"></a><tt class="py-lineno"> 764</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L765"></a><tt class="py-lineno"> 765</tt> <tt class="py-line"><tt class="py-docstring"> @return: Number of files copied from the source directory to the target directory.</tt> </tt>
<a name="L766"></a><tt class="py-lineno"> 766</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L767"></a><tt class="py-lineno"> 767</tt> <tt class="py-line"><tt class="py-docstring"> @raise ValueError: If target directory is not a directory, does not exist or is not absolute.</tt> </tt>
<a name="L768"></a><tt class="py-lineno"> 768</tt> <tt class="py-line"><tt class="py-docstring"> @raise ValueError: If a path cannot be encoded properly.</tt> </tt>
<a name="L769"></a><tt class="py-lineno"> 769</tt> <tt class="py-line"><tt class="py-docstring"> @raise IOError: If there were no files to stage (i.e. the directory was empty)</tt> </tt>
<a name="L770"></a><tt class="py-lineno"> 770</tt> <tt class="py-line"><tt class="py-docstring"> @raise IOError: If there is an IO error copying a file.</tt> </tt>
<a name="L771"></a><tt class="py-lineno"> 771</tt> <tt class="py-line"><tt class="py-docstring"> @raise OSError: If there is an OS error copying or changing permissions on a file</tt> </tt>
<a name="L772"></a><tt class="py-lineno"> 772</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="L773"></a><tt class="py-lineno"> 773</tt> <tt class="py-line"> <tt id="link-144" class="py-name"><a title="CedarBackup2.config.CollectConfig.targetDir
CedarBackup2.config.StageConfig.targetDir" class="py-name" href="#" onclick="return doclink('link-144', 'targetDir', 'link-40');">targetDir</a></tt> <tt class="py-op">=</tt> <tt id="link-145" class="py-name"><a title="CedarBackup2.util.encodePath" class="py-name" href="#" onclick="return doclink('link-145', 'encodePath', 'link-11');">encodePath</a></tt><tt class="py-op">(</tt><tt id="link-146" class="py-name"><a title="CedarBackup2.config.CollectConfig.targetDir
CedarBackup2.config.StageConfig.targetDir" class="py-name" href="#" onclick="return doclink('link-146', 'targetDir', 'link-40');">targetDir</a></tt><tt class="py-op">)</tt> </tt>
<a name="L774"></a><tt class="py-lineno"> 774</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">isabs</tt><tt class="py-op">(</tt><tt id="link-147" class="py-name"><a title="CedarBackup2.config.CollectConfig.targetDir
CedarBackup2.config.StageConfig.targetDir" class="py-name" href="#" onclick="return doclink('link-147', 'targetDir', 'link-40');">targetDir</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L775"></a><tt class="py-lineno"> 775</tt> <tt class="py-line"> <tt id="link-148" class="py-name"><a title="CedarBackup2.actions.collect.logger
CedarBackup2.actions.initialize.logger
CedarBackup2.actions.purge.logger
CedarBackup2.actions.rebuild.logger
CedarBackup2.actions.stage.logger
CedarBackup2.actions.store.logger
CedarBackup2.actions.util.logger
CedarBackup2.actions.validate.logger
CedarBackup2.cli.logger
CedarBackup2.config.logger
CedarBackup2.customize.logger
CedarBackup2.extend.amazons3.logger
CedarBackup2.extend.capacity.logger
CedarBackup2.extend.encrypt.logger
CedarBackup2.extend.mbox.logger
CedarBackup2.extend.mysql.logger
CedarBackup2.extend.postgresql.logger
CedarBackup2.extend.split.logger
CedarBackup2.extend.subversion.logger
CedarBackup2.extend.sysinfo.logger
CedarBackup2.filesystem.logger
CedarBackup2.peer.logger
CedarBackup2.tools.amazons3.logger
CedarBackup2.tools.span.logger
CedarBackup2.util.logger
CedarBackup2.writers.cdwriter.logger
CedarBackup2.writers.dvdwriter.logger
CedarBackup2.writers.util.logger
CedarBackup2.xmlutil.logger" class="py-name" href="#" onclick="return doclink('link-148', 'logger', 'link-15');">logger</a></tt><tt class="py-op">.</tt><tt id="link-149" class="py-name"><a title="CedarBackup2.cli.Options.debug
CedarBackup2.tools.amazons3.Options.debug" class="py-name" href="#" onclick="return doclink('link-149', 'debug', 'link-45');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">"Target directory [%s] not an absolute path."</tt><tt class="py-op">,</tt> <tt id="link-150" class="py-name"><a title="CedarBackup2.config.CollectConfig.targetDir
CedarBackup2.config.StageConfig.targetDir" class="py-name" href="#" onclick="return doclink('link-150', 'targetDir', 'link-40');">targetDir</a></tt><tt class="py-op">)</tt> </tt>
<a name="L776"></a><tt class="py-lineno"> 776</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">(</tt><tt class="py-string">"Target directory must be an absolute path."</tt><tt class="py-op">)</tt> </tt>
<a name="L777"></a><tt class="py-lineno"> 777</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">exists</tt><tt class="py-op">(</tt><tt id="link-151" class="py-name"><a title="CedarBackup2.config.CollectConfig.targetDir
CedarBackup2.config.StageConfig.targetDir" class="py-name" href="#" onclick="return doclink('link-151', 'targetDir', 'link-40');">targetDir</a></tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-keyword">not</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">isdir</tt><tt class="py-op">(</tt><tt id="link-152" class="py-name"><a title="CedarBackup2.config.CollectConfig.targetDir
CedarBackup2.config.StageConfig.targetDir" class="py-name" href="#" onclick="return doclink('link-152', 'targetDir', 'link-40');">targetDir</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L778"></a><tt class="py-lineno"> 778</tt> <tt class="py-line"> <tt id="link-153" class="py-name"><a title="CedarBackup2.actions.collect.logger
CedarBackup2.actions.initialize.logger
CedarBackup2.actions.purge.logger
CedarBackup2.actions.rebuild.logger
CedarBackup2.actions.stage.logger
CedarBackup2.actions.store.logger
CedarBackup2.actions.util.logger
CedarBackup2.actions.validate.logger
CedarBackup2.cli.logger
CedarBackup2.config.logger
CedarBackup2.customize.logger
CedarBackup2.extend.amazons3.logger
CedarBackup2.extend.capacity.logger
CedarBackup2.extend.encrypt.logger
CedarBackup2.extend.mbox.logger
CedarBackup2.extend.mysql.logger
CedarBackup2.extend.postgresql.logger
CedarBackup2.extend.split.logger
CedarBackup2.extend.subversion.logger
CedarBackup2.extend.sysinfo.logger
CedarBackup2.filesystem.logger
CedarBackup2.peer.logger
CedarBackup2.tools.amazons3.logger
CedarBackup2.tools.span.logger
CedarBackup2.util.logger
CedarBackup2.writers.cdwriter.logger
CedarBackup2.writers.dvdwriter.logger
CedarBackup2.writers.util.logger
CedarBackup2.xmlutil.logger" class="py-name" href="#" onclick="return doclink('link-153', 'logger', 'link-15');">logger</a></tt><tt class="py-op">.</tt><tt id="link-154" class="py-name"><a title="CedarBackup2.cli.Options.debug
CedarBackup2.tools.amazons3.Options.debug" class="py-name" href="#" onclick="return doclink('link-154', 'debug', 'link-45');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">"Target directory [%s] is not a directory or does not exist on disk."</tt><tt class="py-op">,</tt> <tt id="link-155" class="py-name"><a title="CedarBackup2.config.CollectConfig.targetDir
CedarBackup2.config.StageConfig.targetDir" class="py-name" href="#" onclick="return doclink('link-155', 'targetDir', 'link-40');">targetDir</a></tt><tt class="py-op">)</tt> </tt>
<a name="L779"></a><tt class="py-lineno"> 779</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">(</tt><tt class="py-string">"Target directory is not a directory or does not exist on disk."</tt><tt class="py-op">)</tt> </tt>
<a name="L780"></a><tt class="py-lineno"> 780</tt> <tt class="py-line"> <tt class="py-name">count</tt> <tt class="py-op">=</tt> <tt id="link-156" class="py-name" targets="Class CedarBackup2.config.RemotePeer=CedarBackup2.config.RemotePeer-class.html,Class CedarBackup2.peer.RemotePeer=CedarBackup2.peer.RemotePeer-class.html"><a title="CedarBackup2.config.RemotePeer
CedarBackup2.peer.RemotePeer" class="py-name" href="#" onclick="return doclink('link-156', 'RemotePeer', 'link-156');">RemotePeer</a></tt><tt class="py-op">.</tt><tt id="link-157" class="py-name" targets="Static Method CedarBackup2.peer.RemotePeer._copyRemoteDir()=CedarBackup2.peer.RemotePeer-class.html#_copyRemoteDir"><a title="CedarBackup2.peer.RemotePeer._copyRemoteDir" class="py-name" href="#" onclick="return doclink('link-157', '_copyRemoteDir', 'link-157');">_copyRemoteDir</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-158" class="py-name"><a title="CedarBackup2.config.RemotePeer.remoteUser
CedarBackup2.peer.RemotePeer.remoteUser" class="py-name" href="#" onclick="return doclink('link-158', 'remoteUser', 'link-97');">remoteUser</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-159" class="py-name"><a title="CedarBackup2.peer.RemotePeer.localUser" class="py-name" href="#" onclick="return doclink('link-159', 'localUser', 'link-99');">localUser</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-160" class="py-name"><a title="CedarBackup2.config.ExtendedAction.name
CedarBackup2.config.LocalPeer.name
CedarBackup2.config.RemotePeer.name
CedarBackup2.peer.LocalPeer.name
CedarBackup2.peer.RemotePeer.name
CedarBackup2.util.DirectedGraph.name" class="py-name" href="#" onclick="return doclink('link-160', 'name', 'link-22');">name</a></tt><tt class="py-op">,</tt> </tt>
<a name="L781"></a><tt class="py-lineno"> 781</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_rcpCommand</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_rcpCommandList</tt><tt class="py-op">,</tt> </tt>
<a name="L782"></a><tt class="py-lineno"> 782</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-161" class="py-name"><a title="CedarBackup2.config.LocalPeer.collectDir
CedarBackup2.config.RemotePeer.collectDir
CedarBackup2.peer.LocalPeer.collectDir
CedarBackup2.peer.RemotePeer.collectDir" class="py-name" href="#" onclick="return doclink('link-161', 'collectDir', 'link-24');">collectDir</a></tt><tt class="py-op">,</tt> <tt id="link-162" class="py-name"><a title="CedarBackup2.config.CollectConfig.targetDir
CedarBackup2.config.StageConfig.targetDir" class="py-name" href="#" onclick="return doclink('link-162', 'targetDir', 'link-40');">targetDir</a></tt><tt class="py-op">,</tt> </tt>
<a name="L783"></a><tt class="py-lineno"> 783</tt> <tt class="py-line"> <tt class="py-name">ownership</tt><tt class="py-op">,</tt> <tt class="py-name">permissions</tt><tt class="py-op">)</tt> </tt>
<a name="L784"></a><tt class="py-lineno"> 784</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">count</tt> <tt class="py-op">==</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L785"></a><tt class="py-lineno"> 785</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">IOError</tt><tt class="py-op">(</tt><tt class="py-string">"Did not copy any files from local peer."</tt><tt class="py-op">)</tt> </tt>
<a name="L786"></a><tt class="py-lineno"> 786</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">count</tt> </tt>
</div><a name="L787"></a><tt class="py-lineno"> 787</tt> <tt class="py-line"> </tt>
<a name="RemotePeer.checkCollectIndicator"></a><div id="RemotePeer.checkCollectIndicator-def"><a name="L788"></a><tt class="py-lineno"> 788</tt> <a class="py-toggle" href="#" id="RemotePeer.checkCollectIndicator-toggle" onclick="return toggle('RemotePeer.checkCollectIndicator');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="CedarBackup2.peer.RemotePeer-class.html#checkCollectIndicator">checkCollectIndicator</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">collectIndicator</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="RemotePeer.checkCollectIndicator-collapsed" style="display:none;" pad="++++" indent="+++++++"></div><div id="RemotePeer.checkCollectIndicator-expanded"><a name="L789"></a><tt class="py-lineno"> 789</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
<a name="L790"></a><tt class="py-lineno"> 790</tt> <tt class="py-line"><tt class="py-docstring"> Checks the collect indicator in the peer's staging directory.</tt> </tt>
<a name="L791"></a><tt class="py-lineno"> 791</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L792"></a><tt class="py-lineno"> 792</tt> <tt class="py-line"><tt class="py-docstring"> When a peer has completed collecting its backup files, it will write an</tt> </tt>
<a name="L793"></a><tt class="py-lineno"> 793</tt> <tt class="py-line"><tt class="py-docstring"> empty indicator file into its collect directory. This method checks to</tt> </tt>
<a name="L794"></a><tt class="py-lineno"> 794</tt> <tt class="py-line"><tt class="py-docstring"> see whether that indicator has been written. If the remote copy command</tt> </tt>
<a name="L795"></a><tt class="py-lineno"> 795</tt> <tt class="py-line"><tt class="py-docstring"> fails, we return C{False} as if the file weren't there.</tt> </tt>
<a name="L796"></a><tt class="py-lineno"> 796</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L797"></a><tt class="py-lineno"> 797</tt> <tt class="py-line"><tt class="py-docstring"> If you need to, you can override the name of the collect indicator file</tt> </tt>
<a name="L798"></a><tt class="py-lineno"> 798</tt> <tt class="py-line"><tt class="py-docstring"> by passing in a different name.</tt> </tt>
<a name="L799"></a><tt class="py-lineno"> 799</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L800"></a><tt class="py-lineno"> 800</tt> <tt class="py-line"><tt class="py-docstring"> @note: Apparently, we can't count on all rcp-compatible implementations</tt> </tt>
<a name="L801"></a><tt class="py-lineno"> 801</tt> <tt class="py-line"><tt class="py-docstring"> to return sensible errors for some error conditions. As an example, the</tt> </tt>
<a name="L802"></a><tt class="py-lineno"> 802</tt> <tt class="py-line"><tt class="py-docstring"> C{scp} command in Debian 'woody' returns a zero (normal) status even when</tt> </tt>
<a name="L803"></a><tt class="py-lineno"> 803</tt> <tt class="py-line"><tt class="py-docstring"> it can't find a host or if the login or path is invalid. Because of</tt> </tt>
<a name="L804"></a><tt class="py-lineno"> 804</tt> <tt class="py-line"><tt class="py-docstring"> this, the implementation of this method is rather convoluted.</tt> </tt>
<a name="L805"></a><tt class="py-lineno"> 805</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L806"></a><tt class="py-lineno"> 806</tt> <tt class="py-line"><tt class="py-docstring"> @param collectIndicator: Name of the collect indicator file to check</tt> </tt>
<a name="L807"></a><tt class="py-lineno"> 807</tt> <tt class="py-line"><tt class="py-docstring"> @type collectIndicator: String representing name of a file in the collect directory</tt> </tt>
<a name="L808"></a><tt class="py-lineno"> 808</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L809"></a><tt class="py-lineno"> 809</tt> <tt class="py-line"><tt class="py-docstring"> @return: Boolean true/false depending on whether the indicator exists.</tt> </tt>
<a name="L810"></a><tt class="py-lineno"> 810</tt> <tt class="py-line"><tt class="py-docstring"> @raise ValueError: If a path cannot be encoded properly.</tt> </tt>
<a name="L811"></a><tt class="py-lineno"> 811</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="L812"></a><tt class="py-lineno"> 812</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L813"></a><tt class="py-lineno"> 813</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">collectIndicator</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L814"></a><tt class="py-lineno"> 814</tt> <tt class="py-line"> <tt class="py-name">sourceFile</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-163" class="py-name"><a title="CedarBackup2.config.LocalPeer.collectDir
CedarBackup2.config.RemotePeer.collectDir
CedarBackup2.peer.LocalPeer.collectDir
CedarBackup2.peer.RemotePeer.collectDir" class="py-name" href="#" onclick="return doclink('link-163', 'collectDir', 'link-24');">collectDir</a></tt><tt class="py-op">,</tt> <tt id="link-164" class="py-name"><a title="CedarBackup2.peer.DEF_COLLECT_INDICATOR" class="py-name" href="#" onclick="return doclink('link-164', 'DEF_COLLECT_INDICATOR', 'link-19');">DEF_COLLECT_INDICATOR</a></tt><tt class="py-op">)</tt> </tt>
<a name="L815"></a><tt class="py-lineno"> 815</tt> <tt class="py-line"> <tt class="py-name">targetFile</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-165" class="py-name"><a title="CedarBackup2.config.OptionsConfig.workingDir
CedarBackup2.peer.RemotePeer.workingDir" class="py-name" href="#" onclick="return doclink('link-165', 'workingDir', 'link-95');">workingDir</a></tt><tt class="py-op">,</tt> <tt id="link-166" class="py-name"><a title="CedarBackup2.peer.DEF_COLLECT_INDICATOR" class="py-name" href="#" onclick="return doclink('link-166', 'DEF_COLLECT_INDICATOR', 'link-19');">DEF_COLLECT_INDICATOR</a></tt><tt class="py-op">)</tt> </tt>
<a name="L816"></a><tt class="py-lineno"> 816</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L817"></a><tt class="py-lineno"> 817</tt> <tt class="py-line"> <tt class="py-name">collectIndicator</tt> <tt class="py-op">=</tt> <tt id="link-167" class="py-name"><a title="CedarBackup2.util.encodePath" class="py-name" href="#" onclick="return doclink('link-167', 'encodePath', 'link-11');">encodePath</a></tt><tt class="py-op">(</tt><tt class="py-name">collectIndicator</tt><tt class="py-op">)</tt> </tt>
<a name="L818"></a><tt class="py-lineno"> 818</tt> <tt class="py-line"> <tt class="py-name">sourceFile</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-168" class="py-name"><a title="CedarBackup2.config.LocalPeer.collectDir
CedarBackup2.config.RemotePeer.collectDir
CedarBackup2.peer.LocalPeer.collectDir
CedarBackup2.peer.RemotePeer.collectDir" class="py-name" href="#" onclick="return doclink('link-168', 'collectDir', 'link-24');">collectDir</a></tt><tt class="py-op">,</tt> <tt class="py-name">collectIndicator</tt><tt class="py-op">)</tt> </tt>
<a name="L819"></a><tt class="py-lineno"> 819</tt> <tt class="py-line"> <tt class="py-name">targetFile</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-169" class="py-name"><a title="CedarBackup2.config.OptionsConfig.workingDir
CedarBackup2.peer.RemotePeer.workingDir" class="py-name" href="#" onclick="return doclink('link-169', 'workingDir', 'link-95');">workingDir</a></tt><tt class="py-op">,</tt> <tt class="py-name">collectIndicator</tt><tt class="py-op">)</tt> </tt>
<a name="L820"></a><tt class="py-lineno"> 820</tt> <tt class="py-line"> <tt id="link-170" class="py-name"><a title="CedarBackup2.actions.collect.logger
CedarBackup2.actions.initialize.logger
CedarBackup2.actions.purge.logger
CedarBackup2.actions.rebuild.logger
CedarBackup2.actions.stage.logger
CedarBackup2.actions.store.logger
CedarBackup2.actions.util.logger
CedarBackup2.actions.validate.logger
CedarBackup2.cli.logger
CedarBackup2.config.logger
CedarBackup2.customize.logger
CedarBackup2.extend.amazons3.logger
CedarBackup2.extend.capacity.logger
CedarBackup2.extend.encrypt.logger
CedarBackup2.extend.mbox.logger
CedarBackup2.extend.mysql.logger
CedarBackup2.extend.postgresql.logger
CedarBackup2.extend.split.logger
CedarBackup2.extend.subversion.logger
CedarBackup2.extend.sysinfo.logger
CedarBackup2.filesystem.logger
CedarBackup2.peer.logger
CedarBackup2.tools.amazons3.logger
CedarBackup2.tools.span.logger
CedarBackup2.util.logger
CedarBackup2.writers.cdwriter.logger
CedarBackup2.writers.dvdwriter.logger
CedarBackup2.writers.util.logger
CedarBackup2.xmlutil.logger" class="py-name" href="#" onclick="return doclink('link-170', 'logger', 'link-15');">logger</a></tt><tt class="py-op">.</tt><tt id="link-171" class="py-name"><a title="CedarBackup2.cli.Options.debug
CedarBackup2.tools.amazons3.Options.debug" class="py-name" href="#" onclick="return doclink('link-171', 'debug', 'link-45');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">"Fetch remote [%s] into [%s]."</tt><tt class="py-op">,</tt> <tt class="py-name">sourceFile</tt><tt class="py-op">,</tt> <tt class="py-name">targetFile</tt><tt class="py-op">)</tt> </tt>
<a name="L821"></a><tt class="py-lineno"> 821</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">exists</tt><tt class="py-op">(</tt><tt class="py-name">targetFile</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L822"></a><tt class="py-lineno"> 822</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L823"></a><tt class="py-lineno"> 823</tt> <tt class="py-line"> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">remove</tt><tt class="py-op">(</tt><tt class="py-name">targetFile</tt><tt class="py-op">)</tt> </tt>
<a name="L824"></a><tt class="py-lineno"> 824</tt> <tt class="py-line"> <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L825"></a><tt class="py-lineno"> 825</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">Exception</tt><tt class="py-op">(</tt><tt class="py-string">"Error: collect indicator [%s] already exists!"</tt> <tt class="py-op">%</tt> <tt class="py-name">targetFile</tt><tt class="py-op">)</tt> </tt>
<a name="L826"></a><tt class="py-lineno"> 826</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L827"></a><tt class="py-lineno"> 827</tt> <tt class="py-line"> <tt id="link-172" class="py-name"><a title="CedarBackup2.config.RemotePeer
CedarBackup2.peer.RemotePeer" class="py-name" href="#" onclick="return doclink('link-172', 'RemotePeer', 'link-156');">RemotePeer</a></tt><tt class="py-op">.</tt><tt id="link-173" class="py-name" targets="Static Method CedarBackup2.peer.RemotePeer._copyRemoteFile()=CedarBackup2.peer.RemotePeer-class.html#_copyRemoteFile"><a title="CedarBackup2.peer.RemotePeer._copyRemoteFile" class="py-name" href="#" onclick="return doclink('link-173', '_copyRemoteFile', 'link-173');">_copyRemoteFile</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-174" class="py-name"><a title="CedarBackup2.config.RemotePeer.remoteUser
CedarBackup2.peer.RemotePeer.remoteUser" class="py-name" href="#" onclick="return doclink('link-174', 'remoteUser', 'link-97');">remoteUser</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-175" class="py-name"><a title="CedarBackup2.peer.RemotePeer.localUser" class="py-name" href="#" onclick="return doclink('link-175', 'localUser', 'link-99');">localUser</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-176" class="py-name"><a title="CedarBackup2.config.ExtendedAction.name
CedarBackup2.config.LocalPeer.name
CedarBackup2.config.RemotePeer.name
CedarBackup2.peer.LocalPeer.name
CedarBackup2.peer.RemotePeer.name
CedarBackup2.util.DirectedGraph.name" class="py-name" href="#" onclick="return doclink('link-176', 'name', 'link-22');">name</a></tt><tt class="py-op">,</tt> </tt>
<a name="L828"></a><tt class="py-lineno"> 828</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_rcpCommand</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_rcpCommandList</tt><tt class="py-op">,</tt> </tt>
<a name="L829"></a><tt class="py-lineno"> 829</tt> <tt class="py-line"> <tt class="py-name">sourceFile</tt><tt class="py-op">,</tt> <tt class="py-name">targetFile</tt><tt class="py-op">,</tt> </tt>
<a name="L830"></a><tt class="py-lineno"> 830</tt> <tt class="py-line"> <tt class="py-name">overwrite</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt> </tt>
<a name="L831"></a><tt class="py-lineno"> 831</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">exists</tt><tt class="py-op">(</tt><tt class="py-name">targetFile</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L832"></a><tt class="py-lineno"> 832</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> </tt>
<a name="L833"></a><tt class="py-lineno"> 833</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L834"></a><tt class="py-lineno"> 834</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
<a name="L835"></a><tt class="py-lineno"> 835</tt> <tt class="py-line"> <tt class="py-keyword">except</tt> <tt class="py-name">Exception</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">:</tt> </tt>
<a name="L836"></a><tt class="py-lineno"> 836</tt> <tt class="py-line"> <tt id="link-177" class="py-name"><a title="CedarBackup2.actions.collect.logger
CedarBackup2.actions.initialize.logger
CedarBackup2.actions.purge.logger
CedarBackup2.actions.rebuild.logger
CedarBackup2.actions.stage.logger
CedarBackup2.actions.store.logger
CedarBackup2.actions.util.logger
CedarBackup2.actions.validate.logger
CedarBackup2.cli.logger
CedarBackup2.config.logger
CedarBackup2.customize.logger
CedarBackup2.extend.amazons3.logger
CedarBackup2.extend.capacity.logger
CedarBackup2.extend.encrypt.logger
CedarBackup2.extend.mbox.logger
CedarBackup2.extend.mysql.logger
CedarBackup2.extend.postgresql.logger
CedarBackup2.extend.split.logger
CedarBackup2.extend.subversion.logger
CedarBackup2.extend.sysinfo.logger
CedarBackup2.filesystem.logger
CedarBackup2.peer.logger
CedarBackup2.tools.amazons3.logger
CedarBackup2.tools.span.logger
CedarBackup2.util.logger
CedarBackup2.writers.cdwriter.logger
CedarBackup2.writers.dvdwriter.logger
CedarBackup2.writers.util.logger
CedarBackup2.xmlutil.logger" class="py-name" href="#" onclick="return doclink('link-177', 'logger', 'link-15');">logger</a></tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt class="py-string">"Failed looking for collect indicator: %s"</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">)</tt> </tt>
<a name="L837"></a><tt class="py-lineno"> 837</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
<a name="L838"></a><tt class="py-lineno"> 838</tt> <tt class="py-line"> <tt class="py-keyword">finally</tt><tt class="py-op">:</tt> </tt>
<a name="L839"></a><tt class="py-lineno"> 839</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">exists</tt><tt class="py-op">(</tt><tt class="py-name">targetFile</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L840"></a><tt class="py-lineno"> 840</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L841"></a><tt class="py-lineno"> 841</tt> <tt class="py-line"> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">remove</tt><tt class="py-op">(</tt><tt class="py-name">targetFile</tt><tt class="py-op">)</tt> </tt>
<a name="L842"></a><tt class="py-lineno"> 842</tt> <tt class="py-line"> <tt class="py-keyword">except</tt><tt class="py-op">:</tt> <tt class="py-keyword">pass</tt> </tt>
</div><a name="L843"></a><tt class="py-lineno"> 843</tt> <tt class="py-line"> </tt>
<a name="RemotePeer.writeStageIndicator"></a><div id="RemotePeer.writeStageIndicator-def"><a name="L844"></a><tt class="py-lineno"> 844</tt> <a class="py-toggle" href="#" id="RemotePeer.writeStageIndicator-toggle" onclick="return toggle('RemotePeer.writeStageIndicator');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="CedarBackup2.peer.RemotePeer-class.html#writeStageIndicator">writeStageIndicator</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">stageIndicator</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="RemotePeer.writeStageIndicator-collapsed" style="display:none;" pad="++++" indent="+++++++"></div><div id="RemotePeer.writeStageIndicator-expanded"><a name="L845"></a><tt class="py-lineno"> 845</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
<a name="L846"></a><tt class="py-lineno"> 846</tt> <tt class="py-line"><tt class="py-docstring"> Writes the stage indicator in the peer's staging directory.</tt> </tt>
<a name="L847"></a><tt class="py-lineno"> 847</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L848"></a><tt class="py-lineno"> 848</tt> <tt class="py-line"><tt class="py-docstring"> When the master has completed collecting its backup files, it will write</tt> </tt>
<a name="L849"></a><tt class="py-lineno"> 849</tt> <tt class="py-line"><tt class="py-docstring"> an empty indicator file into the peer's collect directory. The presence</tt> </tt>
<a name="L850"></a><tt class="py-lineno"> 850</tt> <tt class="py-line"><tt class="py-docstring"> of this file implies that the staging process is complete.</tt> </tt>
<a name="L851"></a><tt class="py-lineno"> 851</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L852"></a><tt class="py-lineno"> 852</tt> <tt class="py-line"><tt class="py-docstring"> If you need to, you can override the name of the stage indicator file by</tt> </tt>
<a name="L853"></a><tt class="py-lineno"> 853</tt> <tt class="py-line"><tt class="py-docstring"> passing in a different name.</tt> </tt>
<a name="L854"></a><tt class="py-lineno"> 854</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L855"></a><tt class="py-lineno"> 855</tt> <tt class="py-line"><tt class="py-docstring"> @note: If you have user/group as strings, call the L{util.getUidGid} function</tt> </tt>
<a name="L856"></a><tt class="py-lineno"> 856</tt> <tt class="py-line"><tt class="py-docstring"> to get the associated uid/gid as an ownership tuple.</tt> </tt>
<a name="L857"></a><tt class="py-lineno"> 857</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L858"></a><tt class="py-lineno"> 858</tt> <tt class="py-line"><tt class="py-docstring"> @param stageIndicator: Name of the indicator file to write</tt> </tt>
<a name="L859"></a><tt class="py-lineno"> 859</tt> <tt class="py-line"><tt class="py-docstring"> @type stageIndicator: String representing name of a file in the collect directory</tt> </tt>
<a name="L860"></a><tt class="py-lineno"> 860</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L861"></a><tt class="py-lineno"> 861</tt> <tt class="py-line"><tt class="py-docstring"> @raise ValueError: If a path cannot be encoded properly.</tt> </tt>
<a name="L862"></a><tt class="py-lineno"> 862</tt> <tt class="py-line"><tt class="py-docstring"> @raise IOError: If there is an IO error creating the file.</tt> </tt>
<a name="L863"></a><tt class="py-lineno"> 863</tt> <tt class="py-line"><tt class="py-docstring"> @raise OSError: If there is an OS error creating or changing permissions on the file</tt> </tt>
<a name="L864"></a><tt class="py-lineno"> 864</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="L865"></a><tt class="py-lineno"> 865</tt> <tt class="py-line"> <tt class="py-name">stageIndicator</tt> <tt class="py-op">=</tt> <tt id="link-178" class="py-name"><a title="CedarBackup2.util.encodePath" class="py-name" href="#" onclick="return doclink('link-178', 'encodePath', 'link-11');">encodePath</a></tt><tt class="py-op">(</tt><tt class="py-name">stageIndicator</tt><tt class="py-op">)</tt> </tt>
<a name="L866"></a><tt class="py-lineno"> 866</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">stageIndicator</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L867"></a><tt class="py-lineno"> 867</tt> <tt class="py-line"> <tt class="py-name">sourceFile</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-179" class="py-name"><a title="CedarBackup2.config.OptionsConfig.workingDir
CedarBackup2.peer.RemotePeer.workingDir" class="py-name" href="#" onclick="return doclink('link-179', 'workingDir', 'link-95');">workingDir</a></tt><tt class="py-op">,</tt> <tt id="link-180" class="py-name"><a title="CedarBackup2.peer.DEF_STAGE_INDICATOR" class="py-name" href="#" onclick="return doclink('link-180', 'DEF_STAGE_INDICATOR', 'link-20');">DEF_STAGE_INDICATOR</a></tt><tt class="py-op">)</tt> </tt>
<a name="L868"></a><tt class="py-lineno"> 868</tt> <tt class="py-line"> <tt class="py-name">targetFile</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-181" class="py-name"><a title="CedarBackup2.config.LocalPeer.collectDir
CedarBackup2.config.RemotePeer.collectDir
CedarBackup2.peer.LocalPeer.collectDir
CedarBackup2.peer.RemotePeer.collectDir" class="py-name" href="#" onclick="return doclink('link-181', 'collectDir', 'link-24');">collectDir</a></tt><tt class="py-op">,</tt> <tt id="link-182" class="py-name"><a title="CedarBackup2.peer.DEF_STAGE_INDICATOR" class="py-name" href="#" onclick="return doclink('link-182', 'DEF_STAGE_INDICATOR', 'link-20');">DEF_STAGE_INDICATOR</a></tt><tt class="py-op">)</tt> </tt>
<a name="L869"></a><tt class="py-lineno"> 869</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L870"></a><tt class="py-lineno"> 870</tt> <tt class="py-line"> <tt class="py-name">sourceFile</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-183" class="py-name"><a title="CedarBackup2.config.OptionsConfig.workingDir
CedarBackup2.peer.RemotePeer.workingDir" class="py-name" href="#" onclick="return doclink('link-183', 'workingDir', 'link-95');">workingDir</a></tt><tt class="py-op">,</tt> <tt id="link-184" class="py-name"><a title="CedarBackup2.peer.DEF_STAGE_INDICATOR" class="py-name" href="#" onclick="return doclink('link-184', 'DEF_STAGE_INDICATOR', 'link-20');">DEF_STAGE_INDICATOR</a></tt><tt class="py-op">)</tt> </tt>
<a name="L871"></a><tt class="py-lineno"> 871</tt> <tt class="py-line"> <tt class="py-name">targetFile</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-185" class="py-name"><a title="CedarBackup2.config.LocalPeer.collectDir
CedarBackup2.config.RemotePeer.collectDir
CedarBackup2.peer.LocalPeer.collectDir
CedarBackup2.peer.RemotePeer.collectDir" class="py-name" href="#" onclick="return doclink('link-185', 'collectDir', 'link-24');">collectDir</a></tt><tt class="py-op">,</tt> <tt class="py-name">stageIndicator</tt><tt class="py-op">)</tt> </tt>
<a name="L872"></a><tt class="py-lineno"> 872</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L873"></a><tt class="py-lineno"> 873</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">exists</tt><tt class="py-op">(</tt><tt class="py-name">sourceFile</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L874"></a><tt class="py-lineno"> 874</tt> <tt class="py-line"> <tt class="py-name">open</tt><tt class="py-op">(</tt><tt class="py-name">sourceFile</tt><tt class="py-op">,</tt> <tt class="py-string">"w"</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">write</tt><tt class="py-op">(</tt><tt class="py-string">""</tt><tt class="py-op">)</tt> </tt>
<a name="L875"></a><tt class="py-lineno"> 875</tt> <tt class="py-line"> <tt id="link-186" class="py-name"><a title="CedarBackup2.config.RemotePeer
CedarBackup2.peer.RemotePeer" class="py-name" href="#" onclick="return doclink('link-186', 'RemotePeer', 'link-156');">RemotePeer</a></tt><tt class="py-op">.</tt><tt id="link-187" class="py-name" targets="Static Method CedarBackup2.peer.RemotePeer._pushLocalFile()=CedarBackup2.peer.RemotePeer-class.html#_pushLocalFile"><a title="CedarBackup2.peer.RemotePeer._pushLocalFile" class="py-name" href="#" onclick="return doclink('link-187', '_pushLocalFile', 'link-187');">_pushLocalFile</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-188" class="py-name"><a title="CedarBackup2.config.RemotePeer.remoteUser
CedarBackup2.peer.RemotePeer.remoteUser" class="py-name" href="#" onclick="return doclink('link-188', 'remoteUser', 'link-97');">remoteUser</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-189" class="py-name"><a title="CedarBackup2.peer.RemotePeer.localUser" class="py-name" href="#" onclick="return doclink('link-189', 'localUser', 'link-99');">localUser</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-190" class="py-name"><a title="CedarBackup2.config.ExtendedAction.name
CedarBackup2.config.LocalPeer.name
CedarBackup2.config.RemotePeer.name
CedarBackup2.peer.LocalPeer.name
CedarBackup2.peer.RemotePeer.name
CedarBackup2.util.DirectedGraph.name" class="py-name" href="#" onclick="return doclink('link-190', 'name', 'link-22');">name</a></tt><tt class="py-op">,</tt> </tt>
<a name="L876"></a><tt class="py-lineno"> 876</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_rcpCommand</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_rcpCommandList</tt><tt class="py-op">,</tt> </tt>
<a name="L877"></a><tt class="py-lineno"> 877</tt> <tt class="py-line"> <tt class="py-name">sourceFile</tt><tt class="py-op">,</tt> <tt class="py-name">targetFile</tt><tt class="py-op">)</tt> </tt>
<a name="L878"></a><tt class="py-lineno"> 878</tt> <tt class="py-line"> <tt class="py-keyword">finally</tt><tt class="py-op">:</tt> </tt>
<a name="L879"></a><tt class="py-lineno"> 879</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">exists</tt><tt class="py-op">(</tt><tt class="py-name">sourceFile</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L880"></a><tt class="py-lineno"> 880</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L881"></a><tt class="py-lineno"> 881</tt> <tt class="py-line"> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">remove</tt><tt class="py-op">(</tt><tt class="py-name">sourceFile</tt><tt class="py-op">)</tt> </tt>
<a name="L882"></a><tt class="py-lineno"> 882</tt> <tt class="py-line"> <tt class="py-keyword">except</tt><tt class="py-op">:</tt> <tt class="py-keyword">pass</tt> </tt>
</div><a name="L883"></a><tt class="py-lineno"> 883</tt> <tt class="py-line"> </tt>
<a name="RemotePeer.executeRemoteCommand"></a><div id="RemotePeer.executeRemoteCommand-def"><a name="L884"></a><tt class="py-lineno"> 884</tt> <a class="py-toggle" href="#" id="RemotePeer.executeRemoteCommand-toggle" onclick="return toggle('RemotePeer.executeRemoteCommand');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="CedarBackup2.peer.RemotePeer-class.html#executeRemoteCommand">executeRemoteCommand</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">command</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="RemotePeer.executeRemoteCommand-collapsed" style="display:none;" pad="++++" indent="+++++++"></div><div id="RemotePeer.executeRemoteCommand-expanded"><a name="L885"></a><tt class="py-lineno"> 885</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
<a name="L886"></a><tt class="py-lineno"> 886</tt> <tt class="py-line"><tt class="py-docstring"> Executes a command on the peer via remote shell.</tt> </tt>
<a name="L887"></a><tt class="py-lineno"> 887</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L888"></a><tt class="py-lineno"> 888</tt> <tt class="py-line"><tt class="py-docstring"> @param command: Command to execute</tt> </tt>
<a name="L889"></a><tt class="py-lineno"> 889</tt> <tt class="py-line"><tt class="py-docstring"> @type command: String command-line suitable for use with rsh.</tt> </tt>
<a name="L890"></a><tt class="py-lineno"> 890</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L891"></a><tt class="py-lineno"> 891</tt> <tt class="py-line"><tt class="py-docstring"> @raise IOError: If there is an error executing the command on the remote peer.</tt> </tt>
<a name="L892"></a><tt class="py-lineno"> 892</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="L893"></a><tt class="py-lineno"> 893</tt> <tt class="py-line"> <tt id="link-191" class="py-name"><a title="CedarBackup2.config.RemotePeer
CedarBackup2.peer.RemotePeer" class="py-name" href="#" onclick="return doclink('link-191', 'RemotePeer', 'link-156');">RemotePeer</a></tt><tt class="py-op">.</tt><tt id="link-192" class="py-name" targets="Static Method CedarBackup2.peer.RemotePeer._executeRemoteCommand()=CedarBackup2.peer.RemotePeer-class.html#_executeRemoteCommand"><a title="CedarBackup2.peer.RemotePeer._executeRemoteCommand" class="py-name" href="#" onclick="return doclink('link-192', '_executeRemoteCommand', 'link-192');">_executeRemoteCommand</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-193" class="py-name"><a title="CedarBackup2.config.RemotePeer.remoteUser
CedarBackup2.peer.RemotePeer.remoteUser" class="py-name" href="#" onclick="return doclink('link-193', 'remoteUser', 'link-97');">remoteUser</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-194" class="py-name"><a title="CedarBackup2.peer.RemotePeer.localUser" class="py-name" href="#" onclick="return doclink('link-194', 'localUser', 'link-99');">localUser</a></tt><tt class="py-op">,</tt> </tt>
<a name="L894"></a><tt class="py-lineno"> 894</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-195" class="py-name"><a title="CedarBackup2.config.ExtendedAction.name
CedarBackup2.config.LocalPeer.name
CedarBackup2.config.RemotePeer.name
CedarBackup2.peer.LocalPeer.name
CedarBackup2.peer.RemotePeer.name
CedarBackup2.util.DirectedGraph.name" class="py-name" href="#" onclick="return doclink('link-195', 'name', 'link-22');">name</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_rshCommand</tt><tt class="py-op">,</tt> </tt>
<a name="L895"></a><tt class="py-lineno"> 895</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_rshCommandList</tt><tt class="py-op">,</tt> <tt id="link-196" class="py-name" targets="Variable CedarBackup2.config.ActionHook.command=CedarBackup2.config.ActionHook-class.html#command,Variable CedarBackup2.config.CommandOverride.command=CedarBackup2.config.CommandOverride-class.html#command"><a title="CedarBackup2.config.ActionHook.command
CedarBackup2.config.CommandOverride.command" class="py-name" href="#" onclick="return doclink('link-196', 'command', 'link-196');">command</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L896"></a><tt class="py-lineno"> 896</tt> <tt class="py-line"> </tt>
<a name="RemotePeer.executeManagedAction"></a><div id="RemotePeer.executeManagedAction-def"><a name="L897"></a><tt class="py-lineno"> 897</tt> <a class="py-toggle" href="#" id="RemotePeer.executeManagedAction-toggle" onclick="return toggle('RemotePeer.executeManagedAction');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="CedarBackup2.peer.RemotePeer-class.html#executeManagedAction">executeManagedAction</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">action</tt><tt class="py-op">,</tt> <tt class="py-param">fullBackup</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="RemotePeer.executeManagedAction-collapsed" style="display:none;" pad="++++" indent="+++++++"></div><div id="RemotePeer.executeManagedAction-expanded"><a name="L898"></a><tt class="py-lineno"> 898</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
<a name="L899"></a><tt class="py-lineno"> 899</tt> <tt class="py-line"><tt class="py-docstring"> Executes a managed action on this peer.</tt> </tt>
<a name="L900"></a><tt class="py-lineno"> 900</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L901"></a><tt class="py-lineno"> 901</tt> <tt class="py-line"><tt class="py-docstring"> @param action: Name of the action to execute.</tt> </tt>
<a name="L902"></a><tt class="py-lineno"> 902</tt> <tt class="py-line"><tt class="py-docstring"> @param fullBackup: Whether a full backup should be executed.</tt> </tt>
<a name="L903"></a><tt class="py-lineno"> 903</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L904"></a><tt class="py-lineno"> 904</tt> <tt class="py-line"><tt class="py-docstring"> @raise IOError: If there is an error executing the action on the remote peer.</tt> </tt>
<a name="L905"></a><tt class="py-lineno"> 905</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="L906"></a><tt class="py-lineno"> 906</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L907"></a><tt class="py-lineno"> 907</tt> <tt class="py-line"> <tt id="link-197" class="py-name"><a title="CedarBackup2.config.ActionHook.command
CedarBackup2.config.CommandOverride.command" class="py-name" href="#" onclick="return doclink('link-197', 'command', 'link-196');">command</a></tt> <tt class="py-op">=</tt> <tt id="link-198" class="py-name"><a title="CedarBackup2.config.RemotePeer
CedarBackup2.peer.RemotePeer" class="py-name" href="#" onclick="return doclink('link-198', 'RemotePeer', 'link-156');">RemotePeer</a></tt><tt class="py-op">.</tt><tt id="link-199" class="py-name" targets="Static Method CedarBackup2.peer.RemotePeer._buildCbackCommand()=CedarBackup2.peer.RemotePeer-class.html#_buildCbackCommand"><a title="CedarBackup2.peer.RemotePeer._buildCbackCommand" class="py-name" href="#" onclick="return doclink('link-199', '_buildCbackCommand', 'link-199');">_buildCbackCommand</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-200" class="py-name"><a title="CedarBackup2.config.OptionsConfig.cbackCommand
CedarBackup2.config.RemotePeer.cbackCommand
CedarBackup2.peer.RemotePeer.cbackCommand" class="py-name" href="#" onclick="return doclink('link-200', 'cbackCommand', 'link-105');">cbackCommand</a></tt><tt class="py-op">,</tt> <tt id="link-201" class="py-name" targets="Module CedarBackup2.action=CedarBackup2.action-module.html,Variable CedarBackup2.config.ActionHook.action=CedarBackup2.config.ActionHook-class.html#action"><a title="CedarBackup2.action
CedarBackup2.config.ActionHook.action" class="py-name" href="#" onclick="return doclink('link-201', 'action', 'link-201');">action</a></tt><tt class="py-op">,</tt> <tt class="py-name">fullBackup</tt><tt class="py-op">)</tt> </tt>
<a name="L908"></a><tt class="py-lineno"> 908</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-202" class="py-name" targets="Method CedarBackup2.peer.RemotePeer.executeRemoteCommand()=CedarBackup2.peer.RemotePeer-class.html#executeRemoteCommand"><a title="CedarBackup2.peer.RemotePeer.executeRemoteCommand" class="py-name" href="#" onclick="return doclink('link-202', 'executeRemoteCommand', 'link-202');">executeRemoteCommand</a></tt><tt class="py-op">(</tt><tt id="link-203" class="py-name"><a title="CedarBackup2.config.ActionHook.command
CedarBackup2.config.CommandOverride.command" class="py-name" href="#" onclick="return doclink('link-203', 'command', 'link-196');">command</a></tt><tt class="py-op">)</tt> </tt>
<a name="L909"></a><tt class="py-lineno"> 909</tt> <tt class="py-line"> <tt class="py-keyword">except</tt> <tt class="py-name">IOError</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">:</tt> </tt>
<a name="L910"></a><tt class="py-lineno"> 910</tt> <tt class="py-line"> <tt id="link-204" class="py-name"><a title="CedarBackup2.actions.collect.logger
CedarBackup2.actions.initialize.logger
CedarBackup2.actions.purge.logger
CedarBackup2.actions.rebuild.logger
CedarBackup2.actions.stage.logger
CedarBackup2.actions.store.logger
CedarBackup2.actions.util.logger
CedarBackup2.actions.validate.logger
CedarBackup2.cli.logger
CedarBackup2.config.logger
CedarBackup2.customize.logger
CedarBackup2.extend.amazons3.logger
CedarBackup2.extend.capacity.logger
CedarBackup2.extend.encrypt.logger
CedarBackup2.extend.mbox.logger
CedarBackup2.extend.mysql.logger
CedarBackup2.extend.postgresql.logger
CedarBackup2.extend.split.logger
CedarBackup2.extend.subversion.logger
CedarBackup2.extend.sysinfo.logger
CedarBackup2.filesystem.logger
CedarBackup2.peer.logger
CedarBackup2.tools.amazons3.logger
CedarBackup2.tools.span.logger
CedarBackup2.util.logger
CedarBackup2.writers.cdwriter.logger
CedarBackup2.writers.dvdwriter.logger
CedarBackup2.writers.util.logger
CedarBackup2.xmlutil.logger" class="py-name" href="#" onclick="return doclink('link-204', 'logger', 'link-15');">logger</a></tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt class="py-name">e</tt><tt class="py-op">)</tt> </tt>
<a name="L911"></a><tt class="py-lineno"> 911</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">IOError</tt><tt class="py-op">(</tt><tt class="py-string">"Failed to execute action [%s] on managed client [%s]."</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt id="link-205" class="py-name"><a title="CedarBackup2.action
CedarBackup2.config.ActionHook.action" class="py-name" href="#" onclick="return doclink('link-205', 'action', 'link-201');">action</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-206" class="py-name"><a title="CedarBackup2.config.ExtendedAction.name
CedarBackup2.config.LocalPeer.name
CedarBackup2.config.RemotePeer.name
CedarBackup2.peer.LocalPeer.name
CedarBackup2.peer.RemotePeer.name
CedarBackup2.util.DirectedGraph.name" class="py-name" href="#" onclick="return doclink('link-206', 'name', 'link-22');">name</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L912"></a><tt class="py-lineno"> 912</tt> <tt class="py-line"> </tt>
<a name="L913"></a><tt class="py-lineno"> 913</tt> <tt class="py-line"> </tt>
<a name="L914"></a><tt class="py-lineno"> 914</tt> <tt class="py-line"> <tt class="py-comment">##################</tt> </tt>
<a name="L915"></a><tt class="py-lineno"> 915</tt> <tt class="py-line"> <tt class="py-comment"># Private methods</tt> </tt>
<a name="L916"></a><tt class="py-lineno"> 916</tt> <tt class="py-line"> <tt class="py-comment">##################</tt> </tt>
<a name="L917"></a><tt class="py-lineno"> 917</tt> <tt class="py-line"> </tt>
<a name="L918"></a><tt class="py-lineno"> 918</tt> <tt class="py-line"> <tt class="py-decorator">@</tt><tt class="py-decorator">staticmethod</tt> </tt>
<a name="RemotePeer._getDirContents"></a><div id="RemotePeer._getDirContents-def"><a name="L919"></a><tt class="py-lineno"> 919</tt> <a class="py-toggle" href="#" id="RemotePeer._getDirContents-toggle" onclick="return toggle('RemotePeer._getDirContents');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="CedarBackup2.peer.RemotePeer-class.html#_getDirContents">_getDirContents</a><tt class="py-op">(</tt><tt class="py-param">path</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="RemotePeer._getDirContents-collapsed" style="display:none;" pad="++++" indent="+++++++"></div><div id="RemotePeer._getDirContents-expanded"><a name="L920"></a><tt class="py-lineno"> 920</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
<a name="L921"></a><tt class="py-lineno"> 921</tt> <tt class="py-line"><tt class="py-docstring"> Returns the contents of a directory in terms of a Set.</tt> </tt>
<a name="L922"></a><tt class="py-lineno"> 922</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L923"></a><tt class="py-lineno"> 923</tt> <tt class="py-line"><tt class="py-docstring"> The directory's contents are read as a L{FilesystemList} containing only</tt> </tt>
<a name="L924"></a><tt class="py-lineno"> 924</tt> <tt class="py-line"><tt class="py-docstring"> files, and then the list is converted into a set object for later use.</tt> </tt>
<a name="L925"></a><tt class="py-lineno"> 925</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L926"></a><tt class="py-lineno"> 926</tt> <tt class="py-line"><tt class="py-docstring"> @param path: Directory path to get contents for</tt> </tt>
<a name="L927"></a><tt class="py-lineno"> 927</tt> <tt class="py-line"><tt class="py-docstring"> @type path: String representing a path on disk</tt> </tt>
<a name="L928"></a><tt class="py-lineno"> 928</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L929"></a><tt class="py-lineno"> 929</tt> <tt class="py-line"><tt class="py-docstring"> @return: Set of files in the directory</tt> </tt>
<a name="L930"></a><tt class="py-lineno"> 930</tt> <tt class="py-line"><tt class="py-docstring"> @raise ValueError: If path is not a directory or does not exist.</tt> </tt>
<a name="L931"></a><tt class="py-lineno"> 931</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="L932"></a><tt class="py-lineno"> 932</tt> <tt class="py-line"> <tt class="py-name">contents</tt> <tt class="py-op">=</tt> <tt id="link-207" class="py-name"><a title="CedarBackup2.filesystem.FilesystemList" class="py-name" href="#" onclick="return doclink('link-207', 'FilesystemList', 'link-2');">FilesystemList</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L933"></a><tt class="py-lineno"> 933</tt> <tt class="py-line"> <tt class="py-name">contents</tt><tt class="py-op">.</tt><tt id="link-208" class="py-name" targets="Variable CedarBackup2.filesystem.FilesystemList.excludeDirs=CedarBackup2.filesystem.FilesystemList-class.html#excludeDirs"><a title="CedarBackup2.filesystem.FilesystemList.excludeDirs" class="py-name" href="#" onclick="return doclink('link-208', 'excludeDirs', 'link-208');">excludeDirs</a></tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L934"></a><tt class="py-lineno"> 934</tt> <tt class="py-line"> <tt class="py-name">contents</tt><tt class="py-op">.</tt><tt id="link-209" class="py-name" targets="Variable CedarBackup2.filesystem.FilesystemList.excludeLinks=CedarBackup2.filesystem.FilesystemList-class.html#excludeLinks"><a title="CedarBackup2.filesystem.FilesystemList.excludeLinks" class="py-name" href="#" onclick="return doclink('link-209', 'excludeLinks', 'link-209');">excludeLinks</a></tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L935"></a><tt class="py-lineno"> 935</tt> <tt class="py-line"> <tt class="py-name">contents</tt><tt class="py-op">.</tt><tt id="link-210" class="py-name" targets="Method CedarBackup2.filesystem.FilesystemList.addDirContents()=CedarBackup2.filesystem.FilesystemList-class.html#addDirContents,Method CedarBackup2.filesystem.PurgeItemList.addDirContents()=CedarBackup2.filesystem.PurgeItemList-class.html#addDirContents"><a title="CedarBackup2.filesystem.FilesystemList.addDirContents
CedarBackup2.filesystem.PurgeItemList.addDirContents" class="py-name" href="#" onclick="return doclink('link-210', 'addDirContents', 'link-210');">addDirContents</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">)</tt> </tt>
<a name="L936"></a><tt class="py-lineno"> 936</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L937"></a><tt class="py-lineno"> 937</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">set</tt><tt class="py-op">(</tt><tt class="py-name">contents</tt><tt class="py-op">)</tt> </tt>
<a name="L938"></a><tt class="py-lineno"> 938</tt> <tt class="py-line"> <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L939"></a><tt class="py-lineno"> 939</tt> <tt class="py-line"> <tt class="py-keyword">import</tt> <tt class="py-name">sets</tt> </tt>
<a name="L940"></a><tt class="py-lineno"> 940</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">sets</tt><tt class="py-op">.</tt><tt class="py-name">Set</tt><tt class="py-op">(</tt><tt class="py-name">contents</tt><tt class="py-op">)</tt> </tt>
</div><a name="L941"></a><tt class="py-lineno"> 941</tt> <tt class="py-line"> </tt>
<a name="L942"></a><tt class="py-lineno"> 942</tt> <tt class="py-line"> <tt class="py-decorator">@</tt><tt class="py-decorator">staticmethod</tt> </tt>
<a name="RemotePeer._copyRemoteDir"></a><div id="RemotePeer._copyRemoteDir-def"><a name="L943"></a><tt class="py-lineno"> 943</tt> <a class="py-toggle" href="#" id="RemotePeer._copyRemoteDir-toggle" onclick="return toggle('RemotePeer._copyRemoteDir');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="CedarBackup2.peer.RemotePeer-class.html#_copyRemoteDir">_copyRemoteDir</a><tt class="py-op">(</tt><tt class="py-param">remoteUser</tt><tt class="py-op">,</tt> <tt class="py-param">localUser</tt><tt class="py-op">,</tt> <tt class="py-param">remoteHost</tt><tt class="py-op">,</tt> <tt class="py-param">rcpCommand</tt><tt class="py-op">,</tt> <tt class="py-param">rcpCommandList</tt><tt class="py-op">,</tt> </tt>
<a name="L944"></a><tt class="py-lineno"> 944</tt> <tt class="py-line"> <tt class="py-param">sourceDir</tt><tt class="py-op">,</tt> <tt class="py-param">targetDir</tt><tt class="py-op">,</tt> <tt class="py-param">ownership</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">permissions</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="RemotePeer._copyRemoteDir-collapsed" style="display:none;" pad="++++" indent="+++++++"></div><div id="RemotePeer._copyRemoteDir-expanded"><a name="L945"></a><tt class="py-lineno"> 945</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
<a name="L946"></a><tt class="py-lineno"> 946</tt> <tt class="py-line"><tt class="py-docstring"> Copies files from the source directory to the target directory.</tt> </tt>
<a name="L947"></a><tt class="py-lineno"> 947</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L948"></a><tt class="py-lineno"> 948</tt> <tt class="py-line"><tt class="py-docstring"> This function is not recursive. Only the files in the directory will be</tt> </tt>
<a name="L949"></a><tt class="py-lineno"> 949</tt> <tt class="py-line"><tt class="py-docstring"> copied. Ownership and permissions will be left at their default values</tt> </tt>
<a name="L950"></a><tt class="py-lineno"> 950</tt> <tt class="py-line"><tt class="py-docstring"> if new values are not specified. Behavior when copying soft links from</tt> </tt>
<a name="L951"></a><tt class="py-lineno"> 951</tt> <tt class="py-line"><tt class="py-docstring"> the collect directory is dependent on the behavior of the specified rcp</tt> </tt>
<a name="L952"></a><tt class="py-lineno"> 952</tt> <tt class="py-line"><tt class="py-docstring"> command.</tt> </tt>
<a name="L953"></a><tt class="py-lineno"> 953</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L954"></a><tt class="py-lineno"> 954</tt> <tt class="py-line"><tt class="py-docstring"> @note: The returned count of copied files might be inaccurate if some of</tt> </tt>
<a name="L955"></a><tt class="py-lineno"> 955</tt> <tt class="py-line"><tt class="py-docstring"> the copied files already existed in the staging directory prior to the</tt> </tt>
<a name="L956"></a><tt class="py-lineno"> 956</tt> <tt class="py-line"><tt class="py-docstring"> copy taking place. We don't clear the staging directory first, because</tt> </tt>
<a name="L957"></a><tt class="py-lineno"> 957</tt> <tt class="py-line"><tt class="py-docstring"> some extension might also be using it.</tt> </tt>
<a name="L958"></a><tt class="py-lineno"> 958</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L959"></a><tt class="py-lineno"> 959</tt> <tt class="py-line"><tt class="py-docstring"> @note: If you have user/group as strings, call the L{util.getUidGid} function</tt> </tt>
<a name="L960"></a><tt class="py-lineno"> 960</tt> <tt class="py-line"><tt class="py-docstring"> to get the associated uid/gid as an ownership tuple.</tt> </tt>
<a name="L961"></a><tt class="py-lineno"> 961</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L962"></a><tt class="py-lineno"> 962</tt> <tt class="py-line"><tt class="py-docstring"> @note: We don't have a good way of knowing exactly what files we copied</tt> </tt>
<a name="L963"></a><tt class="py-lineno"> 963</tt> <tt class="py-line"><tt class="py-docstring"> down from the remote peer, unless we want to parse the output of the rcp</tt> </tt>
<a name="L964"></a><tt class="py-lineno"> 964</tt> <tt class="py-line"><tt class="py-docstring"> command (ugh). We could change permissions on everything in the target</tt> </tt>
<a name="L965"></a><tt class="py-lineno"> 965</tt> <tt class="py-line"><tt class="py-docstring"> directory, but that's kind of ugly too. Instead, we use Python's set</tt> </tt>
<a name="L966"></a><tt class="py-lineno"> 966</tt> <tt class="py-line"><tt class="py-docstring"> functionality to figure out what files were added while we executed the</tt> </tt>
<a name="L967"></a><tt class="py-lineno"> 967</tt> <tt class="py-line"><tt class="py-docstring"> rcp command. This isn't perfect - for instance, it's not correct if</tt> </tt>
<a name="L968"></a><tt class="py-lineno"> 968</tt> <tt class="py-line"><tt class="py-docstring"> someone else is messing with the directory at the same time we're doing</tt> </tt>
<a name="L969"></a><tt class="py-lineno"> 969</tt> <tt class="py-line"><tt class="py-docstring"> the remote copy - but it's about as good as we're going to get.</tt> </tt>
<a name="L970"></a><tt class="py-lineno"> 970</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L971"></a><tt class="py-lineno"> 971</tt> <tt class="py-line"><tt class="py-docstring"> @note: Apparently, we can't count on all rcp-compatible implementations</tt> </tt>
<a name="L972"></a><tt class="py-lineno"> 972</tt> <tt class="py-line"><tt class="py-docstring"> to return sensible errors for some error conditions. As an example, the</tt> </tt>
<a name="L973"></a><tt class="py-lineno"> 973</tt> <tt class="py-line"><tt class="py-docstring"> C{scp} command in Debian 'woody' returns a zero (normal) status even</tt> </tt>
<a name="L974"></a><tt class="py-lineno"> 974</tt> <tt class="py-line"><tt class="py-docstring"> when it can't find a host or if the login or path is invalid. We try</tt> </tt>
<a name="L975"></a><tt class="py-lineno"> 975</tt> <tt class="py-line"><tt class="py-docstring"> to work around this by issuing C{IOError} if we don't copy any files from</tt> </tt>
<a name="L976"></a><tt class="py-lineno"> 976</tt> <tt class="py-line"><tt class="py-docstring"> the remote host.</tt> </tt>
<a name="L977"></a><tt class="py-lineno"> 977</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L978"></a><tt class="py-lineno"> 978</tt> <tt class="py-line"><tt class="py-docstring"> @param remoteUser: Name of the Cedar Backup user on the remote peer</tt> </tt>
<a name="L979"></a><tt class="py-lineno"> 979</tt> <tt class="py-line"><tt class="py-docstring"> @type remoteUser: String representing a username, valid via the copy command</tt> </tt>
<a name="L980"></a><tt class="py-lineno"> 980</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L981"></a><tt class="py-lineno"> 981</tt> <tt class="py-line"><tt class="py-docstring"> @param localUser: Name of the Cedar Backup user on the current host</tt> </tt>
<a name="L982"></a><tt class="py-lineno"> 982</tt> <tt class="py-line"><tt class="py-docstring"> @type localUser: String representing a username, valid on the current host</tt> </tt>
<a name="L983"></a><tt class="py-lineno"> 983</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L984"></a><tt class="py-lineno"> 984</tt> <tt class="py-line"><tt class="py-docstring"> @param remoteHost: Hostname of the remote peer</tt> </tt>
<a name="L985"></a><tt class="py-lineno"> 985</tt> <tt class="py-line"><tt class="py-docstring"> @type remoteHost: String representing a hostname, accessible via the copy command</tt> </tt>
<a name="L986"></a><tt class="py-lineno"> 986</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L987"></a><tt class="py-lineno"> 987</tt> <tt class="py-line"><tt class="py-docstring"> @param rcpCommand: An rcp-compatible copy command to use for copying files from the peer</tt> </tt>
<a name="L988"></a><tt class="py-lineno"> 988</tt> <tt class="py-line"><tt class="py-docstring"> @type rcpCommand: String representing a system command including required arguments</tt> </tt>
<a name="L989"></a><tt class="py-lineno"> 989</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L990"></a><tt class="py-lineno"> 990</tt> <tt class="py-line"><tt class="py-docstring"> @param rcpCommandList: An rcp-compatible copy command to use for copying files</tt> </tt>
<a name="L991"></a><tt class="py-lineno"> 991</tt> <tt class="py-line"><tt class="py-docstring"> @type rcpCommandList: Command as a list to be passed to L{util.executeCommand}</tt> </tt>
<a name="L992"></a><tt class="py-lineno"> 992</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L993"></a><tt class="py-lineno"> 993</tt> <tt class="py-line"><tt class="py-docstring"> @param sourceDir: Source directory</tt> </tt>
<a name="L994"></a><tt class="py-lineno"> 994</tt> <tt class="py-line"><tt class="py-docstring"> @type sourceDir: String representing a directory on disk</tt> </tt>
<a name="L995"></a><tt class="py-lineno"> 995</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L996"></a><tt class="py-lineno"> 996</tt> <tt class="py-line"><tt class="py-docstring"> @param targetDir: Target directory</tt> </tt>
<a name="L997"></a><tt class="py-lineno"> 997</tt> <tt class="py-line"><tt class="py-docstring"> @type targetDir: String representing a directory on disk</tt> </tt>
<a name="L998"></a><tt class="py-lineno"> 998</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L999"></a><tt class="py-lineno"> 999</tt> <tt class="py-line"><tt class="py-docstring"> @param ownership: Owner and group that the copied files should have</tt> </tt>
<a name="L1000"></a><tt class="py-lineno">1000</tt> <tt class="py-line"><tt class="py-docstring"> @type ownership: Tuple of numeric ids C{(uid, gid)}</tt> </tt>
<a name="L1001"></a><tt class="py-lineno">1001</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1002"></a><tt class="py-lineno">1002</tt> <tt class="py-line"><tt class="py-docstring"> @param permissions: Permissions that the staged files should have</tt> </tt>
<a name="L1003"></a><tt class="py-lineno">1003</tt> <tt class="py-line"><tt class="py-docstring"> @type permissions: UNIX permissions mode, specified in octal (i.e. C{0640}).</tt> </tt>
<a name="L1004"></a><tt class="py-lineno">1004</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1005"></a><tt class="py-lineno">1005</tt> <tt class="py-line"><tt class="py-docstring"> @return: Number of files copied from the source directory to the target directory.</tt> </tt>
<a name="L1006"></a><tt class="py-lineno">1006</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1007"></a><tt class="py-lineno">1007</tt> <tt class="py-line"><tt class="py-docstring"> @raise ValueError: If source or target is not a directory or does not exist.</tt> </tt>
<a name="L1008"></a><tt class="py-lineno">1008</tt> <tt class="py-line"><tt class="py-docstring"> @raise IOError: If there is an IO error copying the files.</tt> </tt>
<a name="L1009"></a><tt class="py-lineno">1009</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="L1010"></a><tt class="py-lineno">1010</tt> <tt class="py-line"> <tt class="py-name">beforeSet</tt> <tt class="py-op">=</tt> <tt id="link-211" class="py-name"><a title="CedarBackup2.config.RemotePeer
CedarBackup2.peer.RemotePeer" class="py-name" href="#" onclick="return doclink('link-211', 'RemotePeer', 'link-156');">RemotePeer</a></tt><tt class="py-op">.</tt><tt id="link-212" class="py-name" targets="Static Method CedarBackup2.peer.RemotePeer._getDirContents()=CedarBackup2.peer.RemotePeer-class.html#_getDirContents"><a title="CedarBackup2.peer.RemotePeer._getDirContents" class="py-name" href="#" onclick="return doclink('link-212', '_getDirContents', 'link-212');">_getDirContents</a></tt><tt class="py-op">(</tt><tt id="link-213" class="py-name"><a title="CedarBackup2.config.CollectConfig.targetDir
CedarBackup2.config.StageConfig.targetDir" class="py-name" href="#" onclick="return doclink('link-213', 'targetDir', 'link-40');">targetDir</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1011"></a><tt class="py-lineno">1011</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt id="link-214" class="py-name"><a title="CedarBackup2.peer.RemotePeer.localUser" class="py-name" href="#" onclick="return doclink('link-214', 'localUser', 'link-99');">localUser</a></tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1012"></a><tt class="py-lineno">1012</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L1013"></a><tt class="py-lineno">1013</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-215" class="py-name"><a title="CedarBackup2.util.isRunningAsRoot" class="py-name" href="#" onclick="return doclink('link-215', 'isRunningAsRoot', 'link-7');">isRunningAsRoot</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1014"></a><tt class="py-lineno">1014</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">IOError</tt><tt class="py-op">(</tt><tt class="py-string">"Only root can remote copy as another user."</tt><tt class="py-op">)</tt> </tt>
<a name="L1015"></a><tt class="py-lineno">1015</tt> <tt class="py-line"> <tt class="py-keyword">except</tt> <tt class="py-name">AttributeError</tt><tt class="py-op">:</tt> <tt class="py-keyword">pass</tt> </tt>
<a name="L1016"></a><tt class="py-lineno">1016</tt> <tt class="py-line"> <tt class="py-name">actualCommand</tt> <tt class="py-op">=</tt> <tt class="py-string">"%s %s@%s:%s/* %s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt id="link-216" class="py-name"><a title="CedarBackup2.config.OptionsConfig.rcpCommand
CedarBackup2.config.RemotePeer.rcpCommand
CedarBackup2.peer.RemotePeer.rcpCommand" class="py-name" href="#" onclick="return doclink('link-216', 'rcpCommand', 'link-101');">rcpCommand</a></tt><tt class="py-op">,</tt> <tt id="link-217" class="py-name"><a title="CedarBackup2.config.RemotePeer.remoteUser
CedarBackup2.peer.RemotePeer.remoteUser" class="py-name" href="#" onclick="return doclink('link-217', 'remoteUser', 'link-97');">remoteUser</a></tt><tt class="py-op">,</tt> <tt class="py-name">remoteHost</tt><tt class="py-op">,</tt> <tt id="link-218" class="py-name"><a title="CedarBackup2.config.StoreConfig.sourceDir
CedarBackup2.tools.amazons3.Options.sourceDir" class="py-name" href="#" onclick="return doclink('link-218', 'sourceDir', 'link-76');">sourceDir</a></tt><tt class="py-op">,</tt> <tt id="link-219" class="py-name"><a title="CedarBackup2.config.CollectConfig.targetDir
CedarBackup2.config.StageConfig.targetDir" class="py-name" href="#" onclick="return doclink('link-219', 'targetDir', 'link-40');">targetDir</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1017"></a><tt class="py-lineno">1017</tt> <tt class="py-line"> <tt id="link-220" class="py-name"><a title="CedarBackup2.config.ActionHook.command
CedarBackup2.config.CommandOverride.command" class="py-name" href="#" onclick="return doclink('link-220', 'command', 'link-196');">command</a></tt> <tt class="py-op">=</tt> <tt id="link-221" class="py-name"><a title="CedarBackup2.util.resolveCommand" class="py-name" href="#" onclick="return doclink('link-221', 'resolveCommand', 'link-5');">resolveCommand</a></tt><tt class="py-op">(</tt><tt id="link-222" class="py-name"><a title="CedarBackup2.extend.amazons3.SU_COMMAND
CedarBackup2.peer.SU_COMMAND" class="py-name" href="#" onclick="return doclink('link-222', 'SU_COMMAND', 'link-21');">SU_COMMAND</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1018"></a><tt class="py-lineno">1018</tt> <tt class="py-line"> <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt id="link-223" class="py-name"><a title="CedarBackup2.util.executeCommand" class="py-name" href="#" onclick="return doclink('link-223', 'executeCommand', 'link-6');">executeCommand</a></tt><tt class="py-op">(</tt><tt id="link-224" class="py-name"><a title="CedarBackup2.config.ActionHook.command
CedarBackup2.config.CommandOverride.command" class="py-name" href="#" onclick="return doclink('link-224', 'command', 'link-196');">command</a></tt><tt class="py-op">,</tt> <tt class="py-op">[</tt><tt id="link-225" class="py-name"><a title="CedarBackup2.peer.RemotePeer.localUser" class="py-name" href="#" onclick="return doclink('link-225', 'localUser', 'link-99');">localUser</a></tt><tt class="py-op">,</tt> <tt class="py-string">"-c"</tt><tt class="py-op">,</tt> <tt class="py-name">actualCommand</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L1019"></a><tt class="py-lineno">1019</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">result</tt> <tt class="py-op">!=</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L1020"></a><tt class="py-lineno">1020</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">IOError</tt><tt class="py-op">(</tt><tt class="py-string">"Error (%d) copying files from remote host as local user [%s]."</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">result</tt><tt class="py-op">,</tt> <tt id="link-226" class="py-name"><a title="CedarBackup2.peer.RemotePeer.localUser" class="py-name" href="#" onclick="return doclink('link-226', 'localUser', 'link-99');">localUser</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1021"></a><tt class="py-lineno">1021</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1022"></a><tt class="py-lineno">1022</tt> <tt class="py-line"> <tt class="py-name">copySource</tt> <tt class="py-op">=</tt> <tt class="py-string">"%s@%s:%s/*"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt id="link-227" class="py-name"><a title="CedarBackup2.config.RemotePeer.remoteUser
CedarBackup2.peer.RemotePeer.remoteUser" class="py-name" href="#" onclick="return doclink('link-227', 'remoteUser', 'link-97');">remoteUser</a></tt><tt class="py-op">,</tt> <tt class="py-name">remoteHost</tt><tt class="py-op">,</tt> <tt id="link-228" class="py-name"><a title="CedarBackup2.config.StoreConfig.sourceDir
CedarBackup2.tools.amazons3.Options.sourceDir" class="py-name" href="#" onclick="return doclink('link-228', 'sourceDir', 'link-76');">sourceDir</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1023"></a><tt class="py-lineno">1023</tt> <tt class="py-line"> <tt id="link-229" class="py-name"><a title="CedarBackup2.config.ActionHook.command
CedarBackup2.config.CommandOverride.command" class="py-name" href="#" onclick="return doclink('link-229', 'command', 'link-196');">command</a></tt> <tt class="py-op">=</tt> <tt id="link-230" class="py-name"><a title="CedarBackup2.util.resolveCommand" class="py-name" href="#" onclick="return doclink('link-230', 'resolveCommand', 'link-5');">resolveCommand</a></tt><tt class="py-op">(</tt><tt class="py-name">rcpCommandList</tt><tt class="py-op">)</tt> </tt>
<a name="L1024"></a><tt class="py-lineno">1024</tt> <tt class="py-line"> <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt id="link-231" class="py-name"><a title="CedarBackup2.util.executeCommand" class="py-name" href="#" onclick="return doclink('link-231', 'executeCommand', 'link-6');">executeCommand</a></tt><tt class="py-op">(</tt><tt id="link-232" class="py-name"><a title="CedarBackup2.config.ActionHook.command
CedarBackup2.config.CommandOverride.command" class="py-name" href="#" onclick="return doclink('link-232', 'command', 'link-196');">command</a></tt><tt class="py-op">,</tt> <tt class="py-op">[</tt><tt class="py-name">copySource</tt><tt class="py-op">,</tt> <tt id="link-233" class="py-name"><a title="CedarBackup2.config.CollectConfig.targetDir
CedarBackup2.config.StageConfig.targetDir" class="py-name" href="#" onclick="return doclink('link-233', 'targetDir', 'link-40');">targetDir</a></tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L1025"></a><tt class="py-lineno">1025</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">result</tt> <tt class="py-op">!=</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L1026"></a><tt class="py-lineno">1026</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">IOError</tt><tt class="py-op">(</tt><tt class="py-string">"Error (%d) copying files from remote host."</tt> <tt class="py-op">%</tt> <tt class="py-name">result</tt><tt class="py-op">)</tt> </tt>
<a name="L1027"></a><tt class="py-lineno">1027</tt> <tt class="py-line"> <tt class="py-name">afterSet</tt> <tt class="py-op">=</tt> <tt id="link-234" class="py-name"><a title="CedarBackup2.config.RemotePeer
CedarBackup2.peer.RemotePeer" class="py-name" href="#" onclick="return doclink('link-234', 'RemotePeer', 'link-156');">RemotePeer</a></tt><tt class="py-op">.</tt><tt id="link-235" class="py-name"><a title="CedarBackup2.peer.RemotePeer._getDirContents" class="py-name" href="#" onclick="return doclink('link-235', '_getDirContents', 'link-212');">_getDirContents</a></tt><tt class="py-op">(</tt><tt id="link-236" class="py-name"><a title="CedarBackup2.config.CollectConfig.targetDir
CedarBackup2.config.StageConfig.targetDir" class="py-name" href="#" onclick="return doclink('link-236', 'targetDir', 'link-40');">targetDir</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1028"></a><tt class="py-lineno">1028</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">afterSet</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L1029"></a><tt class="py-lineno">1029</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">IOError</tt><tt class="py-op">(</tt><tt class="py-string">"Did not copy any files from remote peer."</tt><tt class="py-op">)</tt> </tt>
<a name="L1030"></a><tt class="py-lineno">1030</tt> <tt class="py-line"> <tt class="py-name">differenceSet</tt> <tt class="py-op">=</tt> <tt class="py-name">afterSet</tt><tt class="py-op">.</tt><tt class="py-name">difference</tt><tt class="py-op">(</tt><tt class="py-name">beforeSet</tt><tt class="py-op">)</tt> <tt class="py-comment"># files we added as part of copy</tt> </tt>
<a name="L1031"></a><tt class="py-lineno">1031</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">differenceSet</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L1032"></a><tt class="py-lineno">1032</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">IOError</tt><tt class="py-op">(</tt><tt class="py-string">"Apparently did not copy any new files from remote peer."</tt><tt class="py-op">)</tt> </tt>
<a name="L1033"></a><tt class="py-lineno">1033</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">targetFile</tt> <tt class="py-keyword">in</tt> <tt class="py-name">differenceSet</tt><tt class="py-op">:</tt> </tt>
<a name="L1034"></a><tt class="py-lineno">1034</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">ownership</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1035"></a><tt class="py-lineno">1035</tt> <tt class="py-line"> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">chown</tt><tt class="py-op">(</tt><tt class="py-name">targetFile</tt><tt class="py-op">,</tt> <tt class="py-name">ownership</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">ownership</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L1036"></a><tt class="py-lineno">1036</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">permissions</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1037"></a><tt class="py-lineno">1037</tt> <tt class="py-line"> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">chmod</tt><tt class="py-op">(</tt><tt class="py-name">targetFile</tt><tt class="py-op">,</tt> <tt class="py-name">permissions</tt><tt class="py-op">)</tt> </tt>
<a name="L1038"></a><tt class="py-lineno">1038</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">differenceSet</tt><tt class="py-op">)</tt> </tt>
</div><a name="L1039"></a><tt class="py-lineno">1039</tt> <tt class="py-line"> </tt>
<a name="L1040"></a><tt class="py-lineno">1040</tt> <tt class="py-line"> <tt class="py-decorator">@</tt><tt class="py-decorator">staticmethod</tt> </tt>
<a name="RemotePeer._copyRemoteFile"></a><div id="RemotePeer._copyRemoteFile-def"><a name="L1041"></a><tt class="py-lineno">1041</tt> <a class="py-toggle" href="#" id="RemotePeer._copyRemoteFile-toggle" onclick="return toggle('RemotePeer._copyRemoteFile');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="CedarBackup2.peer.RemotePeer-class.html#_copyRemoteFile">_copyRemoteFile</a><tt class="py-op">(</tt><tt class="py-param">remoteUser</tt><tt class="py-op">,</tt> <tt class="py-param">localUser</tt><tt class="py-op">,</tt> <tt class="py-param">remoteHost</tt><tt class="py-op">,</tt> </tt>
<a name="L1042"></a><tt class="py-lineno">1042</tt> <tt class="py-line"> <tt class="py-param">rcpCommand</tt><tt class="py-op">,</tt> <tt class="py-param">rcpCommandList</tt><tt class="py-op">,</tt> </tt>
<a name="L1043"></a><tt class="py-lineno">1043</tt> <tt class="py-line"> <tt class="py-param">sourceFile</tt><tt class="py-op">,</tt> <tt class="py-param">targetFile</tt><tt class="py-op">,</tt> <tt class="py-param">ownership</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L1044"></a><tt class="py-lineno">1044</tt> <tt class="py-line"> <tt class="py-param">permissions</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">overwrite</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="RemotePeer._copyRemoteFile-collapsed" style="display:none;" pad="++++" indent="+++++++"></div><div id="RemotePeer._copyRemoteFile-expanded"><a name="L1045"></a><tt class="py-lineno">1045</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
<a name="L1046"></a><tt class="py-lineno">1046</tt> <tt class="py-line"><tt class="py-docstring"> Copies a remote source file to a target file.</tt> </tt>
<a name="L1047"></a><tt class="py-lineno">1047</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1048"></a><tt class="py-lineno">1048</tt> <tt class="py-line"><tt class="py-docstring"> @note: Internally, we have to go through and escape any spaces in the</tt> </tt>
<a name="L1049"></a><tt class="py-lineno">1049</tt> <tt class="py-line"><tt class="py-docstring"> source path with double-backslash, otherwise things get screwed up. It</tt> </tt>
<a name="L1050"></a><tt class="py-lineno">1050</tt> <tt class="py-line"><tt class="py-docstring"> doesn't seem to be required in the target path. I hope this is portable</tt> </tt>
<a name="L1051"></a><tt class="py-lineno">1051</tt> <tt class="py-line"><tt class="py-docstring"> to various different rcp methods, but I guess it might not be (all I have</tt> </tt>
<a name="L1052"></a><tt class="py-lineno">1052</tt> <tt class="py-line"><tt class="py-docstring"> to test with is OpenSSH).</tt> </tt>
<a name="L1053"></a><tt class="py-lineno">1053</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1054"></a><tt class="py-lineno">1054</tt> <tt class="py-line"><tt class="py-docstring"> @note: If you have user/group as strings, call the L{util.getUidGid} function</tt> </tt>
<a name="L1055"></a><tt class="py-lineno">1055</tt> <tt class="py-line"><tt class="py-docstring"> to get the associated uid/gid as an ownership tuple.</tt> </tt>
<a name="L1056"></a><tt class="py-lineno">1056</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1057"></a><tt class="py-lineno">1057</tt> <tt class="py-line"><tt class="py-docstring"> @note: We will not overwrite a target file that exists when this method</tt> </tt>
<a name="L1058"></a><tt class="py-lineno">1058</tt> <tt class="py-line"><tt class="py-docstring"> is invoked. If the target already exists, we'll raise an exception.</tt> </tt>
<a name="L1059"></a><tt class="py-lineno">1059</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1060"></a><tt class="py-lineno">1060</tt> <tt class="py-line"><tt class="py-docstring"> @note: Apparently, we can't count on all rcp-compatible implementations</tt> </tt>
<a name="L1061"></a><tt class="py-lineno">1061</tt> <tt class="py-line"><tt class="py-docstring"> to return sensible errors for some error conditions. As an example, the</tt> </tt>
<a name="L1062"></a><tt class="py-lineno">1062</tt> <tt class="py-line"><tt class="py-docstring"> C{scp} command in Debian 'woody' returns a zero (normal) status even when</tt> </tt>
<a name="L1063"></a><tt class="py-lineno">1063</tt> <tt class="py-line"><tt class="py-docstring"> it can't find a host or if the login or path is invalid. We try to work</tt> </tt>
<a name="L1064"></a><tt class="py-lineno">1064</tt> <tt class="py-line"><tt class="py-docstring"> around this by issuing C{IOError} the target file does not exist when</tt> </tt>
<a name="L1065"></a><tt class="py-lineno">1065</tt> <tt class="py-line"><tt class="py-docstring"> we're done.</tt> </tt>
<a name="L1066"></a><tt class="py-lineno">1066</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1067"></a><tt class="py-lineno">1067</tt> <tt class="py-line"><tt class="py-docstring"> @param remoteUser: Name of the Cedar Backup user on the remote peer</tt> </tt>
<a name="L1068"></a><tt class="py-lineno">1068</tt> <tt class="py-line"><tt class="py-docstring"> @type remoteUser: String representing a username, valid via the copy command</tt> </tt>
<a name="L1069"></a><tt class="py-lineno">1069</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1070"></a><tt class="py-lineno">1070</tt> <tt class="py-line"><tt class="py-docstring"> @param remoteHost: Hostname of the remote peer</tt> </tt>
<a name="L1071"></a><tt class="py-lineno">1071</tt> <tt class="py-line"><tt class="py-docstring"> @type remoteHost: String representing a hostname, accessible via the copy command</tt> </tt>
<a name="L1072"></a><tt class="py-lineno">1072</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1073"></a><tt class="py-lineno">1073</tt> <tt class="py-line"><tt class="py-docstring"> @param localUser: Name of the Cedar Backup user on the current host</tt> </tt>
<a name="L1074"></a><tt class="py-lineno">1074</tt> <tt class="py-line"><tt class="py-docstring"> @type localUser: String representing a username, valid on the current host</tt> </tt>
<a name="L1075"></a><tt class="py-lineno">1075</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1076"></a><tt class="py-lineno">1076</tt> <tt class="py-line"><tt class="py-docstring"> @param rcpCommand: An rcp-compatible copy command to use for copying files from the peer</tt> </tt>
<a name="L1077"></a><tt class="py-lineno">1077</tt> <tt class="py-line"><tt class="py-docstring"> @type rcpCommand: String representing a system command including required arguments</tt> </tt>
<a name="L1078"></a><tt class="py-lineno">1078</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1079"></a><tt class="py-lineno">1079</tt> <tt class="py-line"><tt class="py-docstring"> @param rcpCommandList: An rcp-compatible copy command to use for copying files</tt> </tt>
<a name="L1080"></a><tt class="py-lineno">1080</tt> <tt class="py-line"><tt class="py-docstring"> @type rcpCommandList: Command as a list to be passed to L{util.executeCommand}</tt> </tt>
<a name="L1081"></a><tt class="py-lineno">1081</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1082"></a><tt class="py-lineno">1082</tt> <tt class="py-line"><tt class="py-docstring"> @param sourceFile: Source file to copy</tt> </tt>
<a name="L1083"></a><tt class="py-lineno">1083</tt> <tt class="py-line"><tt class="py-docstring"> @type sourceFile: String representing a file on disk, as an absolute path</tt> </tt>
<a name="L1084"></a><tt class="py-lineno">1084</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1085"></a><tt class="py-lineno">1085</tt> <tt class="py-line"><tt class="py-docstring"> @param targetFile: Target file to create</tt> </tt>
<a name="L1086"></a><tt class="py-lineno">1086</tt> <tt class="py-line"><tt class="py-docstring"> @type targetFile: String representing a file on disk, as an absolute path</tt> </tt>
<a name="L1087"></a><tt class="py-lineno">1087</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1088"></a><tt class="py-lineno">1088</tt> <tt class="py-line"><tt class="py-docstring"> @param ownership: Owner and group that the copied should have</tt> </tt>
<a name="L1089"></a><tt class="py-lineno">1089</tt> <tt class="py-line"><tt class="py-docstring"> @type ownership: Tuple of numeric ids C{(uid, gid)}</tt> </tt>
<a name="L1090"></a><tt class="py-lineno">1090</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1091"></a><tt class="py-lineno">1091</tt> <tt class="py-line"><tt class="py-docstring"> @param permissions: Permissions that the staged files should have</tt> </tt>
<a name="L1092"></a><tt class="py-lineno">1092</tt> <tt class="py-line"><tt class="py-docstring"> @type permissions: UNIX permissions mode, specified in octal (i.e. C{0640}).</tt> </tt>
<a name="L1093"></a><tt class="py-lineno">1093</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1094"></a><tt class="py-lineno">1094</tt> <tt class="py-line"><tt class="py-docstring"> @param overwrite: Indicates whether it's OK to overwrite the target file.</tt> </tt>
<a name="L1095"></a><tt class="py-lineno">1095</tt> <tt class="py-line"><tt class="py-docstring"> @type overwrite: Boolean true/false.</tt> </tt>
<a name="L1096"></a><tt class="py-lineno">1096</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1097"></a><tt class="py-lineno">1097</tt> <tt class="py-line"><tt class="py-docstring"> @raise IOError: If the target file already exists.</tt> </tt>
<a name="L1098"></a><tt class="py-lineno">1098</tt> <tt class="py-line"><tt class="py-docstring"> @raise IOError: If there is an IO error copying the file</tt> </tt>
<a name="L1099"></a><tt class="py-lineno">1099</tt> <tt class="py-line"><tt class="py-docstring"> @raise OSError: If there is an OS error changing permissions on the file</tt> </tt>
<a name="L1100"></a><tt class="py-lineno">1100</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="L1101"></a><tt class="py-lineno">1101</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">overwrite</tt><tt class="py-op">:</tt> </tt>
<a name="L1102"></a><tt class="py-lineno">1102</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">exists</tt><tt class="py-op">(</tt><tt class="py-name">targetFile</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1103"></a><tt class="py-lineno">1103</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">IOError</tt><tt class="py-op">(</tt><tt class="py-string">"Target file [%s] already exists."</tt> <tt class="py-op">%</tt> <tt class="py-name">targetFile</tt><tt class="py-op">)</tt> </tt>
<a name="L1104"></a><tt class="py-lineno">1104</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt id="link-237" class="py-name"><a title="CedarBackup2.peer.RemotePeer.localUser" class="py-name" href="#" onclick="return doclink('link-237', 'localUser', 'link-99');">localUser</a></tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1105"></a><tt class="py-lineno">1105</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L1106"></a><tt class="py-lineno">1106</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-238" class="py-name"><a title="CedarBackup2.util.isRunningAsRoot" class="py-name" href="#" onclick="return doclink('link-238', 'isRunningAsRoot', 'link-7');">isRunningAsRoot</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1107"></a><tt class="py-lineno">1107</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">IOError</tt><tt class="py-op">(</tt><tt class="py-string">"Only root can remote copy as another user."</tt><tt class="py-op">)</tt> </tt>
<a name="L1108"></a><tt class="py-lineno">1108</tt> <tt class="py-line"> <tt class="py-keyword">except</tt> <tt class="py-name">AttributeError</tt><tt class="py-op">:</tt> <tt class="py-keyword">pass</tt> </tt>
<a name="L1109"></a><tt class="py-lineno">1109</tt> <tt class="py-line"> <tt class="py-name">actualCommand</tt> <tt class="py-op">=</tt> <tt class="py-string">"%s %s@%s:%s %s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt id="link-239" class="py-name"><a title="CedarBackup2.config.OptionsConfig.rcpCommand
CedarBackup2.config.RemotePeer.rcpCommand
CedarBackup2.peer.RemotePeer.rcpCommand" class="py-name" href="#" onclick="return doclink('link-239', 'rcpCommand', 'link-101');">rcpCommand</a></tt><tt class="py-op">,</tt> <tt id="link-240" class="py-name"><a title="CedarBackup2.config.RemotePeer.remoteUser
CedarBackup2.peer.RemotePeer.remoteUser" class="py-name" href="#" onclick="return doclink('link-240', 'remoteUser', 'link-97');">remoteUser</a></tt><tt class="py-op">,</tt> <tt class="py-name">remoteHost</tt><tt class="py-op">,</tt> <tt class="py-name">sourceFile</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">" "</tt><tt class="py-op">,</tt> <tt class="py-string">"\\ "</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">targetFile</tt><tt class="py-op">)</tt> </tt>
<a name="L1110"></a><tt class="py-lineno">1110</tt> <tt class="py-line"> <tt id="link-241" class="py-name"><a title="CedarBackup2.config.ActionHook.command
CedarBackup2.config.CommandOverride.command" class="py-name" href="#" onclick="return doclink('link-241', 'command', 'link-196');">command</a></tt> <tt class="py-op">=</tt> <tt id="link-242" class="py-name"><a title="CedarBackup2.util.resolveCommand" class="py-name" href="#" onclick="return doclink('link-242', 'resolveCommand', 'link-5');">resolveCommand</a></tt><tt class="py-op">(</tt><tt id="link-243" class="py-name"><a title="CedarBackup2.extend.amazons3.SU_COMMAND
CedarBackup2.peer.SU_COMMAND" class="py-name" href="#" onclick="return doclink('link-243', 'SU_COMMAND', 'link-21');">SU_COMMAND</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1111"></a><tt class="py-lineno">1111</tt> <tt class="py-line"> <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt id="link-244" class="py-name"><a title="CedarBackup2.util.executeCommand" class="py-name" href="#" onclick="return doclink('link-244', 'executeCommand', 'link-6');">executeCommand</a></tt><tt class="py-op">(</tt><tt id="link-245" class="py-name"><a title="CedarBackup2.config.ActionHook.command
CedarBackup2.config.CommandOverride.command" class="py-name" href="#" onclick="return doclink('link-245', 'command', 'link-196');">command</a></tt><tt class="py-op">,</tt> <tt class="py-op">[</tt><tt id="link-246" class="py-name"><a title="CedarBackup2.peer.RemotePeer.localUser" class="py-name" href="#" onclick="return doclink('link-246', 'localUser', 'link-99');">localUser</a></tt><tt class="py-op">,</tt> <tt class="py-string">"-c"</tt><tt class="py-op">,</tt> <tt class="py-name">actualCommand</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L1112"></a><tt class="py-lineno">1112</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">result</tt> <tt class="py-op">!=</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L1113"></a><tt class="py-lineno">1113</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">IOError</tt><tt class="py-op">(</tt><tt class="py-string">"Error (%d) copying [%s] from remote host as local user [%s]."</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">result</tt><tt class="py-op">,</tt> <tt class="py-name">sourceFile</tt><tt class="py-op">,</tt> <tt id="link-247" class="py-name"><a title="CedarBackup2.peer.RemotePeer.localUser" class="py-name" href="#" onclick="return doclink('link-247', 'localUser', 'link-99');">localUser</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1114"></a><tt class="py-lineno">1114</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1115"></a><tt class="py-lineno">1115</tt> <tt class="py-line"> <tt class="py-name">copySource</tt> <tt class="py-op">=</tt> <tt class="py-string">"%s@%s:%s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt id="link-248" class="py-name"><a title="CedarBackup2.config.RemotePeer.remoteUser
CedarBackup2.peer.RemotePeer.remoteUser" class="py-name" href="#" onclick="return doclink('link-248', 'remoteUser', 'link-97');">remoteUser</a></tt><tt class="py-op">,</tt> <tt class="py-name">remoteHost</tt><tt class="py-op">,</tt> <tt class="py-name">sourceFile</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">" "</tt><tt class="py-op">,</tt> <tt class="py-string">"\\ "</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1116"></a><tt class="py-lineno">1116</tt> <tt class="py-line"> <tt id="link-249" class="py-name"><a title="CedarBackup2.config.ActionHook.command
CedarBackup2.config.CommandOverride.command" class="py-name" href="#" onclick="return doclink('link-249', 'command', 'link-196');">command</a></tt> <tt class="py-op">=</tt> <tt id="link-250" class="py-name"><a title="CedarBackup2.util.resolveCommand" class="py-name" href="#" onclick="return doclink('link-250', 'resolveCommand', 'link-5');">resolveCommand</a></tt><tt class="py-op">(</tt><tt class="py-name">rcpCommandList</tt><tt class="py-op">)</tt> </tt>
<a name="L1117"></a><tt class="py-lineno">1117</tt> <tt class="py-line"> <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt id="link-251" class="py-name"><a title="CedarBackup2.util.executeCommand" class="py-name" href="#" onclick="return doclink('link-251', 'executeCommand', 'link-6');">executeCommand</a></tt><tt class="py-op">(</tt><tt id="link-252" class="py-name"><a title="CedarBackup2.config.ActionHook.command
CedarBackup2.config.CommandOverride.command" class="py-name" href="#" onclick="return doclink('link-252', 'command', 'link-196');">command</a></tt><tt class="py-op">,</tt> <tt class="py-op">[</tt><tt class="py-name">copySource</tt><tt class="py-op">,</tt> <tt class="py-name">targetFile</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L1118"></a><tt class="py-lineno">1118</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">result</tt> <tt class="py-op">!=</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L1119"></a><tt class="py-lineno">1119</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">IOError</tt><tt class="py-op">(</tt><tt class="py-string">"Error (%d) copying [%s] from remote host."</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">result</tt><tt class="py-op">,</tt> <tt class="py-name">sourceFile</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1120"></a><tt class="py-lineno">1120</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">exists</tt><tt class="py-op">(</tt><tt class="py-name">targetFile</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1121"></a><tt class="py-lineno">1121</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">IOError</tt><tt class="py-op">(</tt><tt class="py-string">"Apparently unable to copy file from remote host."</tt><tt class="py-op">)</tt> </tt>
<a name="L1122"></a><tt class="py-lineno">1122</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">ownership</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1123"></a><tt class="py-lineno">1123</tt> <tt class="py-line"> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">chown</tt><tt class="py-op">(</tt><tt class="py-name">targetFile</tt><tt class="py-op">,</tt> <tt class="py-name">ownership</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">ownership</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L1124"></a><tt class="py-lineno">1124</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">permissions</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1125"></a><tt class="py-lineno">1125</tt> <tt class="py-line"> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">chmod</tt><tt class="py-op">(</tt><tt class="py-name">targetFile</tt><tt class="py-op">,</tt> <tt class="py-name">permissions</tt><tt class="py-op">)</tt> </tt>
</div><a name="L1126"></a><tt class="py-lineno">1126</tt> <tt class="py-line"> </tt>
<a name="L1127"></a><tt class="py-lineno">1127</tt> <tt class="py-line"> <tt class="py-decorator">@</tt><tt class="py-decorator">staticmethod</tt> </tt>
<a name="RemotePeer._pushLocalFile"></a><div id="RemotePeer._pushLocalFile-def"><a name="L1128"></a><tt class="py-lineno">1128</tt> <a class="py-toggle" href="#" id="RemotePeer._pushLocalFile-toggle" onclick="return toggle('RemotePeer._pushLocalFile');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="CedarBackup2.peer.RemotePeer-class.html#_pushLocalFile">_pushLocalFile</a><tt class="py-op">(</tt><tt class="py-param">remoteUser</tt><tt class="py-op">,</tt> <tt class="py-param">localUser</tt><tt class="py-op">,</tt> <tt class="py-param">remoteHost</tt><tt class="py-op">,</tt> </tt>
<a name="L1129"></a><tt class="py-lineno">1129</tt> <tt class="py-line"> <tt class="py-param">rcpCommand</tt><tt class="py-op">,</tt> <tt class="py-param">rcpCommandList</tt><tt class="py-op">,</tt> </tt>
<a name="L1130"></a><tt class="py-lineno">1130</tt> <tt class="py-line"> <tt class="py-param">sourceFile</tt><tt class="py-op">,</tt> <tt class="py-param">targetFile</tt><tt class="py-op">,</tt> <tt class="py-param">overwrite</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="RemotePeer._pushLocalFile-collapsed" style="display:none;" pad="++++" indent="+++++++"></div><div id="RemotePeer._pushLocalFile-expanded"><a name="L1131"></a><tt class="py-lineno">1131</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
<a name="L1132"></a><tt class="py-lineno">1132</tt> <tt class="py-line"><tt class="py-docstring"> Copies a local source file to a remote host.</tt> </tt>
<a name="L1133"></a><tt class="py-lineno">1133</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1134"></a><tt class="py-lineno">1134</tt> <tt class="py-line"><tt class="py-docstring"> @note: We will not overwrite a target file that exists when this method</tt> </tt>
<a name="L1135"></a><tt class="py-lineno">1135</tt> <tt class="py-line"><tt class="py-docstring"> is invoked. If the target already exists, we'll raise an exception.</tt> </tt>
<a name="L1136"></a><tt class="py-lineno">1136</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1137"></a><tt class="py-lineno">1137</tt> <tt class="py-line"><tt class="py-docstring"> @note: Internally, we have to go through and escape any spaces in the</tt> </tt>
<a name="L1138"></a><tt class="py-lineno">1138</tt> <tt class="py-line"><tt class="py-docstring"> source and target paths with double-backslash, otherwise things get</tt> </tt>
<a name="L1139"></a><tt class="py-lineno">1139</tt> <tt class="py-line"><tt class="py-docstring"> screwed up. I hope this is portable to various different rcp methods,</tt> </tt>
<a name="L1140"></a><tt class="py-lineno">1140</tt> <tt class="py-line"><tt class="py-docstring"> but I guess it might not be (all I have to test with is OpenSSH).</tt> </tt>
<a name="L1141"></a><tt class="py-lineno">1141</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1142"></a><tt class="py-lineno">1142</tt> <tt class="py-line"><tt class="py-docstring"> @note: If you have user/group as strings, call the L{util.getUidGid} function</tt> </tt>
<a name="L1143"></a><tt class="py-lineno">1143</tt> <tt class="py-line"><tt class="py-docstring"> to get the associated uid/gid as an ownership tuple.</tt> </tt>
<a name="L1144"></a><tt class="py-lineno">1144</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1145"></a><tt class="py-lineno">1145</tt> <tt class="py-line"><tt class="py-docstring"> @param remoteUser: Name of the Cedar Backup user on the remote peer</tt> </tt>
<a name="L1146"></a><tt class="py-lineno">1146</tt> <tt class="py-line"><tt class="py-docstring"> @type remoteUser: String representing a username, valid via the copy command</tt> </tt>
<a name="L1147"></a><tt class="py-lineno">1147</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1148"></a><tt class="py-lineno">1148</tt> <tt class="py-line"><tt class="py-docstring"> @param localUser: Name of the Cedar Backup user on the current host</tt> </tt>
<a name="L1149"></a><tt class="py-lineno">1149</tt> <tt class="py-line"><tt class="py-docstring"> @type localUser: String representing a username, valid on the current host</tt> </tt>
<a name="L1150"></a><tt class="py-lineno">1150</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1151"></a><tt class="py-lineno">1151</tt> <tt class="py-line"><tt class="py-docstring"> @param remoteHost: Hostname of the remote peer</tt> </tt>
<a name="L1152"></a><tt class="py-lineno">1152</tt> <tt class="py-line"><tt class="py-docstring"> @type remoteHost: String representing a hostname, accessible via the copy command</tt> </tt>
<a name="L1153"></a><tt class="py-lineno">1153</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1154"></a><tt class="py-lineno">1154</tt> <tt class="py-line"><tt class="py-docstring"> @param rcpCommand: An rcp-compatible copy command to use for copying files from the peer</tt> </tt>
<a name="L1155"></a><tt class="py-lineno">1155</tt> <tt class="py-line"><tt class="py-docstring"> @type rcpCommand: String representing a system command including required arguments</tt> </tt>
<a name="L1156"></a><tt class="py-lineno">1156</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1157"></a><tt class="py-lineno">1157</tt> <tt class="py-line"><tt class="py-docstring"> @param rcpCommandList: An rcp-compatible copy command to use for copying files</tt> </tt>
<a name="L1158"></a><tt class="py-lineno">1158</tt> <tt class="py-line"><tt class="py-docstring"> @type rcpCommandList: Command as a list to be passed to L{util.executeCommand}</tt> </tt>
<a name="L1159"></a><tt class="py-lineno">1159</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1160"></a><tt class="py-lineno">1160</tt> <tt class="py-line"><tt class="py-docstring"> @param sourceFile: Source file to copy</tt> </tt>
<a name="L1161"></a><tt class="py-lineno">1161</tt> <tt class="py-line"><tt class="py-docstring"> @type sourceFile: String representing a file on disk, as an absolute path</tt> </tt>
<a name="L1162"></a><tt class="py-lineno">1162</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1163"></a><tt class="py-lineno">1163</tt> <tt class="py-line"><tt class="py-docstring"> @param targetFile: Target file to create</tt> </tt>
<a name="L1164"></a><tt class="py-lineno">1164</tt> <tt class="py-line"><tt class="py-docstring"> @type targetFile: String representing a file on disk, as an absolute path</tt> </tt>
<a name="L1165"></a><tt class="py-lineno">1165</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1166"></a><tt class="py-lineno">1166</tt> <tt class="py-line"><tt class="py-docstring"> @param overwrite: Indicates whether it's OK to overwrite the target file.</tt> </tt>
<a name="L1167"></a><tt class="py-lineno">1167</tt> <tt class="py-line"><tt class="py-docstring"> @type overwrite: Boolean true/false.</tt> </tt>
<a name="L1168"></a><tt class="py-lineno">1168</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1169"></a><tt class="py-lineno">1169</tt> <tt class="py-line"><tt class="py-docstring"> @raise IOError: If there is an IO error copying the file</tt> </tt>
<a name="L1170"></a><tt class="py-lineno">1170</tt> <tt class="py-line"><tt class="py-docstring"> @raise OSError: If there is an OS error changing permissions on the file</tt> </tt>
<a name="L1171"></a><tt class="py-lineno">1171</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="L1172"></a><tt class="py-lineno">1172</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">overwrite</tt><tt class="py-op">:</tt> </tt>
<a name="L1173"></a><tt class="py-lineno">1173</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">exists</tt><tt class="py-op">(</tt><tt class="py-name">targetFile</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1174"></a><tt class="py-lineno">1174</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">IOError</tt><tt class="py-op">(</tt><tt class="py-string">"Target file [%s] already exists."</tt> <tt class="py-op">%</tt> <tt class="py-name">targetFile</tt><tt class="py-op">)</tt> </tt>
<a name="L1175"></a><tt class="py-lineno">1175</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt id="link-253" class="py-name"><a title="CedarBackup2.peer.RemotePeer.localUser" class="py-name" href="#" onclick="return doclink('link-253', 'localUser', 'link-99');">localUser</a></tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1176"></a><tt class="py-lineno">1176</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L1177"></a><tt class="py-lineno">1177</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-254" class="py-name"><a title="CedarBackup2.util.isRunningAsRoot" class="py-name" href="#" onclick="return doclink('link-254', 'isRunningAsRoot', 'link-7');">isRunningAsRoot</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1178"></a><tt class="py-lineno">1178</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">IOError</tt><tt class="py-op">(</tt><tt class="py-string">"Only root can remote copy as another user."</tt><tt class="py-op">)</tt> </tt>
<a name="L1179"></a><tt class="py-lineno">1179</tt> <tt class="py-line"> <tt class="py-keyword">except</tt> <tt class="py-name">AttributeError</tt><tt class="py-op">:</tt> <tt class="py-keyword">pass</tt> </tt>
<a name="L1180"></a><tt class="py-lineno">1180</tt> <tt class="py-line"> <tt class="py-name">actualCommand</tt> <tt class="py-op">=</tt> <tt class="py-string">'%s "%s" "%s@%s:%s"'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt id="link-255" class="py-name"><a title="CedarBackup2.config.OptionsConfig.rcpCommand
CedarBackup2.config.RemotePeer.rcpCommand
CedarBackup2.peer.RemotePeer.rcpCommand" class="py-name" href="#" onclick="return doclink('link-255', 'rcpCommand', 'link-101');">rcpCommand</a></tt><tt class="py-op">,</tt> <tt class="py-name">sourceFile</tt><tt class="py-op">,</tt> <tt id="link-256" class="py-name"><a title="CedarBackup2.config.RemotePeer.remoteUser
CedarBackup2.peer.RemotePeer.remoteUser" class="py-name" href="#" onclick="return doclink('link-256', 'remoteUser', 'link-97');">remoteUser</a></tt><tt class="py-op">,</tt> <tt class="py-name">remoteHost</tt><tt class="py-op">,</tt> <tt class="py-name">targetFile</tt><tt class="py-op">)</tt> </tt>
<a name="L1181"></a><tt class="py-lineno">1181</tt> <tt class="py-line"> <tt id="link-257" class="py-name"><a title="CedarBackup2.config.ActionHook.command
CedarBackup2.config.CommandOverride.command" class="py-name" href="#" onclick="return doclink('link-257', 'command', 'link-196');">command</a></tt> <tt class="py-op">=</tt> <tt id="link-258" class="py-name"><a title="CedarBackup2.util.resolveCommand" class="py-name" href="#" onclick="return doclink('link-258', 'resolveCommand', 'link-5');">resolveCommand</a></tt><tt class="py-op">(</tt><tt id="link-259" class="py-name"><a title="CedarBackup2.extend.amazons3.SU_COMMAND
CedarBackup2.peer.SU_COMMAND" class="py-name" href="#" onclick="return doclink('link-259', 'SU_COMMAND', 'link-21');">SU_COMMAND</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1182"></a><tt class="py-lineno">1182</tt> <tt class="py-line"> <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt id="link-260" class="py-name"><a title="CedarBackup2.util.executeCommand" class="py-name" href="#" onclick="return doclink('link-260', 'executeCommand', 'link-6');">executeCommand</a></tt><tt class="py-op">(</tt><tt id="link-261" class="py-name"><a title="CedarBackup2.config.ActionHook.command
CedarBackup2.config.CommandOverride.command" class="py-name" href="#" onclick="return doclink('link-261', 'command', 'link-196');">command</a></tt><tt class="py-op">,</tt> <tt class="py-op">[</tt><tt id="link-262" class="py-name"><a title="CedarBackup2.peer.RemotePeer.localUser" class="py-name" href="#" onclick="return doclink('link-262', 'localUser', 'link-99');">localUser</a></tt><tt class="py-op">,</tt> <tt class="py-string">"-c"</tt><tt class="py-op">,</tt> <tt class="py-name">actualCommand</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L1183"></a><tt class="py-lineno">1183</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">result</tt> <tt class="py-op">!=</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L1184"></a><tt class="py-lineno">1184</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">IOError</tt><tt class="py-op">(</tt><tt class="py-string">"Error (%d) copying [%s] to remote host as local user [%s]."</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">result</tt><tt class="py-op">,</tt> <tt class="py-name">sourceFile</tt><tt class="py-op">,</tt> <tt id="link-263" class="py-name"><a title="CedarBackup2.peer.RemotePeer.localUser" class="py-name" href="#" onclick="return doclink('link-263', 'localUser', 'link-99');">localUser</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1185"></a><tt class="py-lineno">1185</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1186"></a><tt class="py-lineno">1186</tt> <tt class="py-line"> <tt class="py-name">copyTarget</tt> <tt class="py-op">=</tt> <tt class="py-string">"%s@%s:%s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt id="link-264" class="py-name"><a title="CedarBackup2.config.RemotePeer.remoteUser
CedarBackup2.peer.RemotePeer.remoteUser" class="py-name" href="#" onclick="return doclink('link-264', 'remoteUser', 'link-97');">remoteUser</a></tt><tt class="py-op">,</tt> <tt class="py-name">remoteHost</tt><tt class="py-op">,</tt> <tt class="py-name">targetFile</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">" "</tt><tt class="py-op">,</tt> <tt class="py-string">"\\ "</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1187"></a><tt class="py-lineno">1187</tt> <tt class="py-line"> <tt id="link-265" class="py-name"><a title="CedarBackup2.config.ActionHook.command
CedarBackup2.config.CommandOverride.command" class="py-name" href="#" onclick="return doclink('link-265', 'command', 'link-196');">command</a></tt> <tt class="py-op">=</tt> <tt id="link-266" class="py-name"><a title="CedarBackup2.util.resolveCommand" class="py-name" href="#" onclick="return doclink('link-266', 'resolveCommand', 'link-5');">resolveCommand</a></tt><tt class="py-op">(</tt><tt class="py-name">rcpCommandList</tt><tt class="py-op">)</tt> </tt>
<a name="L1188"></a><tt class="py-lineno">1188</tt> <tt class="py-line"> <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt id="link-267" class="py-name"><a title="CedarBackup2.util.executeCommand" class="py-name" href="#" onclick="return doclink('link-267', 'executeCommand', 'link-6');">executeCommand</a></tt><tt class="py-op">(</tt><tt id="link-268" class="py-name"><a title="CedarBackup2.config.ActionHook.command
CedarBackup2.config.CommandOverride.command" class="py-name" href="#" onclick="return doclink('link-268', 'command', 'link-196');">command</a></tt><tt class="py-op">,</tt> <tt class="py-op">[</tt><tt class="py-name">sourceFile</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">" "</tt><tt class="py-op">,</tt> <tt class="py-string">"\\ "</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">copyTarget</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L1189"></a><tt class="py-lineno">1189</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">result</tt> <tt class="py-op">!=</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L1190"></a><tt class="py-lineno">1190</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">IOError</tt><tt class="py-op">(</tt><tt class="py-string">"Error (%d) copying [%s] to remote host."</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">result</tt><tt class="py-op">,</tt> <tt class="py-name">sourceFile</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L1191"></a><tt class="py-lineno">1191</tt> <tt class="py-line"> </tt>
<a name="L1192"></a><tt class="py-lineno">1192</tt> <tt class="py-line"> <tt class="py-decorator">@</tt><tt class="py-decorator">staticmethod</tt> </tt>
<a name="RemotePeer._executeRemoteCommand"></a><div id="RemotePeer._executeRemoteCommand-def"><a name="L1193"></a><tt class="py-lineno">1193</tt> <a class="py-toggle" href="#" id="RemotePeer._executeRemoteCommand-toggle" onclick="return toggle('RemotePeer._executeRemoteCommand');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="CedarBackup2.peer.RemotePeer-class.html#_executeRemoteCommand">_executeRemoteCommand</a><tt class="py-op">(</tt><tt class="py-param">remoteUser</tt><tt class="py-op">,</tt> <tt class="py-param">localUser</tt><tt class="py-op">,</tt> <tt class="py-param">remoteHost</tt><tt class="py-op">,</tt> <tt class="py-param">rshCommand</tt><tt class="py-op">,</tt> <tt class="py-param">rshCommandList</tt><tt class="py-op">,</tt> <tt class="py-param">remoteCommand</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="RemotePeer._executeRemoteCommand-collapsed" style="display:none;" pad="++++" indent="+++++++"></div><div id="RemotePeer._executeRemoteCommand-expanded"><a name="L1194"></a><tt class="py-lineno">1194</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
<a name="L1195"></a><tt class="py-lineno">1195</tt> <tt class="py-line"><tt class="py-docstring"> Executes a command on the peer via remote shell.</tt> </tt>
<a name="L1196"></a><tt class="py-lineno">1196</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1197"></a><tt class="py-lineno">1197</tt> <tt class="py-line"><tt class="py-docstring"> @param remoteUser: Name of the Cedar Backup user on the remote peer</tt> </tt>
<a name="L1198"></a><tt class="py-lineno">1198</tt> <tt class="py-line"><tt class="py-docstring"> @type remoteUser: String representing a username, valid on the remote host</tt> </tt>
<a name="L1199"></a><tt class="py-lineno">1199</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1200"></a><tt class="py-lineno">1200</tt> <tt class="py-line"><tt class="py-docstring"> @param localUser: Name of the Cedar Backup user on the current host</tt> </tt>
<a name="L1201"></a><tt class="py-lineno">1201</tt> <tt class="py-line"><tt class="py-docstring"> @type localUser: String representing a username, valid on the current host</tt> </tt>
<a name="L1202"></a><tt class="py-lineno">1202</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1203"></a><tt class="py-lineno">1203</tt> <tt class="py-line"><tt class="py-docstring"> @param remoteHost: Hostname of the remote peer</tt> </tt>
<a name="L1204"></a><tt class="py-lineno">1204</tt> <tt class="py-line"><tt class="py-docstring"> @type remoteHost: String representing a hostname, accessible via the copy command</tt> </tt>
<a name="L1205"></a><tt class="py-lineno">1205</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1206"></a><tt class="py-lineno">1206</tt> <tt class="py-line"><tt class="py-docstring"> @param rshCommand: An rsh-compatible copy command to use for remote shells to the peer</tt> </tt>
<a name="L1207"></a><tt class="py-lineno">1207</tt> <tt class="py-line"><tt class="py-docstring"> @type rshCommand: String representing a system command including required arguments</tt> </tt>
<a name="L1208"></a><tt class="py-lineno">1208</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1209"></a><tt class="py-lineno">1209</tt> <tt class="py-line"><tt class="py-docstring"> @param rshCommandList: An rsh-compatible copy command to use for remote shells to the peer</tt> </tt>
<a name="L1210"></a><tt class="py-lineno">1210</tt> <tt class="py-line"><tt class="py-docstring"> @type rshCommandList: Command as a list to be passed to L{util.executeCommand}</tt> </tt>
<a name="L1211"></a><tt class="py-lineno">1211</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1212"></a><tt class="py-lineno">1212</tt> <tt class="py-line"><tt class="py-docstring"> @param remoteCommand: The command to be executed on the remote host</tt> </tt>
<a name="L1213"></a><tt class="py-lineno">1213</tt> <tt class="py-line"><tt class="py-docstring"> @type remoteCommand: String command-line, with no special shell characters ($, <, etc.)</tt> </tt>
<a name="L1214"></a><tt class="py-lineno">1214</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1215"></a><tt class="py-lineno">1215</tt> <tt class="py-line"><tt class="py-docstring"> @raise IOError: If there is an error executing the remote command</tt> </tt>
<a name="L1216"></a><tt class="py-lineno">1216</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="L1217"></a><tt class="py-lineno">1217</tt> <tt class="py-line"> <tt class="py-name">actualCommand</tt> <tt class="py-op">=</tt> <tt class="py-string">"%s %s@%s '%s'"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt id="link-269" class="py-name"><a title="CedarBackup2.config.OptionsConfig.rshCommand
CedarBackup2.config.RemotePeer.rshCommand
CedarBackup2.peer.RemotePeer.rshCommand" class="py-name" href="#" onclick="return doclink('link-269', 'rshCommand', 'link-103');">rshCommand</a></tt><tt class="py-op">,</tt> <tt id="link-270" class="py-name"><a title="CedarBackup2.config.RemotePeer.remoteUser
CedarBackup2.peer.RemotePeer.remoteUser" class="py-name" href="#" onclick="return doclink('link-270', 'remoteUser', 'link-97');">remoteUser</a></tt><tt class="py-op">,</tt> <tt class="py-name">remoteHost</tt><tt class="py-op">,</tt> <tt class="py-name">remoteCommand</tt><tt class="py-op">)</tt> </tt>
<a name="L1218"></a><tt class="py-lineno">1218</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt id="link-271" class="py-name"><a title="CedarBackup2.peer.RemotePeer.localUser" class="py-name" href="#" onclick="return doclink('link-271', 'localUser', 'link-99');">localUser</a></tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1219"></a><tt class="py-lineno">1219</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L1220"></a><tt class="py-lineno">1220</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-272" class="py-name"><a title="CedarBackup2.util.isRunningAsRoot" class="py-name" href="#" onclick="return doclink('link-272', 'isRunningAsRoot', 'link-7');">isRunningAsRoot</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1221"></a><tt class="py-lineno">1221</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">IOError</tt><tt class="py-op">(</tt><tt class="py-string">"Only root can remote shell as another user."</tt><tt class="py-op">)</tt> </tt>
<a name="L1222"></a><tt class="py-lineno">1222</tt> <tt class="py-line"> <tt class="py-keyword">except</tt> <tt class="py-name">AttributeError</tt><tt class="py-op">:</tt> <tt class="py-keyword">pass</tt> </tt>
<a name="L1223"></a><tt class="py-lineno">1223</tt> <tt class="py-line"> <tt id="link-273" class="py-name"><a title="CedarBackup2.config.ActionHook.command
CedarBackup2.config.CommandOverride.command" class="py-name" href="#" onclick="return doclink('link-273', 'command', 'link-196');">command</a></tt> <tt class="py-op">=</tt> <tt id="link-274" class="py-name"><a title="CedarBackup2.util.resolveCommand" class="py-name" href="#" onclick="return doclink('link-274', 'resolveCommand', 'link-5');">resolveCommand</a></tt><tt class="py-op">(</tt><tt id="link-275" class="py-name"><a title="CedarBackup2.extend.amazons3.SU_COMMAND
CedarBackup2.peer.SU_COMMAND" class="py-name" href="#" onclick="return doclink('link-275', 'SU_COMMAND', 'link-21');">SU_COMMAND</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1224"></a><tt class="py-lineno">1224</tt> <tt class="py-line"> <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt id="link-276" class="py-name"><a title="CedarBackup2.util.executeCommand" class="py-name" href="#" onclick="return doclink('link-276', 'executeCommand', 'link-6');">executeCommand</a></tt><tt class="py-op">(</tt><tt id="link-277" class="py-name"><a title="CedarBackup2.config.ActionHook.command
CedarBackup2.config.CommandOverride.command" class="py-name" href="#" onclick="return doclink('link-277', 'command', 'link-196');">command</a></tt><tt class="py-op">,</tt> <tt class="py-op">[</tt><tt id="link-278" class="py-name"><a title="CedarBackup2.peer.RemotePeer.localUser" class="py-name" href="#" onclick="return doclink('link-278', 'localUser', 'link-99');">localUser</a></tt><tt class="py-op">,</tt> <tt class="py-string">"-c"</tt><tt class="py-op">,</tt> <tt class="py-name">actualCommand</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L1225"></a><tt class="py-lineno">1225</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">result</tt> <tt class="py-op">!=</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L1226"></a><tt class="py-lineno">1226</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">IOError</tt><tt class="py-op">(</tt><tt class="py-string">"Command failed [su -c %s \"%s\"]"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt id="link-279" class="py-name"><a title="CedarBackup2.peer.RemotePeer.localUser" class="py-name" href="#" onclick="return doclink('link-279', 'localUser', 'link-99');">localUser</a></tt><tt class="py-op">,</tt> <tt class="py-name">actualCommand</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1227"></a><tt class="py-lineno">1227</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1228"></a><tt class="py-lineno">1228</tt> <tt class="py-line"> <tt id="link-280" class="py-name"><a title="CedarBackup2.config.ActionHook.command
CedarBackup2.config.CommandOverride.command" class="py-name" href="#" onclick="return doclink('link-280', 'command', 'link-196');">command</a></tt> <tt class="py-op">=</tt> <tt id="link-281" class="py-name"><a title="CedarBackup2.util.resolveCommand" class="py-name" href="#" onclick="return doclink('link-281', 'resolveCommand', 'link-5');">resolveCommand</a></tt><tt class="py-op">(</tt><tt class="py-name">rshCommandList</tt><tt class="py-op">)</tt> </tt>
<a name="L1229"></a><tt class="py-lineno">1229</tt> <tt class="py-line"> <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt id="link-282" class="py-name"><a title="CedarBackup2.util.executeCommand" class="py-name" href="#" onclick="return doclink('link-282', 'executeCommand', 'link-6');">executeCommand</a></tt><tt class="py-op">(</tt><tt id="link-283" class="py-name"><a title="CedarBackup2.config.ActionHook.command
CedarBackup2.config.CommandOverride.command" class="py-name" href="#" onclick="return doclink('link-283', 'command', 'link-196');">command</a></tt><tt class="py-op">,</tt> <tt class="py-op">[</tt><tt class="py-string">"%s@%s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt id="link-284" class="py-name"><a title="CedarBackup2.config.RemotePeer.remoteUser
CedarBackup2.peer.RemotePeer.remoteUser" class="py-name" href="#" onclick="return doclink('link-284', 'remoteUser', 'link-97');">remoteUser</a></tt><tt class="py-op">,</tt> <tt class="py-name">remoteHost</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-string">"%s"</tt> <tt class="py-op">%</tt> <tt class="py-name">remoteCommand</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L1230"></a><tt class="py-lineno">1230</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">result</tt> <tt class="py-op">!=</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L1231"></a><tt class="py-lineno">1231</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">IOError</tt><tt class="py-op">(</tt><tt class="py-string">"Command failed [%s]"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">actualCommand</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L1232"></a><tt class="py-lineno">1232</tt> <tt class="py-line"> </tt>
<a name="L1233"></a><tt class="py-lineno">1233</tt> <tt class="py-line"> <tt class="py-decorator">@</tt><tt class="py-decorator">staticmethod</tt> </tt>
<a name="RemotePeer._buildCbackCommand"></a><div id="RemotePeer._buildCbackCommand-def"><a name="L1234"></a><tt class="py-lineno">1234</tt> <a class="py-toggle" href="#" id="RemotePeer._buildCbackCommand-toggle" onclick="return toggle('RemotePeer._buildCbackCommand');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="CedarBackup2.peer.RemotePeer-class.html#_buildCbackCommand">_buildCbackCommand</a><tt class="py-op">(</tt><tt class="py-param">cbackCommand</tt><tt class="py-op">,</tt> <tt class="py-param">action</tt><tt class="py-op">,</tt> <tt class="py-param">fullBackup</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="RemotePeer._buildCbackCommand-collapsed" style="display:none;" pad="++++" indent="+++++++"></div><div id="RemotePeer._buildCbackCommand-expanded"><a name="L1235"></a><tt class="py-lineno">1235</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
<a name="L1236"></a><tt class="py-lineno">1236</tt> <tt class="py-line"><tt class="py-docstring"> Builds a Cedar Backup command line for the named action.</tt> </tt>
<a name="L1237"></a><tt class="py-lineno">1237</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1238"></a><tt class="py-lineno">1238</tt> <tt class="py-line"><tt class="py-docstring"> @note: If the cback command is None, then DEF_CBACK_COMMAND is used.</tt> </tt>
<a name="L1239"></a><tt class="py-lineno">1239</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1240"></a><tt class="py-lineno">1240</tt> <tt class="py-line"><tt class="py-docstring"> @param cbackCommand: cback command to execute, including required options</tt> </tt>
<a name="L1241"></a><tt class="py-lineno">1241</tt> <tt class="py-line"><tt class="py-docstring"> @param action: Name of the action to execute.</tt> </tt>
<a name="L1242"></a><tt class="py-lineno">1242</tt> <tt class="py-line"><tt class="py-docstring"> @param fullBackup: Whether a full backup should be executed.</tt> </tt>
<a name="L1243"></a><tt class="py-lineno">1243</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1244"></a><tt class="py-lineno">1244</tt> <tt class="py-line"><tt class="py-docstring"> @return: String suitable for passing to L{_executeRemoteCommand} as remoteCommand.</tt> </tt>
<a name="L1245"></a><tt class="py-lineno">1245</tt> <tt class="py-line"><tt class="py-docstring"> @raise ValueError: If action is None.</tt> </tt>
<a name="L1246"></a><tt class="py-lineno">1246</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="L1247"></a><tt class="py-lineno">1247</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt id="link-285" class="py-name"><a title="CedarBackup2.action
CedarBackup2.config.ActionHook.action" class="py-name" href="#" onclick="return doclink('link-285', 'action', 'link-201');">action</a></tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1248"></a><tt class="py-lineno">1248</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">(</tt><tt class="py-string">"Action cannot be None."</tt><tt class="py-op">)</tt> </tt>
<a name="L1249"></a><tt class="py-lineno">1249</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt id="link-286" class="py-name"><a title="CedarBackup2.config.OptionsConfig.cbackCommand
CedarBackup2.config.RemotePeer.cbackCommand
CedarBackup2.peer.RemotePeer.cbackCommand" class="py-name" href="#" onclick="return doclink('link-286', 'cbackCommand', 'link-105');">cbackCommand</a></tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1250"></a><tt class="py-lineno">1250</tt> <tt class="py-line"> <tt id="link-287" class="py-name"><a title="CedarBackup2.config.OptionsConfig.cbackCommand
CedarBackup2.config.RemotePeer.cbackCommand
CedarBackup2.peer.RemotePeer.cbackCommand" class="py-name" href="#" onclick="return doclink('link-287', 'cbackCommand', 'link-105');">cbackCommand</a></tt> <tt class="py-op">=</tt> <tt id="link-288" class="py-name"><a title="CedarBackup2.peer.DEF_CBACK_COMMAND" class="py-name" href="#" onclick="return doclink('link-288', 'DEF_CBACK_COMMAND', 'link-18');">DEF_CBACK_COMMAND</a></tt> </tt>
<a name="L1251"></a><tt class="py-lineno">1251</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">fullBackup</tt><tt class="py-op">:</tt> </tt>
<a name="L1252"></a><tt class="py-lineno">1252</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-string">"%s --full %s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt id="link-289" class="py-name"><a title="CedarBackup2.config.OptionsConfig.cbackCommand
CedarBackup2.config.RemotePeer.cbackCommand
CedarBackup2.peer.RemotePeer.cbackCommand" class="py-name" href="#" onclick="return doclink('link-289', 'cbackCommand', 'link-105');">cbackCommand</a></tt><tt class="py-op">,</tt> <tt id="link-290" class="py-name"><a title="CedarBackup2.action
CedarBackup2.config.ActionHook.action" class="py-name" href="#" onclick="return doclink('link-290', 'action', 'link-201');">action</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1253"></a><tt class="py-lineno">1253</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1254"></a><tt class="py-lineno">1254</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-string">"%s %s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt id="link-291" class="py-name"><a title="CedarBackup2.config.OptionsConfig.cbackCommand
CedarBackup2.config.RemotePeer.cbackCommand
CedarBackup2.peer.RemotePeer.cbackCommand" class="py-name" href="#" onclick="return doclink('link-291', 'cbackCommand', 'link-105');">cbackCommand</a></tt><tt class="py-op">,</tt> <tt id="link-292" class="py-name"><a title="CedarBackup2.action
CedarBackup2.config.ActionHook.action" class="py-name" href="#" onclick="return doclink('link-292', 'action', 'link-201');">action</a></tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L1255"></a><tt class="py-lineno">1255</tt> <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th> <a
href="CedarBackup2-module.html">Home</a> </th>
<!-- Tree link -->
<th> <a
href="module-tree.html">Trees</a> </th>
<!-- Index link -->
<th> <a
href="identifier-index.html">Indices</a> </th>
<!-- Help link -->
<th> <a
href="help.html">Help</a> </th>
<!-- Project homepage -->
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
><a class="navbar" target="_top" href="https://bitbucket.org/cedarsolutions/cedar-backup2">CedarBackup2</a></th>
</tr></table></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>
|