Git Product home page Git Product logo

Comments (2)

 avatar commented on July 27, 2024

Hi @blumberg
Restic is a great tool and makes it nice and easy to restore backups.

Currently, the backup script located here backs up your nextcloud directory which you configure in the playbooks inventory file.
Restic's documentation here will provide useful for restoring your backup.

To restore the latest backup you could use the following command:

restic -r /path/to/restic/repository restore latest --target /path/to/directory/to/restore/backup/to
  • /path/to/restic/repository being the inventory file variable {{ restic_repo }} which you configure.
  • /path/to/directory/to/restore/backup/to being the directory you want to restore your backup to.

Hope this helps 👍

from nextcloud_on_docker.

ReinerNippes avatar ReinerNippes commented on July 27, 2024

Sorry for the ate answer.

Here is an article about restic itself: https://www.ostechnix.com/restic-fast-secure-efficient-backup-application/

To restore single file I would use the restic mount option. It gives you access to any file and version in the restic repo. You can browse through all files and copy the one needed. after copying you have to run docker exec -u www-data nextcloud php occ files:scan --all.

A "bare metal" restore would be:

  • install the OS
  • run the playbook
  • stop nginx, php-fpm, redis and database server container
  • delete /opt/nextcloud/*
  • restore all directories and files from restic repo to /opt/nextcloud
  • start the database container
  • drop the nextcloud database created during playbook run
  • restore the database dump in /opt/nextcloud/databasedump
  • if the server named changed you have to edit config/config.php
  • start redis, php-fpm, nginx container.

It might also work to disable the nextcloud_config role in line 12 of the playbook.

- { role: nextcloud_config, when: (state is undefined or 'absent' not in state) }

But didn't test it yet.

I would recommend to test this. If you use cloud storage (e.g. S3 compatible) or a NFS share as a restic repo it super easy just to install a new instance and exercise a restore. If you use a local directory (bad idea anyway) you have to copy this to the new machine before.

from nextcloud_on_docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.