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

Read-only mode (for backups) #1736

Open
MorrisJobke opened this issue Oct 13, 2016 · 9 comments
Open

Read-only mode (for backups) #1736

MorrisJobke opened this issue Oct 13, 2016 · 9 comments
Labels
1. to develop Accepted and waiting to be taken care of enhancement

Comments

@MorrisJobke
Copy link
Member

  • provide a way for the administrator to go to read only mode
  • files can still be accessed, but only be read and no writing to the database/cache happens
  • writing to log file should not be limited in my opinion
  • would make backups easier - no need to snapshot DB and filesystem at the very same time - go to read-only mode and do the backup then

drawbacks:

  • last seen time can't be written
  • download activites can't be logged

Opinions on this @nickvergessen @karlitschek @LukasReschke @rullzer @icewind1991 @blizzz @schiessle ?

@karlitschek
Copy link
Member

very good idea 👍

@rullzer
Copy link
Member

rullzer commented Oct 13, 2016

I like the idea... but.... this is going to be a pain.

  • In a lot of places we assume proper DB access (updating the lastlogin, updating token activity).
  • We need to have some way to inform apps. Because they will also break hard.

Also you need to make sure snapshotting of your DB is done without locking the table.

Still good goal to have. But I fear a lot of obstacles on the way.

@MorrisJobke
Copy link
Member Author

Still good goal to have. But I fear a lot of obstacles on the way.

Sure, but nothing that can't be solved. And it should be solved - instead of finding new excuses ;)

@ccoenen
Copy link

ccoenen commented Mar 11, 2018

I am now in a situation where I need to phase out an old installation because of machine, domain and context change. (It's a completely different setup for different purpose, so we're intentionally not moving it). Having read-only on the old setup would be a very handy thing to have.

I would be totally comfortable with a hacked-up version. Even if logins broke, last-login wasn't updated, logging wouldn't work... things like that. That would be better than completely removing the old resource immediately.

@ccoenen
Copy link

ccoenen commented Mar 11, 2018

Since I only care about files in that installation, would it break much, if I just chmod 440 -R my nextcloud data directory?

@nextcloud-bot nextcloud-bot added the stale Ticket or PR with no recent activity label Jun 20, 2018
@ccoenen
Copy link

ccoenen commented Sep 3, 2018

I'm in that same situation again, and I'm wondering again if I can just chmod -w the directory. I'll just give it a try this time. See you on the other side.

@nextcloud-bot nextcloud-bot removed the stale Ticket or PR with no recent activity label Sep 3, 2018
@ccoenen
Copy link

ccoenen commented Sep 3, 2018

So far, nothing has broken catastrophically. If you don't hear from me again this will mean It just works as intended (or I got run over by a car). If Nextcloud breaks in unexpected places, I'll get back to this issue. Until then, this might be the easiest viable option.

@MorrisJobke
Copy link
Member Author

I'm in that same situation again, and I'm wondering again if I can just chmod -w the directory. I'll just give it a try this time. See you on the other side.

This does not guarantee that nothing is written to the DB. Also it will fail hard when somebody tries to upload something. So don't do this - it needs to be handled in the application logic.

@xorinzor
Copy link

I assume no such mode has been implemented into the server yet?

@skjnldsv skjnldsv added 0. Needs triage Pending check for reproducibility or if it fits our roadmap 1. to develop Accepted and waiting to be taken care of and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Aug 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of enhancement
Projects
None yet
Development

No branches or pull requests

7 participants