Skip to content

Create Backup guide #194

Closed as not planned
Closed as not planned
@geerlingguy

Description

@geerlingguy

See #7.

For backup for Pi-hole at least, in the GUI you can go to Settings > Teleporter and click 'Backup'. To automate it through the console, you can run pihole -a -t (can I integrate it with something like my geerlingguy.backup role?).

If I run docker-compose exec pihole /bin/bash pihole -a -t it exports a file inside the container. docker-compose cp is not a supported command yet (see docker/compose#3593), so will have to figure out the best way of scripting this... maybe something like:

  1. Create a /backup directory inside the container (mkdir -p /backup).
  2. Run the pihole -a -t command inside the /backup directory.
  3. Cat the contents of /backup/[latest-file-with-extension].tar.gz and pipe them to file on host.
  4. Delete contents of /backup directory (rm -rf /backup/*).

It would be convenient for the pihole -a -t command to have an option to output the archive to shell instead of into a file, that would save the whole file-based annoying process.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or requeststale

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions