Step 1.1: Open cmd program with administrator rights.
First, you need to open cmd in the admin mode, then run all commands below one by one.
Step 1.2: Get into the Office directory in cmd.
cd /d %ProgramFiles(x86)%\Microsoft Office\Office16
cd /d %ProgramFiles%\Microsoft Office\Office16
If you install your Office in the ProgramFiles folder, the Office directory depends on the architecture of your OS. If you are not sure of this issue, just run both of the commands above. One of them will be not executed and an error message will be printed on the screen.
Step 1.3: Install Office 2021 volume license.
for /f %x in ('dir /b ..\root\Licenses16\ProPlus2021VL_KMS*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%x"
This step is required. You can not install the KMS client product key of Office without a volume license.
Step 1.4: Activate your Office using the KMS key.
Make sure your device is connected to the internet, then run the following commands.
cscript ospp.vbs /setprt:1688
cscript ospp.vbs /unpkey:6F7TH >nul
cscript ospp.vbs /inpkey:FXYTK-NJJ8C-GB6DW-3DYQT-6F7TH
cscript ospp.vbs /sethst:kms8.msguides.com
cscript ospp.vbs /act
Read More
Thứ Tư, 25 tháng 9, 2024
Thứ Ba, 10 tháng 9, 2024
[ MongoDB ] What to do if you accidentally drop a MongoDB table?
In fact, many people when encountering this situation think that it is impossible to save MongoDB data. And very few people share about this case. This is a very real situation and has many difficulties when faced.
If the database is Oracle, we can easily do it. However, what about MongoDB?
The answer is yes. However, the way to save data will be more complicated.
In this article, I will share with you a method that can save data when deleting or dropping the wrong table. A useful method for those who accidentally impact the database
Step 1: Immediately backup oplog after detecting the wrong data deletion behavior
The command is as follows:
mongodump -u username --authenticationDatabase admin -p password -d local -c oplog.rs --out /backup/mongo
Step 2: Determine the timestamp on the oplog.rs table to restore the point in time before the drop time
db.getCollection("oplog.rs").find({"o.drop" : "collection_name"})
Step 3: Recover the point in time of the dropped data to save the data
mongorestore --port 27017 -u username -p password --authenticationDatabase admin --oplogReplay --oplogLimit=1725939063:1 /backup/mongo/local/oplog.rs.bson
Read More
Đăng ký:
Bài đăng (Atom)