Data seems to be lost, users and categories gone
-
Re: Lost all my data ? Help please
Just loaded up my forum to see that all the data was missing from the homepage. Only visible thing is the header with the logo. Users are completely gone, categories not visible, etc.
After reading through various threads (such as the one above) here, it seems like I'm SOL. Is this true? As this is a fairly new site, I had been relying on the weekly backup setup through Digital Ocean, and (foolishly) hadn't setup a frequent backup solution yet. So unfortunately no backup available to restore.
I've checked that
bind 127.0.0.1
is already in the redis.conf file, which I thought was one way to prevent this issue from happening. What exactly happened here, and is there ANYTHING I can do to get things back in working order? -
Additionally, if (as I suspect) I'll have to start the forum from scratch, is it safe to assume my first step should be to run
./nodebb setup
? Or is there anything else I should configure before starting over? (I'm already following Digital Ocean's guide for creating automatic Redis backups using rdiff-backup and cron). -
@MarximusMG yes running
./nodebb setup
should be enough.I would recommend using mongo instead of redis.
By the way do you have firewall setup on your droplet? If not setup one to block all other ports except the ones you need to allow outside connections (80, 22, 443).
-
@pichalite thank you for the response.
Unfortunately, I didn't have a firewall setup on the droplet, but I am adding that to a list of security measures I'll be taking now. Other than the firewall (and of course frequent backups as a contingency plan), am I missing anything else for a redis setup in terms of security?
-
@MarximusMG Checking that the config is there isn't enough, actually. Sometimes software does really incomprehensible things like not read the proper config file.
Case in point, our dev server's mongo data store was open to the public, despite having the proper bind address settings in the config.
Always double-check by attempting to log in from an outside source
Quick firewall setup
# ufw allow ssh # ufw allow http # ufw enable
-
@julian quick question, as I'm setting up automated backups following Digital Ocean's guide.
If I use the following entry at the end of the cron file, will that automate hourly backups? How do I set the total number of backups the server will store before deleting them?
@hourly rdiff-backup --preserve-numerical-ids --no-file-statistics /var/lib/redis /home/sammy/redis```
-
@julian @pichalite I also just ran
./nodebb setup
to get the forum back up again, but the styling is all wonky. Tried multiple browsers, cleared cache, etc. but still looks like this. ACP looks normal. Any thoughts on what's causing this?Edit: I had sworn I already run
sudo reboot
but I must have missed that, as I just ran it, started NodeBB again, and all is normal. -
@MarximusMG said:
@julian quick question, as I'm setting up automated backups following Digital Ocean's guide.
If I use the following entry at the end of the cron file, will that automate hourly backups? How do I set the total number of backups the server will store before deleting them?
@hourly rdiff-backup --preserve-numerical-ids --no-file-statistics /var/lib/redis /home/sammy/redis```
If anyone can provide some insight regarding these questions, I'd truly appreciate it! Thanks