NoMetaData
From RdiffBackupWiki
I've got rdiff-backup 1.2.6, and I had an error today. Here's what it was, and how I fixed it:
I've got a cronjob that says this:
<pre> /15 * /usr/bin/rdiff-backup /var/www/html /var/www/html-backup </pre>
It backs up all changes to my web sites, and does nothing if there were no changes.
It worked great until 3am last night, when it started sending me email every 15 minutes:
<pre> Previous backup seems to have failed, regressing destination now. Fatal Error: No metadata for time Sun Apr 4 03:00:01 2004 found, cannot regress </pre>
And here's the error from 3:00am:
<pre> Traceback (most recent call last):
File "/usr/bin/rdiff-backup", line 24, in ? rdiff_backup.Main.Main(sys.argv~1:) File "/usr/lib/python2.2/site-packages/rdiff_backup/Main.py", line 250,
in Main
take_action(rps) File "/usr/lib/python2.2/site-packages/rdiff_backup/Main.py", line 222,
in take_action
elif action <code>3D</code>3D "backup": Backup(rps~0, rps~1) File "/usr/lib/python2.2/site-packages/rdiff_backup/Main.py", line 263,
in Backup
Time.setprevtime(prevtime) File "/usr/lib/python2.2/site-packages/rdiff_backup/Time.py", line 52,
in setprevtime
assert 0 < timeinseconds < curtime,
~AssertionError: Time 1081075500 is out of bounds Exception exceptions.~TypeError: "'~NoneType' object is not callable" in <bound method ~GzipFile.~'del' of <gzip open file '/var/www/html-backup/rdiff-backup-data/error_log.2004-04-04T03:00:01-07:00 .data.gz', mode 'wb' at 0x8296930 0x828b1b4>> ignored </pre>
The problem? Daylight savings time made our clocks all skip ahead an hour; the time from 2:00:00 am to 2:59:59 am didn't happen.
<pre>
- perl -e 'print scalar(localtime(1081075500)),"
";' Sun Apr 4 03:45:00 2004 </pre>
The temporary solution? <pre>
- cd /var/www/html-backup/rdiff-backup-data
- ls current_mirror*
(I had two current_mirror files)
- rm current_mirror.2004-04-04T01:45:00-08:00.data
- /usr/bin/rdiff-backup /var/www/html /var/www/html-backup
Warning: Metadata file not found. Metadata will be read from filesystem. </pre>
but this creates diffs for all files to backup. another solution is to create a valid current_mirror-file from the last successful backup: <pre>
- rm current_mirror*
- >$(ls session_statistics* | tail -n1 | sed 's/session_statistics/current_mirror/')
</pre> <span class="plainlinks"><span style="color:black;font-weight:normal; text-decoration:none!important; background:none!important; text-decoration:none;"> dich vu seo</span> <span class="plainlinks"><span style="color:black;font-weight:normal; text-decoration:none!important; background:none!important; text-decoration:none;"> cong ty seo</span> pandora sale so good
