rda-python-dsarch 3.0.7__py3-none-any.whl → 3.0.9__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- rda_python_dsarch/dsarch.py +22 -6
- {rda_python_dsarch-3.0.7.dist-info → rda_python_dsarch-3.0.9.dist-info}/METADATA +1 -1
- {rda_python_dsarch-3.0.7.dist-info → rda_python_dsarch-3.0.9.dist-info}/RECORD +7 -7
- {rda_python_dsarch-3.0.7.dist-info → rda_python_dsarch-3.0.9.dist-info}/WHEEL +0 -0
- {rda_python_dsarch-3.0.7.dist-info → rda_python_dsarch-3.0.9.dist-info}/entry_points.txt +0 -0
- {rda_python_dsarch-3.0.7.dist-info → rda_python_dsarch-3.0.9.dist-info}/licenses/LICENSE +0 -0
- {rda_python_dsarch-3.0.7.dist-info → rda_python_dsarch-3.0.9.dist-info}/top_level.txt +0 -0
rda_python_dsarch/dsarch.py
CHANGED
|
@@ -45,6 +45,7 @@ class DsArch(PgArch, PgMeta):
|
|
|
45
45
|
MODCNT -- number of existing records modified during the current action
|
|
46
46
|
OVERRIDE -- non-zero when the -OE (OverrideExist) flag is active
|
|
47
47
|
TARFILES -- dict mapping tar archive paths to their member-file metadata
|
|
48
|
+
BCKNOTES -- dict mapping backup IDs to their bfile.note member/move history
|
|
48
49
|
VINDEX -- dict mapping version indices to version records
|
|
49
50
|
CHGGRPS -- dict of group indices whose file-number counts need updating
|
|
50
51
|
ERRMSG -- accumulated error message string for the current action
|
|
@@ -54,6 +55,7 @@ class DsArch(PgArch, PgMeta):
|
|
|
54
55
|
super().__init__() # initialize parent class
|
|
55
56
|
self.ERRCNT = self.RETSTAT = self.ALLCNT = self.ADDCNT = self.MODCNT = self.OVERRIDE = 0
|
|
56
57
|
self.TARFILES = {}
|
|
58
|
+
self.BCKNOTES = {}
|
|
57
59
|
self.VINDEX = {}
|
|
58
60
|
self.CHGGRPS = {}
|
|
59
61
|
self.ERRMSG = ''
|
|
@@ -1616,7 +1618,7 @@ class DsArch(PgArch, PgMeta):
|
|
|
1616
1618
|
(bfile, qfile) = self.get_backup_filenames(self.params['QF'][i], dsid)
|
|
1617
1619
|
pgrec = self.pgget(tname, "*", "bfile = '{}'".format(bfile), self.LGEREX)
|
|
1618
1620
|
if not pgrec:
|
|
1619
|
-
self.pglog("Backup-{}: is not in RDADB".format(bfile
|
|
1621
|
+
self.pglog("Backup-{}: is not in RDADB".format(bfile), self.LOGWRN)
|
|
1620
1622
|
continue
|
|
1621
1623
|
ms = re.match(r'^<([a-z]\d{6}|ds\d+\.\d+)_(\w)_\d+\.txt>', pgrec['note'])
|
|
1622
1624
|
if not ms:
|
|
@@ -1625,7 +1627,11 @@ class DsArch(PgArch, PgMeta):
|
|
|
1625
1627
|
ftype = ms.group(2)
|
|
1626
1628
|
if fdsid != dsid: qfile = "/{}/{}".format(fdsid, bfile)
|
|
1627
1629
|
info = self.check_backup_file(qfile)
|
|
1628
|
-
if not
|
|
1630
|
+
if info == self.FAILURE: # error checking the endpoint, not a missing file
|
|
1631
|
+
errmsg = "Backup-{}: Error checking file on Quasar Endpoint {}".format(qfile, endpoint)
|
|
1632
|
+
if self.PGLOG['SYSERR']: errmsg += "\n" + self.PGLOG['SYSERR']
|
|
1633
|
+
self.pglog(errmsg, self.PGOPT['extlog'])
|
|
1634
|
+
elif not info:
|
|
1629
1635
|
self.pglog("Backup-{}: {}".format(qfile, self.PGLOG['MISSFILE']), self.LOGWRN)
|
|
1630
1636
|
continue
|
|
1631
1637
|
endpath = 'decsdata' if ftype == 'S' else 'data'
|
|
@@ -1635,6 +1641,7 @@ class DsArch(PgArch, PgMeta):
|
|
|
1635
1641
|
tofile = "{}/{}".format(todir, op.basename(bfile))
|
|
1636
1642
|
tarfile = "{}/{}".format(tardir, op.basename(bfile))
|
|
1637
1643
|
self.TARFILES[pgrec['bid']] = tarfile
|
|
1644
|
+
self.BCKNOTES[pgrec['bid']] = pgrec['note']
|
|
1638
1645
|
tinfo = self.check_local_file(tarfile, 0, self.PGOPT['extlog'])
|
|
1639
1646
|
if tinfo:
|
|
1640
1647
|
self.pglog(tarfile + ": tar file exists already", self.PGOPT['wrnlog'])
|
|
@@ -1644,7 +1651,7 @@ class DsArch(PgArch, PgMeta):
|
|
|
1644
1651
|
self.set_local_mode(tarfile, 1, 0o664)
|
|
1645
1652
|
if self.PGLOG['DSCHECK']:
|
|
1646
1653
|
self.set_dscheck_dcount(self.ALLCNT, chksize, self.PGOPT['extlog'])
|
|
1647
|
-
self.pglog("{} of Quasar Backup file{} downloaded for {}".format(dcnt, self.ALLCNT, s, dsid), self.LOGWRN)
|
|
1654
|
+
self.pglog("{} of {} Quasar Backup file{} downloaded for {}".format(dcnt, self.ALLCNT, s, dsid), self.LOGWRN)
|
|
1648
1655
|
if 'EM' in self.params: self.PGLOG['PRGMSG'] = ""
|
|
1649
1656
|
|
|
1650
1657
|
def restore_backup_webfiles(self):
|
|
@@ -1699,6 +1706,9 @@ class DsArch(PgArch, PgMeta):
|
|
|
1699
1706
|
if ainfo:
|
|
1700
1707
|
self.pglog(afile + ": File exists already", self.PGOPT['wrnlog'])
|
|
1701
1708
|
else:
|
|
1709
|
+
if pgrec['bid'] not in self.TARFILES:
|
|
1710
|
+
self.pglog("{}: Backup tar file of Backup Id {} is not downloaded".format(wfile, pgrec['bid']), self.PGOPT['wrnlog'])
|
|
1711
|
+
continue
|
|
1702
1712
|
tarfile = self.TARFILES[pgrec['bid']]
|
|
1703
1713
|
ainfo = self.get_backup_member_file(pgrec, tarfile, tardir)
|
|
1704
1714
|
tarcmd = "tar -xvf {} -C {} {}".format(tarfile, tardir, wfile)
|
|
@@ -1706,6 +1716,7 @@ class DsArch(PgArch, PgMeta):
|
|
|
1706
1716
|
ainfo = self.check_local_file(afile, 0, self.PGOPT['extlog'])
|
|
1707
1717
|
if not ainfo:
|
|
1708
1718
|
self.pglog("{}: Error untar File {}".format(tarfile, afile), self.PGOPT['wrnlog'])
|
|
1719
|
+
continue
|
|
1709
1720
|
if warch: wcnt += 1
|
|
1710
1721
|
if ainfo['data_size'] != pgrec['data_size']:
|
|
1711
1722
|
self.pglog("{}: Different Restored/RDADB file sizes {}/{}".format(afile, ainfo['data_size'], pgrec['data_size']), self.PGOPT['wrnlog'])
|
|
@@ -1735,9 +1746,10 @@ class DsArch(PgArch, PgMeta):
|
|
|
1735
1746
|
Returns:
|
|
1736
1747
|
Path to the extracted file, or None on failure.
|
|
1737
1748
|
"""
|
|
1738
|
-
mfile = wfile = pgrec['wfile']
|
|
1739
|
-
note
|
|
1740
|
-
|
|
1749
|
+
mfile = wfile = pgrec['wfile'] if 'wfile' in pgrec else pgrec['sfile']
|
|
1750
|
+
# the member list and move history are on bfile.note, not on the wfile/sfile record
|
|
1751
|
+
note = self.BCKNOTES.get(pgrec['bid'])
|
|
1752
|
+
while note and not re.search(r'{}<:>'.format(mfile), note):
|
|
1741
1753
|
ms = re.search(r'>MV .* File (\S+) To .*{}'.format(mfile), note)
|
|
1742
1754
|
if not ms: break
|
|
1743
1755
|
mfile = ms.group(1)
|
|
@@ -1801,6 +1813,9 @@ class DsArch(PgArch, PgMeta):
|
|
|
1801
1813
|
if ainfo:
|
|
1802
1814
|
self.pglog(afile + ": File exists already", self.PGOPT['wrnlog'])
|
|
1803
1815
|
else:
|
|
1816
|
+
if pgrec['bid'] not in self.TARFILES:
|
|
1817
|
+
self.pglog("{}: Backup tar file of Backup Id {} is not downloaded".format(sfile, pgrec['bid']), self.PGOPT['wrnlog'])
|
|
1818
|
+
continue
|
|
1804
1819
|
tarfile = self.TARFILES[pgrec['bid']]
|
|
1805
1820
|
ainfo = self.get_backup_member_file(pgrec, tarfile, tardir)
|
|
1806
1821
|
tarcmd = "tar -xvf {} -C {} {}".format(tarfile, tardir, sfile)
|
|
@@ -1808,6 +1823,7 @@ class DsArch(PgArch, PgMeta):
|
|
|
1808
1823
|
ainfo = self.check_local_file(afile, 0, self.PGOPT['extlog'])
|
|
1809
1824
|
if not ainfo:
|
|
1810
1825
|
self.pglog("{}: Error untar File {}".format(tarfile, afile), self.PGOPT['wrnlog'])
|
|
1826
|
+
continue
|
|
1811
1827
|
if sarch: scnt += 1
|
|
1812
1828
|
if ainfo['data_size'] != pgrec['data_size']:
|
|
1813
1829
|
self.pglog("{}: Different Restored/RDADB file sizes {}/{}".format(afile, ainfo['data_size'], pgrec['data_size']), self.PGOPT['wrnlog'])
|
|
@@ -2,13 +2,13 @@ rda_python_dsarch/PgArch.py,sha256=_hfBFyft9rSC35QBIbtQRkF3TQE7tuT7Dz-B-KmVsVU,5
|
|
|
2
2
|
rda_python_dsarch/PgMeta.py,sha256=FV4GytgnJK00FUlyM6iHqpNd7-XTVHO1j5tZtcLTWgY,26845
|
|
3
3
|
rda_python_dsarch/__init__.py,sha256=-ympZMoYfvP0lxSq06GWQemQlj4HwV9tm1JNxKpSU90,812
|
|
4
4
|
rda_python_dsarch/ds_arch.py,sha256=tdlelcLMmlffJjIxEvd-xlI0gwDSuDdKO1hX2-oAOcs,233525
|
|
5
|
-
rda_python_dsarch/dsarch.py,sha256=
|
|
5
|
+
rda_python_dsarch/dsarch.py,sha256=sUTHmPUCm7YHqTe103LR6MfAAVFO3xmFbmp_jBzUAyA,255970
|
|
6
6
|
rda_python_dsarch/dsarch.usg,sha256=LpteXfUe9RBSbmM3HputbtZjEEyUSKnYvOfphH0UQrA,106590
|
|
7
7
|
rda_python_dsarch/pg_arch.py,sha256=-HD-CynFzvcBsL9w6EN-4O5RqdXvspbRUbNzs6njSaQ,80494
|
|
8
8
|
rda_python_dsarch/pg_meta.py,sha256=FFEkphGAT--66zvMNDPfiFG4nZQpXed_yVGMARdZb-o,46981
|
|
9
|
-
rda_python_dsarch-3.0.
|
|
10
|
-
rda_python_dsarch-3.0.
|
|
11
|
-
rda_python_dsarch-3.0.
|
|
12
|
-
rda_python_dsarch-3.0.
|
|
13
|
-
rda_python_dsarch-3.0.
|
|
14
|
-
rda_python_dsarch-3.0.
|
|
9
|
+
rda_python_dsarch-3.0.9.dist-info/licenses/LICENSE,sha256=1dck4EAQwv8QweDWCXDx-4Or0S8YwiCstaso_H57Pno,1097
|
|
10
|
+
rda_python_dsarch-3.0.9.dist-info/METADATA,sha256=7NHcuDawOJjbn27tMyRh8yh0WEsGRNnh4rPQ4D7fli4,7165
|
|
11
|
+
rda_python_dsarch-3.0.9.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
|
|
12
|
+
rda_python_dsarch-3.0.9.dist-info/entry_points.txt,sha256=BA1iRAFIZExG0656Ri9f-_OKlSK31CuABWPQSsA9MsI,64
|
|
13
|
+
rda_python_dsarch-3.0.9.dist-info/top_level.txt,sha256=-vwcMgUXbBdHscvAKB3De9zKac3m_s_FaKIdApP1FGY,18
|
|
14
|
+
rda_python_dsarch-3.0.9.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|