Backup Error - Permission Denied


#1

When I try to do a backup via the Backup and Restore setting, I get the following:

2018-12-17 14:58:00,627 - octoprint.plugins.backup - INFO - Creating backup zip at /home/pi/.octoprint/data/backup/.backup-20181217-145800.zip (excluded: uploads,timelapse)...
2018-12-17 14:58:01,262 - octoprint.plugins.backup - ERROR - Error while creating backup zip
Traceback (most recent call last):
  File "/home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/backup/__init__.py", line 656, in _create_backup
    add_to_zip(basedir, "basedir", ignored=defaults + [own_folder, ])
  File "/home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/backup/__init__.py", line 631, in add_to_zip
    add_to_zip(entry.path, os.path.join(target, entry.name), ignored=ignored)
  File "/home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/backup/__init__.py", line 633, in add_to_zip
    zip.write(source, arcname=target)
  File "/usr/lib/python2.7/zipfile.py", line 1159, in write
    with open(filename, "rb") as fp:
IOError: [Errno 13] Permission denied: '/home/pi/.octoprint/.config.yaml.swp'

This happens when I exclude uploaded files and time lapses. Have also tried a reboot.

OctoPrint 1.3.10


#2

At one point you possibly did a sudo vi ~/.octoprint/config.yaml (don't use sudo for anything OctoPrint related other than restarting the server please) and that's now causing problems.

SSH into your Pi. Then:

sudo rm -r ~/.octoprint/.config.yaml.swp

#3

That worked. Thank you!