Comments (6)
I like option 1 best - I just want to curl and download on a cron job
from ponzu.
@bketelsen - I have most of this implemented now as per option 1. The way it works is there is one new route registered at '/admin/backup' that requires a query string:
'?source={system,analytics,uploads}'
Unfortunately I ran out of time before I'm now traveling back to LA, so I can't wrap up and push until later tonight. Just wanted to let you know it's almost there to save you time implementing it yourself in case you were thinking about it.
from ponzu.
@bketelsen - this has been pushed to master. just adding a new release and will then close this issue.
from ponzu.
Thanks for this!
from ponzu.
I've put quite a bit of thought into how to implement this over the course of the build, but want to get a better idea of how other users would expect this to be done.
Currently, you can just cp
the .db files and push those out to a backup machine or storage endpoint. But, I haven't tested it on any database of significant size (over 100MB or so).
There are a couple of ways I have considered this, but all have trade-offs in security, management/maintenance, or complexity. All of the following would implement the Bolt io.Writer
approach:
- hardcode endpoint with basic auth
- would allow easy programmatic remote backup
- hardcode endpoint with JWT/cookie auth (like /admin/* route auth)
- all admin users could download in browser, or get their cookie and pass it in curl/wget or similar
- also fairly easy remote backup, but JWT/cookie expire and would need to be renewed
- run-time generated endpoint (pseudo-random) displayed in config to admin user
- just obscuring/hiding the security, probably not the best idea
- run-time password provided by admin user required in query string or form value of backup request
- remote backups would need to hardcode password in routine, also not ideal
Any thoughts on these or other implementations?
p.s. since all routes are registered to the DefaultServeMux
using just the stdlib net/http
package, you can add any routes with custom handlers as long as they don't conflict with existing ones. These could be added in any package (content, addons, admin, etc)
from ponzu.
Documentation for backups is here: https://github.com/ponzu-cms/ponzu/wiki/Backups in case anyone finds this issue via search while looking for Ponzu backup info.
from ponzu.
Related Issues (20)
- CLI is not working HOT 14
- Zap v11 was deleted HOT 14
- go module support HOT 9
- search sort HOT 2
- Custom databases HOT 3
- ponzu 0.11.0 fails to build HOT 2
- The "must" search operator in blevesearch can't be passed into ponzu HOT 1
- NOTICE: original author & maintainer is stepping away from the project HOT 7
- how to change to Summernote
- Redis Support for ponzu
- There is three CSRF vulnerability that can add the administrator account, delete administrator account, edit configuration.
- Only latest tag saving
- Error with "go get..." HOT 6
- Current state of Ponzu HOT 1
- Is this project still maintained? HOT 3
- Suggested install method no longer works HOT 2
- Is Ponzu dead? HOT 10
- Potential goroutine leak in achive.go
- How can you develop addons more efficiently?
- How to setup development env
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ponzu.