Backup Error - Permission Denied


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/ (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/", 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/", line 631, in add_to_zip
    add_to_zip(entry.path, os.path.join(target,, ignored=ignored)
  File "/home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/backup/", line 633, in add_to_zip
    zip.write(source, arcname=target)
  File "/usr/lib/python2.7/", 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


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


That worked. Thank you!