today morning I woke up and saw our MongoDB databases are removed and just this DB HOW_TO_RECOVERY_BASE is there. that have a collection which is README and here is content:   {     "_id": {         "$oid": "5e94ba92ab2c988a0e61117e"     },     "content": "All your data is a backed up. You must pay 0.015 BTC to 1DGkm33MMPRzjn2ruDEJeZdBuytBmCwqfZ 48 hours for recover it. After 48 hours expiration we will leaked and exposed all your data. Also do not forget about GDPR. You can buy bitcoin here, does not take much time to buy https://localbitcoins.com with this guide https://localbitcoins.com/guides/how-to-buy-bitcoins After paying write to me in the mail with your DB IP : recovery_bas3@protonmail.com" }      fortunately, I made a backup last month using rsync command. now I can't find how I can restore my whole server using this backup. and how can I safe my centos VPS and prevent this type of attack?
281
This is a  about Server Security - Responding to Breach Events (Hacking)   See Also:                  Canonical Version I suspect that one or more of my servers is compromised by a hacker, virus, or other mechanism:   What are my first steps? When I arrive on site should I disconnect the server, preserve "evidence", are there other initial considerations? How do I go about getting services back online? How do I prevent the same thing from happening immediately again? Are there best practices or methodologies for learning from this incident? If I wanted to put a Incident Response Plan together, where would I start? Should this be part of my Disaster Recovery or Business Continuity Planning?   Original Version       2011.01.02 - I'm on my way into work at 9.30 p.m. on a Sunday because our server has been compromised somehow and was resulting in a    attack on our provider. The servers access to the Internet   has been shut down which means over 5-600 of our clients sites are now   down. Now this could be an FTP hack, or some weakness in code   somewhere. I'm not sure till I get there.      How can I track this down quickly? We're in for a whole lot of   litigation if I don't get the server back up ASAP. Any help is   appreciated. We are running Open SUSE 11.0.            2011.01.03 - Thanks to everyone for your help. Luckily I WASN'T the only person responsible for this server, just the nearest. We managed   to resolve this problem, although it may not apply to many others in a   different situation. I'll detail what we did.      We unplugged the server from the net. It was performing (attempting to   perform) a Denial Of Service attack on another server in Indonesia,   and the guilty party was also based there.      We firstly tried to identify where on the server this was coming from,   considering we have over 500 sites on the server, we expected to be   moonlighting for some time. However, with SSH access still, we ran a   command to find all files edited or created in the time the attacks   started. Luckily, the offending file was created over the winter   holidays which meant that not many other files were created on the   server at that time.      We were then able to identify the offending file which was inside the   uploaded images folder within a  website.      After a short cigarette break we concluded that, due to the files   location, it must have been uploaded via a file upload facility that   was inadequetly secured. After some googling, we found that there was   a security vulnerability that allowed files to be uploaded, within the   ZenCart admin panel, for a picture for a record company. (The section   that it never really even used), posting this form just uploaded any   file, it did not check the extension of the file, and didn't even   check to see if the user was logged in.      This meant that any files could be uploaded, including a PHP file for   the attack. We secured the vulnerability with ZenCart on the infected   site, and removed the offending files.      The job was done, and I was home for 2 a.m.            The Moral   - Always apply security patches for ZenCart, or any other CMS system for that matter. As when security updates are released, the whole   world is made aware of the vulnerability.   - Always do backups, and backup your backups.   - Employ or arrange for someone that will be there in times like these. To prevent anyone from relying on a panicy post on Server   Fault.
80168
I have a database file from MongoDB 2.4 and we want use this on mongodb 3.6.  note: the file is original from the db path. Not from mongodump. This process is messy as it requires doing so on many of our clients.  Any advice will be welcomed as I'm a bit lost in this process.  Thanks
32574
I was hoping I could get a clear answer on how to ensure taking a full Postgres backup just like you would get with MS SQL Server, and then take care of orphaned users.  From what I've read, and it could be wrong, finding a good PostgreSQL blog has been challenging so please feel free to recommend some to me, I need to figure out how this app works so I can have trust in my backups and Slony replication.  I had a developer restore a backup I took from PgadminIII via custom, directory, and tar format while selecting OIDs but he said two of them didn't load, tar did but it was only the directory, not the data.  I'm really confused now.   I am using PGAdminIII, it has a pg_dump and pg_dumpall option.  I want to back everything up that I need to test restore this database somewhere and verify that yes, all the data we need and our backup is good.  Eventually I want to write an auto-restore script but one day at a time.   pg_dumpall apparently has a -globals option that's supposed to backup everything, but the help for pg_dumpall shows a -g, --globals-only          dump only global objects, no databases, not a --globals option.    I thought pg_dumpall would at least backup foreign keys, but even that seems to be an 'option'.  According to the , even with pg_dumpall I need to use a -o option to backup foreign keys, I can't really imagine when I wouldn't want to backup foreign keys and this would make more sense as a default options.   How would I take care of orphaned users and validate I have everything?  I'd like to actually restore my backup file on another server and verify everything works.  If anyone has any suggestions on how to take a real backup in PostgreSQL and restore, I'd be very grateful.   I had a PostgreSQL server but I still can't fathom why the app would not backup OIDs by default!  It seems like 99.9% of the time you would want that.    UPDATE 1:  The Postgres  mentions that the globals option I was looking for seems to be a default option on this version, but it still needs the -o option.  If someone can verify or give me an example command to restore a single database elsewhere with everything it needs I'd appreciate it.   Edit: being asked by site to show the uniqueness of this question by editing my question.  This question raises the issue and get's clarity on OIDs in backups, the difference between globals and non globals, as well as testing restores recommendations to ensure the backup is good as opposed to just backing up.  Due to the answers I was able to backup, figure out globals/oids, and started a test restore process nightly on Postgres using cron jobs.  Thanks for the help!
67544
I accidentally dropped a MySQL database on my server.  Are there any ways to recover a dropped database?
59188
How can I install MongoDB on  my Ubuntu 17.04??  Looks like there are no packages provided by Mongo at the moment, just wondering if someone has already managed to install an instance on 17.04?
6464
Any  at all will obviously help when salting and hashing a user's password.  Are there any best practices for how long the salt should be?  I'll be storing the salt in my user table, so I would like the best tradeoff between storage size and security.  Is a random 10 character salt enough? Or do I need something longer?
2444
This is a  about DoS and DDoS mitigation.   I found a massive traffic spike on a website that I host today; I am getting thousands of connections a second and I see I'm using all 100Mbps of my available bandwidth.  Nobody can access my site because all the requests time out, and I can't even log into the server because SSH times out too!  This has happened a couple times before, and each time it's lasted a couple hours and gone away on its own.  Occasionally, my website has another distinct but related problem: my server's load average (which is usually around .25) rockets up to 20 or more and nobody can access my site just the same as the other case.  It also goes away after a few hours.  Restarting my server doesn't help; what can I do to make my site accessible again, and what is happening?  Relatedly, I found once that for a day or two, every time I started my service, it got a connection from a particular IP address and then crashed.  As soon as I started it up again, this happened again and it crashed again.  How is that similar, and what can I do about it?
34675
Say you had some sensitive information that you didn't want to store on the internet, was incredibly important to you, and you didn't need to access very often either.  Think of a digital picture taken of your grandma days before her death or something... Very important stuff.  So you load the file to a flash drive, put it in a vault, and forget about it.  When should you re-visit the vault to back-up the data to a newer, futuristic flash drive or whatever they are using to store data with in the future.  What are the chances that the data will have dissappeared or the flash drive become unreadable in 5 years? 10 years? 25 years? 100 years?
60219
I have a server with 150GB of diskspace. Today I uploaded a dataset of 30GB. I cancelled the import due to internet dying, then noticed there was 29GB of space missing in the database (meaning the CSV was uploaded, but not deleted when I broke the operation). When uploading the data once again, it broke again and I lost another ~25GB. Now there isn't enough free space to upload the data.   This is hosted on AWS RDS, Postgres 10.6.   Is there a way to fix this? I read about VACUUM. But will this delete records? I'm hosting at the moment ~70GB of data and don't want to lose any records. What's the best way to go about this?
97706
In the era of big data, I find it surprising that banks and credit card companies only offer access to a ridiculously small number of transactions - often only your last 180 days, if that. The longest I've seen was 720 days going back. I suspect they do store everything, but intentionally limit access.  These transactions are text only, take up extremely little space, and storing an individual's lifetime worth of transaction would take less than 10MB of data; about the storage required by two MP3 files, and about 250k records per person per lifetime, if we generously assume everyone makes 10 transactions a day. But I'd be happy with only the last 10 years of transactions, so about 1MB per customer. One of the largest banks, JP Morgan Chase, has . That means 70TB of data for 10 years of records - hardly impressive for a corporation of that size, with , when .  By comparison, would you put up with Gmail or any online email provider keeping only the most recent 120 days worth of email? (And emails do take a lot more space than transactions, are far more numerous, and have to be instantly retrievable.)  Storage requirements for transaction activity are trivial in an era where we're throwing around petabytes and zetabytes.  Is there a sound reason for banks not offering access to all your transactions, other than legacy software on their side?      UPDATE: Somehow I hadn't found  asking the same thing.
20750
I was going to delete the Time Machine backups. I made a mistake and instead of deleting them using Time Machine, I just moved the Backups.backupdb folder to the trash. Now, if I try to empty the trash, Finder attempts to count the number of files that will be deleted, and this process is incredibly time-consuming, because the Finder tries to count each file in each backup. The same thing happens if I try to move the Backups.backupdb folder from the trash back on my hard drive where it was before.  What can I do in this situation? How can I delete the backups?
17784
Not sure if this is actually desired, but  is currently showing me (a SE non-dev)  results, including all queries that are being run against the DB (not talking about data-explorer queries of course, talking about site rendering queries).    New feature of  or a deployment whoops?  Edit:  I didn't realize that data was .  With that in mind, this probably isn't a security problem after all, and is in fact more likely .
97097
I am looking for the best practices or analysis someone would have followed to identify the unused or inactive databases on my SQL Server.  I went through many articles, which say possibly to go for user connections and activating traces to find the DB usage, but implementing those created more confusion.  Kindly help me in understanding if there is a better and safer way I can take my databases offline once identified.
54938
I have a database, that due to some silly code issues has grown hugely. It is now sitting at 24GB, most of it is very unnecessary logging information (system generated debug information).  My server lives on a cloud hosted server. I am now sitting with 2 issues because of the file size:   I pay for storage. I am happy to pay for my core business, but paying for silly data seems....silly My backups are now huge also. I do nightly full backups, and then ship them off to an FTP server. This process is taking longer and longer.   Given my issues, is shrinking so bad? I will rebuild all my indexes. I did a dry run, and brought my database down to 6GB.  This guy (who I have always trusted as my SQL guru), says it's bad....mkay
55836
I am curious if it is possible to have a VPS that has data on it that is not readable by the hosting provider, but is still usable on the VPS.  Obviously there are some things that you could do to prevent them from reading anything...   You could change all the passwords, including root. But then, they could still use some alternate boot to reset the password, or they could just mount the disk another way. So, you could encrypt the disk or at least some of the contents on the disk. But then it seems that if you decrypted the content, they could still "peer in" to see what you were doing at the console, because after all, the virtualization platform should allow this. And even if you could stop that, it seems they could just read the RAM of the VPS directly.   Of course, the VPS can store data on it and as long as the key is not on the VPS and the data is never decrypted there, then the host cannot get the data.  But it seems to me that if any point the data on the VPS is decrypted...for use on the VPS...then the hosting provider can get the data.  So, my two questions are:   Is this correct? Is it true that there is no way to 100% secure data on a VPS from a host from seeing it, while keeping it accessable by the VPS? If it is possible to make it 100% secure, then how? If it is not possible, then what is the closest you can get to hiding data from the web host?
51536
is a bit of an odd case.  The user placed a bounty on it, then engaged in a rollback war culminating with a lock. He then requested his account to be deleted. It was. The question, which was at -1 at the time, was automatically deleted along with the account. This should not happen since bounty questions ordinarily can be neither closed nor deleted.  Now the bounty languishes in a limbo state, its clock ticking away in futility, hoping against desperate hope that someone somewhere will rescue it. But no one hears its cries.    Cheer? No, I'm afraid not.
107732
Batch jobs error emails report:      The transaction log for database 'WebDB' is full.   No, it isn't. Its 90% free. The transaction log backups run normally. My hardware guy tells me the hardware is running perfectly, with plenty of space. SQL Server 2008 SP3, but not R2.  I'm a developer, we no longer have a DBA. So it falls to me to try and fix this.