Error while restoring to newly flashed sd card

What is the problem?

I flashed a new SD Card with the latest build with the raspberry pi imager and I am trying to restore from a backup I did from an older build. I believe it was 1.6.X I don't remember the exact build but it wouldn't update automatically. When I try to restore the new image I keep getting an error.

Edit: OctoPrint version: 1.6.1 OctoPi version: 0.15.1 is what the backup was made from.

What did you already try to solve it?

I have tried restoring in safe mode, it started to restore but then showed the offline banner. I tried to open a new tab to go into it but that didn't work either. i was able to SSH into it and restart octprint from there but it didn't restore and after trying to restore again it gave the same error

Have you tried running in safe mode?

Yes

Did running in safe mode solve the problem?

No

Systeminfo Bundle

octoprint-systeminfo-20220210212828.zip (20.2 KB)

Additional information about your setup

OctoPrint version, OctoPi version, printer, firmware, browser, operating system, ... as much data as possible

Octoprint 1.7.3, Octopi 0.18.0, Ender 3, Marlin, Chrome, Windows

Seems there may be something wrong with the backup, or specifically one of the timelapse files:

2022-02-10 21:13:47,650 - octoprint.plugins.backup - ERROR - Error while running restore
Traceback (most recent call last):
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/plugins/backup/__init__.py", line 1180, in _restore_backup
    zip.extract(member, temp)
  File "/usr/lib/python3.7/zipfile.py", line 1599, in extract
    return self._extract_member(member, path, pwd)
  File "/usr/lib/python3.7/zipfile.py", line 1671, in _extract_member
    shutil.copyfileobj(source, target)
  File "/home/pi/oprint/lib/python3.7/shutil.py", line 79, in copyfileobj
    buf = fsrc.read(length)
  File "/usr/lib/python3.7/zipfile.py", line 899, in read
    data = self._read1(n)
  File "/usr/lib/python3.7/zipfile.py", line 989, in _read1
    self._update_crc(data)
  File "/usr/lib/python3.7/zipfile.py", line 917, in _update_crc
    raise BadZipFile("Bad CRC-32 for file %r" % self.name)
zipfile.BadZipFile: Bad CRC-32 for file 'basedir/timelapse/CE3_vacuum_attachment_20210917220055.mp4'

Maybe you could try editing the backup to delete that file or something to see if that helps. If you unzip it, make sure when you zip it back up you select the files (basedir, metadata.json etc.) rather than the parent folder.

THANK YOU!!! I have been trying to figure this out and apparently, when I was reading the logs I missed that entire part. I deleted all of the time-lapses and it worked perfectly.

2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.