GhostWriters / DockSTARTer

DockSTARTer helps you get started with running apps in Docker.
https://dockstarter.com/
MIT License
2.22k stars 229 forks source link

Back gives error of unbound variable #411

Closed Veronit closed 5 years ago

Veronit commented 5 years ago

Running sudo ds -b min ends in error: /home/pi/.docker/.scripts/backup_create.sh: line 163: j: unbound variable

Steps to reproduce

  1. Install Dockstarter
  2. Run sudo ds -b min -> Error

Expected behavior No error and backup created System (please complete the following information):

System

nemchik commented 5 years ago

412 will resolve the error in question, but just to inform you the script made it to that point because it found you did not have enough free space to complete the backup. The next line after the failure would have produced the error to inform you of the space issue. You will need to clear some free space on your disk before backups will complete.

You can try sudo ds -p or install ncdu and locate files taking up too much space.

Veronit commented 5 years ago

Thanks!

Veronit commented 5 years ago

Hmm... did I close this one too early. What's the correct workflow? :)

Veronit commented 5 years ago

How much space does the min one need? If it only backups the .env file, I thought it wouldn't need much. The previous lines before the error states that I have plenty of space available:

pi@rpilataus:~ $ sudo ds -b min 2018-12-04 16:50:03 [INFO] Backing up .env files. 2018-12-04 16:50:03 [INFO] /home/pi/.docker/compose/.env found. 2018-12-04 16:50:03 [INFO] Copying .env file to /home/pi/.docker/config/.env.backups/.env.20181204165003 2018-12-04 16:50:03 [INFO] Removing old .env backups. 2018-12-04 16:50:04 [INFO] Replacing current .env file with latest template. 2018-12-04 16:50:04 [INFO] Merging previous values into new .env file. 2018-12-04 16:50:24 [INFO] Environment file update complete. 2018-12-04 16:50:24 [INFO] Setting permissions for /home/pi/.docker 2018-12-04 16:50:24 [INFO] Taking ownership of /home/pi/.docker for user 1000 and group 1000 2018-12-04 16:50:25 [INFO] Setting file and folder permissions in /home/pi/.docker 2018-12-04 16:50:25 [INFO] Setting permissions for /home/pi/.docker/config 2018-12-04 16:50:25 [INFO] Taking ownership of /home/pi/.docker/config for user 1000 and group 1000 2018-12-04 16:50:26 [INFO] Setting file and folder permissions in /home/pi/.docker/config 2018-12-04 16:50:26 [INFO] Snapshot backup is created into /mnt/backup/dockerconfigs/.env.backups.001 2018-12-04 16:50:27 [INFO] Testing needed free disk space ... 2018-12-04 16:50:27 [INFO] 0 MiB needed. 2018-12-04 16:50:27 [INFO] Checking free disk space... 2018-12-04 16:50:27 [INFO] 2258 MiB free. /home/pi/.docker/.scripts/backup_create.sh: line 163: j: unbound variable

nemchik commented 5 years ago

Ok, that error should now be fixed. The free space just needs to be above 5MB, and it looks like the script is actually reporting the size in kilobytes rather than megabytes, so when you see above 2258 free it's actually reporting in kilobytes and needs to be over 5000.

Veronit commented 5 years ago

Thanks for the info.