Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backup directory ? #7

Open
phifogg opened this issue Nov 22, 2024 · 7 comments
Open

Backup directory ? #7

phifogg opened this issue Nov 22, 2024 · 7 comments

Comments

@phifogg
Copy link

phifogg commented Nov 22, 2024

Hi Team,
where is the backup directory configured through the docker file? I wanted to activate automated backups. Do I need to get into the installed app-node server and find the config.json or can I do that through the yml file?
Thanks,
Daniel

@r3-gabriel
Copy link
Member

The provided Docker version has been prepared for testing & development (see readme). The integrated backup feature is designed for small production instances.

It could be used in Docker - but you would need to manage moving backed up files out of the Docker data volumes so that you have a separate backup state somewhere else. You could do that via binds for example, but you would need to handle that yourself.

While its possible, I would suggest backing up the Docker volumes directly. For most, its the easiest solution and you could use the same system you use for other Docker volumes you might have.

@phifogg
Copy link
Author

phifogg commented Nov 22, 2024

ok, that makes sense. Mine is not as critical and hence I will host my production via docker. The docker directories are backed up regularly. I was just thinking that especially the postgresql part should be exported rather then flat-file backup.

@r3-gabriel
Copy link
Member

r3-gabriel commented Nov 22, 2024

It does not hurt, to also run the integrated backup to have a few states of the database. You just need to configure a target directory in the REI3 admin panel, like /opt/r3/backup/. If you don´t configure anything else, it would then backup inside the app volume. As long as you backup the volume itself to somewhere else, you have both the current state and some previous ones just in case.

For backups in production, I would connect to the Postgres database service to run proper DB backup tools.

@phifogg
Copy link
Author

phifogg commented Nov 22, 2024

Cool, thanks. I will check. This is a pretty lo-fi setup here. I am trying to build a management app for our local skiclub :D

@phifogg
Copy link
Author

phifogg commented Nov 22, 2024

Update: I got the backup setup done. Putting a full directory path into the config panel worked. Just had to make sure I hit a mounted volume from docker. Now I can grab it from there. Thanks.

@phifogg phifogg closed this as completed Nov 22, 2024
@phifogg
Copy link
Author

phifogg commented Nov 22, 2024

Got to reopen....

I now get this error in the logs:
task 'Integrated full backups' failed to execute, lstat data/certificates/: no such file or directory

My given backup directory though started to have things in it.

Which directory is it trying to access/create?

@phifogg phifogg reopened this Nov 22, 2024
@r3-gabriel
Copy link
Member

The directory /opt/r3/data/certificates is created when the Docker image is initialized (see Dockerfile) and stores SSL certificates. By default, the docker version of r3 is configured to run in HTTP mode and would therefore not generate SSL certificates - the directory however should exist.

So either the directory was removed/moved after the fact (though no idea why) or (more likely) the relative path data/certificates does not resolve correctly to /opt/r3/data/certificates. In this case you could update the path in the config.json file to use the absolute path.

To confirm if we have a general issue, I started a fresh container. After creating the backup dir (in my case /opt/r3/backups/) and setting it up in the r3 admin panel, backups worked ok. The certificates directory is empty but was successfully backed up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants