Skip to content

Conversation

ukkopahis
Copy link

@ukkopahis ukkopahis commented Jun 5, 2022

untested - don't merge

Improvements:

  • backup & restore documentation: Fix the "coming soon" placeholders. Include all useful stuff from docs/Backups.md.old.
  • refactor: simplify by inlining the small scripts from scripts/backup_restore (each of them is invoked only from a single place)

Fixes:

  • only stop/start the stack for backup, don't down/up it (which recreates containers into a different state if docker-compose.yml was edited or new images were pulled)
  • chown files using the correct group
  • work regardless of the current directory when script is executed
  • automatically re-invoke script using sudo: a) to ensure no backup permission problems accessing files and b) restore is done using the correct file owners and permissions.
  • chown all of ./backup to the appropriate non-root user

Closes #566, Fixes #439, Fixes #293, Fixes #254, Fixes #352

Using docker-compose down/up will recreate the containers,
possibly using different images if a manual "docker-compose pull"
had been executed.
Previous version only worked for "pi:pi" or similar, where
user and group names are the same.
* allow starting backup from any folder
* automatically run using sudo
  (to never fail due to ./backup owned by root)
* run post_backup.sh after 'docker-compose start', to minimize downtime
  when e.g. uploading backups to a remote server
* chown all of ./backup to the appropriate user

Fixes SensorsIot#566
* allow start from any current folder
* chmod logfile to allow all to read it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants