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

Manual backup of Mongo database #6481

Open
ZENAdmin-Ops opened this issue Oct 28, 2024 · 59 comments · Fixed by #6500
Open

Manual backup of Mongo database #6481

ZENAdmin-Ops opened this issue Oct 28, 2024 · 59 comments · Fixed by #6500
Labels

Comments

@ZENAdmin-Ops
Copy link

Describe the bug
I'm trying to perform a manual backup of the Mongo DB.

To Reproduce
Steps to reproduce the behavior:

  1. Platform is Windows
  2. Open admin command prompt
  3. cd C:\Program Files\MongoDB\Server\7.0\bin>
  4. mongodump --archive=C:\MeshCentral\meshcentral-backups\meshcentral-backup-2024-10-29.zip
  5. Output: Refer screenshots.

Expected behavior
Expect a valid database backup.

Screenshots
Output from mongodump command appears successful:
2024-10-29T08:51:59.624+1100 done dumping admin.system.version (1 document)
2024-10-29T08:51:59.624+1100 writing meshcentral.events to archive 'C:\MeshCentral\meshcentral-backups\meshcentral-backup-2024-10-29.zip'
2024-10-29T08:51:59.645+1100 writing meshcentral.serverstats to archive 'C:\MeshCentral\meshcentral-backups\meshcentral-backup-2024-10-29.zip'
2024-10-29T08:51:59.651+1100 writing meshcentral.meshcentral to archive 'C:\MeshCentral\meshcentral-backups\meshcentral-backup-2024-10-29.zip'
2024-10-29T08:51:59.657+1100 writing meshcentral.power to archive 'C:\MeshCentral\meshcentral-backups\meshcentral-backup-2024-10-29.zip'
2024-10-29T08:51:59.673+1100 done dumping meshcentral.meshcentral (228 documents)
2024-10-29T08:51:59.698+1100 done dumping meshcentral.serverstats (410 documents)
2024-10-29T08:51:59.700+1100 done dumping meshcentral.events (5827 documents)
2024-10-29T08:51:59.700+1100 done dumping meshcentral.power (136 documents)

However refer screenshot of backup directory. The size of the manual backup is substantially smaller than the autobackups.

Also unable to open the manual backup file, while I can open the auto backup files.
Cannot_open_manual_backup

MeshCentral_backups_folder

Server Software (please complete the following information):

  • OS: Windows 10
  • Virtualization: HyperV VM
  • Network: LAN/WAN
  • Version: 1.1.32
  • Node: v20.15.0

Additional context
Add any other context about the problem here.

Your config.json file

{
  "$schema": "https://raw.githubusercontent.com/Ylianst/MeshCentral/master/meshcentral-config-schema.json",
  "__comment1__": "This is a simple configuration file, all values and sections that start with underscore (_) are ignored. Edit a section and remove the _ in front of the name. Refer to the user's guide for details.",
  "__comment2__": "See node_modules/meshcentral/sample-config-advanced.json for a more advanced example.",
  "settings": {
    "cert": "mc1.zen.net.au",
    "WANonly": true,
	"_LANonly": true,
    "sessionKey": "",
    "_port": 443,
    "aliasPort": 5443,
	"MpsAliasPort": 54433,
    "_redirPort": 80,
    "_redirAliasPort": 80,	
	"mongodb": "mongodb://127.0.0.1:27017/meshcentral",
    "mongodbcol": "meshcentral",
	"autoBackup": {
	"mongoDumpPath": "C:/Program Files/MongoDB/Server/7.0/bin/mongodump.exe",
	"backupIntervalHours": 24,
	"keepLastDaysBackup": 10,
	"zipPassword": "there is a password",
	"backupPath": "C:/MeshCentral/meshcentral-backups",
	"maxFiles": 10
	}
  },
  "domains": {
    "": {
      "_title": "MyServer",
      "_title2": "Servername",
      "_minify": true,
      "_newAccounts": true,
      "_userNameIsEmail": true
    }
  },
  "_letsencrypt": {
    "__comment__": "Requires NodeJS 8.x or better, Go to https://letsdebug.net/ first before trying Let's Encrypt.",
    "email": "[email protected]",
    "names": "mc1.zen.net.au",
    "skipChallengeVerification": true,
    "production": false
  }
}
@si458
Copy link
Collaborator

si458 commented Oct 28, 2024

This isn't a meshcentral issue but a mongodb issue
You are mis-understanding the mongodump function

https://www.mongodb.com/docs/database-tools/mongodump/mongodump-examples/#output-to-an-archive-file

It's not a zip file, but a mongodump file, so u can't open it with windows explorer

@si458 si458 added the invalid label Oct 28, 2024
@ZENAdmin-Ops
Copy link
Author

Hello,

I see, in that case the backup file created when I perform a manual dump is different to the backup file created by an autobackup.

@si458
Copy link
Collaborator

si458 commented Oct 28, 2024

I will try have a look tomorrow when i get chance.
I have a lot of my plate at the moment (person life wise) so just taking a step bk at the min

@ZENAdmin-Ops
Copy link
Author

Hello,

No urgency on that. Thanks.

Now that I understand that the manual backup file is different to the auto-backup - and therefore is probably valid. I'll try restoring the backup.

The reason for the ticket was that I thought that the backup file was no good. Curious as to the difference in the size of the backup files though.

@ZENAdmin-Ops
Copy link
Author

Hello,

I modified the backup command as follows:
mongodump --archive=C:\MeshCentral\meshcentral-backups\meshcentral-backup-2024-10-29.archive

The backup appeared to complete OK.

I then tried to restore the database on another VM. I'm trying to move the MeshCentral host.

I stopped the meshcentral service and issued the command:
mongorestore --archive=C:\MeshCentral\meshcentral-backups\meshcentral-backup-2024-10-29.archive

The restore appears to have failed:

I say this, because although all the hosts have appeared in the MeshCentral portal, only a handful are connecting with the endpoints.

C:\Program Files\MongoDB\Server\7.0\bin>mongorestore --archive=C:\MeshCentral\meshcentral-backups\meshcentral-backup-2024-10-29.archive

2024-10-29T13:19:08.762+1100 preparing collections to restore from
2024-10-29T13:19:08.773+1100 reading metadata for meshcentral.serverstats from archive 'C:\MeshCentral\meshcentral-backups\meshcentral-backup-2024-10-29.archive'
2024-10-29T13:19:08.775+1100 reading metadata for meshcentral.events from archive 'C:\MeshCentral\meshcentral-backups\meshcentral-backup-2024-10-29.archive'
2024-10-29T13:19:08.775+1100 reading metadata for meshcentral.power from archive 'C:\MeshCentral\meshcentral-backups\meshcentral-backup-2024-10-29.archive'
2024-10-29T13:19:08.775+1100 reading metadata for meshcentral.meshcentral from archive 'C:\MeshCentral\meshcentral-backups\meshcentral-backup-2024-10-29.archive'
2024-10-29T13:19:08.780+1100 restoring to existing collection meshcentral.power without dropping
2024-10-29T13:19:08.781+1100 restoring meshcentral.power from archive 'C:\MeshCentral\meshcentral-backups\meshcentral-backup-2024-10-29.archive'
2024-10-29T13:19:08.782+1100 restoring to existing collection meshcentral.events without dropping
2024-10-29T13:19:08.784+1100 restoring meshcentral.events from archive 'C:\MeshCentral\meshcentral-backups\meshcentral-backup-2024-10-29.archive'
2024-10-29T13:19:09.031+1100 finished restoring meshcentral.events (5828 documents, 0 failures)
2024-10-29T13:19:09.032+1100 restoring to existing collection meshcentral.meshcentral without dropping
2024-10-29T13:19:09.034+1100 restoring meshcentral.meshcentral from archive 'C:\MeshCentral\meshcentral-backups\meshcentral-backup-2024-10-29.archive'
2024-10-29T13:19:09.036+1100 restoring to existing collection meshcentral.serverstats without dropping
2024-10-29T13:19:09.037+1100 restoring meshcentral.serverstats from archive 'C:\MeshCentral\meshcentral-backups\meshcentral-backup-2024-10-29.archive'
2024-10-29T13:19:09.048+1100 finished restoring meshcentral.serverstats (410 documents, 0 failures)
2024-10-29T13:19:09.078+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "DatabaseIdentifier" }
2024-10-29T13:19:09.079+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "SchemaVersion" }
2024-10-29T13:19:09.079+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "dbconfig" }
2024-10-29T13:19:09.080+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "LoginCookieEncryptionKey" }
2024-10-29T13:19:09.080+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "InvitationLinkEncryptionKey" }
2024-10-29T13:19:09.080+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "user//admin" }
2024-10-29T13:19:09.081+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "wsuser//admin" }
2024-10-29T13:19:09.082+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "LastAutoBackupTime" }
2024-10-29T13:19:09.082+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "mesh//QL2vy9P3jtrUMar@$3LJ8XN@3dwL7QBwU3Gk2BM8FacWKX7oXdTTO1AGiq5CKSFU" }
2024-10-29T13:19:09.082+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "lcnode//BSj3y@6zVFkfZZO9Ln1DknINQ$9EzAJTLPpVep5GioXRbG6XHkcjA4KQFPJrUiBC" }
2024-10-29T13:19:09.083+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "node//BSj3y@6zVFkfZZO9Ln1DknINQ$9EzAJTLPpVep5GioXRbG6XHkcjA4KQFPJrUiBC" }
2024-10-29T13:19:09.083+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "ifnode//BSj3y@6zVFkfZZO9Ln1DknINQ$9EzAJTLPpVep5GioXRbG6XHkcjA4KQFPJrUiBC" }
2024-10-29T13:19:09.083+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "sinode//BSj3y@6zVFkfZZO9Ln1DknINQ$9EzAJTLPpVep5GioXRbG6XHkcjA4KQFPJrUiBC" }
2024-10-29T13:19:09.084+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "mesh//O1f7gMDFJah@GbMXP$@4eKX7OYCyfBPGlJ1K3KCXPOCcoNkPn0LbOMXa3Kilpf3u" }
2024-10-29T13:19:09.084+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "node//TExFRABRUxCAMsjAT0NaM0xMRUQAUVMQgDLIwE9DWjNMTEVEAFFTEIAyyMBPQ1oz" }
2024-10-29T13:19:09.084+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "ifnode//TExFRABRUxCAMsjAT0NaM0xMRUQAUVMQgDLIwE9DWjNMTEVEAFFTEIAyyMBPQ1oz" }
2024-10-29T13:19:09.085+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "sinode//TExFRABRUxCAMsjAT0NaM0xMRUQAUVMQgDLIwE9DWjNMTEVEAFFTEIAyyMBPQ1oz" }
2024-10-29T13:19:09.085+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "lcnode//TExFRABRUxCAMsjAT0NaM0xMRUQAUVMQgDLIwE9DWjNMTEVEAFFTEIAyyMBPQ1oz" }
2024-10-29T13:19:09.086+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "lcnode//oG9HfWMfuxxvxbCkaHM8yu@VembIgV1xR5pqpTzY4ge6PyWB@CLs1j3O8nNz3XKw" }
2024-10-29T13:19:09.086+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "node//oG9HfWMfuxxvxbCkaHM8yu@VembIgV1xR5pqpTzY4ge6PyWB@CLs1j3O8nNz3XKw" }
2024-10-29T13:19:09.086+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "ifnode//oG9HfWMfuxxvxbCkaHM8yu@VembIgV1xR5pqpTzY4ge6PyWB@CLs1j3O8nNz3XKw" }
2024-10-29T13:19:09.087+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "sinode//oG9HfWMfuxxvxbCkaHM8yu@VembIgV1xR5pqpTzY4ge6PyWB@CLs1j3O8nNz3XKw" }
2024-10-29T13:19:09.087+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "node//TExFRABNQxCAUsPATzM0NExMRUQATUMQgFLDwE8zNDRMTEVEAE1DEIBSw8BPMzQ0" }
2024-10-29T13:19:09.087+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "ifnode//TExFRABNQxCAUsPATzM0NExMRUQATUMQgFLDwE8zNDRMTEVEAE1DEIBSw8BPMzQ0" }
2024-10-29T13:19:09.088+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "sinode//TExFRABNQxCAUsPATzM0NExMRUQATUMQgFLDwE8zNDRMTEVEAE1DEIBSw8BPMzQ0" }
2024-10-29T13:19:09.088+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "lcnode//TExFRABNQxCAUsPATzM0NExMRUQATUMQgFLDwE8zNDRMTEVEAE1DEIBSw8BPMzQ0" }
2024-10-29T13:19:09.088+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "node//TExFRABNQxCAUsTATzM0NExMRUQATUMQgFLEwE8zNDRMTEVEAE1DEIBSxMBPMzQ0" }
2024-10-29T13:19:09.089+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "ifnode//TExFRABNQxCAUsTATzM0NExMRUQATUMQgFLEwE8zNDRMTEVEAE1DEIBSxMBPMzQ0" }
2024-10-29T13:19:09.089+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "sinode//TExFRABNQxCAUsTATzM0NExMRUQATUMQgFLEwE8zNDRMTEVEAE1DEIBSxMBPMzQ0" }
2024-10-29T13:19:09.089+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "lcnode//TExFRABNQxCAUsTATzM0NExMRUQATUMQgFLEwE8zNDRMTEVEAE1DEIBSxMBPMzQ0" }
2024-10-29T13:19:09.090+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "lcnode//5TnfMlhPrLgriWOsoeO97$J5AoznFeY1gqbt$czzaG814VAxSeu8lp7ef5httqjD" }
2024-10-29T13:19:09.091+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "node//5TnfMlhPrLgriWOsoeO97$J5AoznFeY1gqbt$czzaG814VAxSeu8lp7ef5httqjD" }
2024-10-29T13:19:09.091+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "ifnode//5TnfMlhPrLgriWOsoeO97$J5AoznFeY1gqbt$czzaG814VAxSeu8lp7ef5httqjD" }
2024-10-29T13:19:09.091+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "sinode//5TnfMlhPrLgriWOsoeO97$J5AoznFeY1gqbt$czzaG814VAxSeu8lp7ef5httqjD" }
2024-10-29T13:19:09.092+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "lcnode//hi8mVvlwr1Mu@EY6Jq9VMqXQzarMDDB@8m1slASJ8qhhRV7brh8Lxx8wj697Rpml" }
2024-10-29T13:19:09.092+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "node//hi8mVvlwr1Mu@EY6Jq9VMqXQzarMDDB@8m1slASJ8qhhRV7brh8Lxx8wj697Rpml" }
2024-10-29T13:19:09.092+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "ifnode//hi8mVvlwr1Mu@EY6Jq9VMqXQzarMDDB@8m1slASJ8qhhRV7brh8Lxx8wj697Rpml" }
2024-10-29T13:19:09.093+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "sinode//hi8mVvlwr1Mu@EY6Jq9VMqXQzarMDDB@8m1slASJ8qhhRV7brh8Lxx8wj697Rpml" }
2024-10-29T13:19:09.093+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "lcnode//kwNCbEGikUXrwCFS0gsR5Ke0bwZzkK7TgnPkwBRLUNLqcvXvle7uNvoaCshYzKGz" }
2024-10-29T13:19:09.093+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "node//kwNCbEGikUXrwCFS0gsR5Ke0bwZzkK7TgnPkwBRLUNLqcvXvle7uNvoaCshYzKGz" }
2024-10-29T13:19:09.094+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "node//TExFRABNQxCAUsbATzM0NExMRUQATUMQgFLGwE8zNDRMTEVEAE1DEIBSxsBPMzQ0" }
2024-10-29T13:19:09.094+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "ifnode//kwNCbEGikUXrwCFS0gsR5Ke0bwZzkK7TgnPkwBRLUNLqcvXvle7uNvoaCshYzKGz" }
2024-10-29T13:19:09.094+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "sinode//kwNCbEGikUXrwCFS0gsR5Ke0bwZzkK7TgnPkwBRLUNLqcvXvle7uNvoaCshYzKGz" }
2024-10-29T13:19:09.095+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "ifnode//TExFRABNQxCAUsbATzM0NExMRUQATUMQgFLGwE8zNDRMTEVEAE1DEIBSxsBPMzQ0" }
2024-10-29T13:19:09.095+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "sinode//TExFRABNQxCAUsbATzM0NExMRUQATUMQgFLGwE8zNDRMTEVEAE1DEIBSxsBPMzQ0" }
2024-10-29T13:19:09.096+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "lcnode//TExFRABNQxCAUsbATzM0NExMRUQATUMQgFLGwE8zNDRMTEVEAE1DEIBSxsBPMzQ0" }
2024-10-29T13:19:09.096+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "lcnode//cpAyvTXt5@9ZW3fyFKJZ4vuBrZcGtVQxHwEE6$bsbTyWC6H$mtzgMnvXbFUD5sE4" }
2024-10-29T13:19:09.096+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "node//cpAyvTXt5@9ZW3fyFKJZ4vuBrZcGtVQxHwEE6$bsbTyWC6H$mtzgMnvXbFUD5sE4" }
2024-10-29T13:19:09.097+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "ifnode//cpAyvTXt5@9ZW3fyFKJZ4vuBrZcGtVQxHwEE6$bsbTyWC6H$mtzgMnvXbFUD5sE4" }
2024-10-29T13:19:09.097+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "sinode//cpAyvTXt5@9ZW3fyFKJZ4vuBrZcGtVQxHwEE6$bsbTyWC6H$mtzgMnvXbFUD5sE4" }
2024-10-29T13:19:09.097+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "node//TExFRABNQxCAUsLATzM0NExMRUQATUMQgFLCwE8zNDRMTEVEAE1DEIBSwsBPMzQ0" }
2024-10-29T13:19:09.098+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "ifnode//TExFRABNQxCAUsLATzM0NExMRUQATUMQgFLCwE8zNDRMTEVEAE1DEIBSwsBPMzQ0" }
2024-10-29T13:19:09.103+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "sinode//TExFRABNQxCAUsLATzM0NExMRUQATUMQgFLCwE8zNDRMTEVEAE1DEIBSwsBPMzQ0" }
2024-10-29T13:19:09.110+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "lcnode//TExFRABNQxCAUsLATzM0NExMRUQATUMQgFLCwE8zNDRMTEVEAE1DEIBSwsBPMzQ0" }
2024-10-29T13:19:09.112+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "mesh//qTRhJVCbRBCj30FPaUpHcEWaipwFsAxvPz9uFvf3raXa@lHsfbIzgjnwngGufjrD" }
2024-10-29T13:19:09.112+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "mesh//cZ3TXvTWt@0W1oKnvL8iXhCE3aojHqhoIk3Ib7GgkpYQsodiwo3ZLe6irg3JV107" }
2024-10-29T13:19:09.112+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "node//gWsBpcHzFPrCjW2eO1fR@Hal$s9N7J6VWczDYbzZwIC9oGomcyXjdZCX@eWqY9Fp" }
2024-10-29T13:19:09.113+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "lcnode//gWsBpcHzFPrCjW2eO1fR@Hal$s9N7J6VWczDYbzZwIC9oGomcyXjdZCX@eWqY9Fp" }
2024-10-29T13:19:09.113+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "ifnode//gWsBpcHzFPrCjW2eO1fR@Hal$s9N7J6VWczDYbzZwIC9oGomcyXjdZCX@eWqY9Fp" }
2024-10-29T13:19:09.113+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "sinode//gWsBpcHzFPrCjW2eO1fR@Hal$s9N7J6VWczDYbzZwIC9oGomcyXjdZCX@eWqY9Fp" }
2024-10-29T13:19:09.115+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "lcnode//SjxanULiPFyqt1pcXeI5F@pMD3lpYnjw7b0xVDIvyho9Audc94qy$ZB7XVJm2gnA" }
2024-10-29T13:19:09.115+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "node//SjxanULiPFyqt1pcXeI5F@pMD3lpYnjw7b0xVDIvyho9Audc94qy$ZB7XVJm2gnA" }
2024-10-29T13:19:09.115+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "sinode//SjxanULiPFyqt1pcXeI5F@pMD3lpYnjw7b0xVDIvyho9Audc94qy$ZB7XVJm2gnA" }
2024-10-29T13:19:09.116+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "ifnode//SjxanULiPFyqt1pcXeI5F@pMD3lpYnjw7b0xVDIvyho9Audc94qy$ZB7XVJm2gnA" }
2024-10-29T13:19:09.116+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "lcnode//OWlQLQYv$TUl3e5IWxH8F0ULI@Anntlid7d5W14pVncv13Q0lo8qHUYoHrexbQ8E" }
2024-10-29T13:19:09.117+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "node//OWlQLQYv$TUl3e5IWxH8F0ULI@Anntlid7d5W14pVncv13Q0lo8qHUYoHrexbQ8E" }
2024-10-29T13:19:09.117+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "ifnode//OWlQLQYv$TUl3e5IWxH8F0ULI@Anntlid7d5W14pVncv13Q0lo8qHUYoHrexbQ8E" }
2024-10-29T13:19:09.117+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "sinode//OWlQLQYv$TUl3e5IWxH8F0ULI@Anntlid7d5W14pVncv13Q0lo8qHUYoHrexbQ8E" }
2024-10-29T13:19:09.118+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "node//TExFRAAxNRCAUsfAT0IwM0xMRUQAMTUQgFLHwE9CMDNMTEVEADE1EIBSx8BPQjAz" }
2024-10-29T13:19:09.118+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "ifnode//TExFRAAxNRCAUsfAT0IwM0xMRUQAMTUQgFLHwE9CMDNMTEVEADE1EIBSx8BPQjAz" }
2024-10-29T13:19:09.118+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "sinode//TExFRAAxNRCAUsfAT0IwM0xMRUQAMTUQgFLHwE9CMDNMTEVEADE1EIBSx8BPQjAz" }
2024-10-29T13:19:09.119+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "lcnode//Co0qXdqg3Bv78CoGMd8ioouIWU1gZjaMzNb@XAYXyrMS6pTBeNCL7rI2fBZ6zBOd" }
2024-10-29T13:19:09.119+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "node//Co0qXdqg3Bv78CoGMd8ioouIWU1gZjaMzNb@XAYXyrMS6pTBeNCL7rI2fBZ6zBOd" }
2024-10-29T13:19:09.119+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "ifnode//Co0qXdqg3Bv78CoGMd8ioouIWU1gZjaMzNb@XAYXyrMS6pTBeNCL7rI2fBZ6zBOd" }
2024-10-29T13:19:09.120+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "sinode//Co0qXdqg3Bv78CoGMd8ioouIWU1gZjaMzNb@XAYXyrMS6pTBeNCL7rI2fBZ6zBOd" }
2024-10-29T13:19:09.121+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "lcnode//TExFRAAxNRCAUsfAT0IwM0xMRUQAMTUQgFLHwE9CMDNMTEVEADE1EIBSx8BPQjAz" }
2024-10-29T13:19:09.121+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "node//TExFRAAyVxCAQ8LAT1JaMkxMRUQAMlcQgEPCwE9SWjJMTEVEADJXEIBDwsBPUloy" }
2024-10-29T13:19:09.121+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "ifnode//TExFRAAyVxCAQ8LAT1JaMkxMRUQAMlcQgEPCwE9SWjJMTEVEADJXEIBDwsBPUloy" }
2024-10-29T13:19:09.122+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "sinode//TExFRAAyVxCAQ8LAT1JaMkxMRUQAMlcQgEPCwE9SWjJMTEVEADJXEIBDwsBPUloy" }
2024-10-29T13:19:09.122+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "node//TExFRABNWhCANrjAT1IxM0xMRUQATVoQgDa4wE9SMTNMTEVEAE1aEIA2uMBPUjEz" }
2024-10-29T13:19:09.122+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "ifnode//TExFRABNWhCANrjAT1IxM0xMRUQATVoQgDa4wE9SMTNMTEVEAE1aEIA2uMBPUjEz" }
2024-10-29T13:19:09.123+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "sinode//TExFRABNWhCANrjAT1IxM0xMRUQATVoQgDa4wE9SMTNMTEVEAE1aEIA2uMBPUjEz" }
2024-10-29T13:19:09.123+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "lcnode//9vgd3TuQ4zABgxJHG9RwUHRXmGAhmF$ZVIuoGTKiZwYhWOH4AMwLh1Mpia1cNC0L" }
2024-10-29T13:19:09.123+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "node//9vgd3TuQ4zABgxJHG9RwUHRXmGAhmF$ZVIuoGTKiZwYhWOH4AMwLh1Mpia1cNC0L" }
2024-10-29T13:19:09.124+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "ifnode//9vgd3TuQ4zABgxJHG9RwUHRXmGAhmF$ZVIuoGTKiZwYhWOH4AMwLh1Mpia1cNC0L" }
2024-10-29T13:19:09.124+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "sinode//9vgd3TuQ4zABgxJHG9RwUHRXmGAhmF$ZVIuoGTKiZwYhWOH4AMwLh1Mpia1cNC0L" }
2024-10-29T13:19:09.124+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "node//TExFRAAxORCAUcfAT0IwM0xMRUQAMTkQgFHHwE9CMDNMTEVEADE5EIBRx8BPQjAz" }
2024-10-29T13:19:09.125+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "ifnode//TExFRAAxORCAUcfAT0IwM0xMRUQAMTkQgFHHwE9CMDNMTEVEADE5EIBRx8BPQjAz" }
2024-10-29T13:19:09.125+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "sinode//TExFRAAxORCAUcfAT0IwM0xMRUQAMTkQgFHHwE9CMDNMTEVEADE5EIBRx8BPQjAz" }
2024-10-29T13:19:09.125+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "lcnode//TExFRAAxORCAUcfAT0IwM0xMRUQAMTkQgFHHwE9CMDNMTEVEADE5EIBRx8BPQjAz" }
2024-10-29T13:19:09.126+1100 continuing through error: E11000 duplicate key error collection: meshcentral.meshcentral index: id dup key: { _id: "mesh//rnS2MX6MK1uBtmtkLgcYqIEE9O2pXcCR1LO@dOAW7kmrCLGv7ZIpyd35D1lYGDXd" }
2024-10-29T13:19:09.126+1100 continui

@ZENAdmin-Ops
Copy link
Author

Wondering if these instructions are relevant:

If using MongoDB, copy the backup.archive back, make sure to clean up any existing “meshcentral”
database, run “mongo” and type:
use meshcentral
db.dropDatabase()

How to run "mongo" ?

@ZENAdmin-Ops
Copy link
Author

Endpoints with MeshAgents are connecting to the restored MeshCentral server.

However no AMT agents are connecting to the restored MeshCentral server.

@PTR-inc
Copy link
Contributor

PTR-inc commented Oct 30, 2024

If autobackup is configured, the db dumpfile created with mongodump (or any other dump for that matter) is put in the zipfile afterwards. The zip is the dump file including the meshcentral-data directory. This also contains your signed-agents directory, which makes it large.

The shown autobackup file is corrupt, which can happen as there are a few paths to failure in the zipfile creation function. The archiver module does not resume for example after a warning and leaves an unfinished zipfile.

@si458 I'm in the process of fixing this and a few other to-do's there and adding some backup options. As soon as it's finished and checked I'll do a PR.

@si458
Copy link
Collaborator

si458 commented Oct 30, 2024

@PTR-inc I haven't looked at the autobackup feature in a while, but it could indeed be a bug, so thank u for having a look! I'm very busy at the moment with personal life things, so look at things when I get a chance

@si458
Copy link
Collaborator

si458 commented Oct 31, 2024

heads up, the PR @PTR-inc is doing might fix your issue #6487

@si458 si458 removed the invalid label Oct 31, 2024
@ZENAdmin-Ops
Copy link
Author

Hello,

I have updated to 1.1.33

Unfortunately it doesn't appear to have made any difference to the errors I'm observing.

Here is a partial extract of the log. For some reason I can't pipe the output of mongorestore to a txt file and there is too much output for the cmd prompt
mongorestore_log.txt

@ZENAdmin-Ops
Copy link
Author

This is the command I'm entering

C:\Program Files\MongoDB\Server\7.0\bin>mongorestore --archive=C:\MeshCentral\meshcentral-backups\meshcentral-autobackup-2024-11-04-10-51\mongodump-2024-11-04-10-51.archive

@si458
Copy link
Collaborator

si458 commented Nov 4, 2024

@ZENAdmin-Ops the PR didn't get merged into 1.1.33, it just missed it!
So it will be in 1.1.34 now I'm afraid
The way to test now would be to install the development version.

  1. Backup the whole of the meshcentral folder in program files
  2. Cd to meshcentral
  3. Stop meshcentral service
  4. npm install Ylianst/MeshCentral
  5. Start meshcentral service
  6. Try autobackup
    Remember with development version, the is no translations! So all is English!

@ZENAdmin-Ops
Copy link
Author

C:\MeshCentral>npm install Ylianst/MeshCentral
npm error code ENOENT
npm error syscall spawn git
npm error path git
npm error errno -4058
npm error enoent An unknown git error occurred
npm error enoent This is related to npm not being able to find a file.
npm error enoent
npm error A complete log of this run can be found in: C:\Users\ZEN.ZEN\AppData\Local\npm-cache_logs\2024-11-04T07_26_54_103Z-debug-0.log

@si458
Copy link
Collaborator

si458 commented Nov 4, 2024

C:\MeshCentral>npm install Ylianst/MeshCentral
npm error code ENOENT
npm error syscall spawn git
npm error path git
npm error errno -4058
npm error enoent An unknown git error occurred
npm error enoent This is related to npm not being able to find a file.
npm error enoent
npm error A complete log of this run can be found in: C:\Users\ZEN.ZEN\AppData\Local\npm-cache_logs\2024-11-04T07_26_54_103Z-debug-0.log

Oh yeh on windows u must have git for windows installed, doh! Forgot to say, then restart the terminal after install

@ZENAdmin-Ops
Copy link
Author

Is it possible to trigger an autobackup?

@si458
Copy link
Collaborator

si458 commented Nov 4, 2024

Is it possible to trigger an autobackup?

Go into the my server tab then console tab and type autobackup and watch it's output :)

@ZENAdmin-Ops
Copy link
Author

There is no mongo archive in the autobackup

@si458
Copy link
Collaborator

si458 commented Nov 4, 2024

are you running the latest 1.1.33 or are you using the master repo which includes the new backup features?

@ZENAdmin-Ops
Copy link
Author

This version
npm install Ylianst/MeshCentral

@si458
Copy link
Collaborator

si458 commented Nov 4, 2024

what does your config.json look like? like above?
i think the path for the mongodump is incorrect as it should be C:\\Program Files\\ etc
same with the meshcentral backup folder

edit: i just tested mongodb here on mac and it backups up fine, with the .archive file inside the zip folder

@ZENAdmin-Ops
Copy link
Author

config.json is as per above

And previously worked fine with the mongodb archive included in the zip file

@si458
Copy link
Collaborator

si458 commented Nov 4, 2024

works perfectly fine here too with your style config

    "autoBackup": {
      "mongoDumpPath": "/usr/local/bin/mongodump",
      "backupIntervalHours": 24,
      "keepLastDaysBackup": 10,
      "zipPassword": "thereisapassword",
      "backupPath": "/Users/simon/Documents/",
      "maxFiles": 10
    }

after checking source code the is alot of console.log
have you checked the meshcentral log file if you used the installer?
is the any sort of output?

@ZENAdmin-Ops
Copy link
Author

Can you advise the location of the log file?

@si458
Copy link
Collaborator

si458 commented Nov 4, 2024

C:\\Program Files\\Open Source\\MeshCentral\\
then inside there the is a folder called win-daemon if i remember
them in there the is log files
i dont use the meshcentralinstaller so im not sure

@ZENAdmin-Ops
Copy link
Author

I don't have that folder.

Can you provide an example filename for a log, I can use that to search.

@si458
Copy link
Collaborator

si458 commented Nov 4, 2024

i dont use the meshcentral installer so im not sure im afraid i cant remember
ill have to create a VM tomorrow and try the setup
did you use the meshcentralinstaller to begin with to setup meshcentral?
but set the folder to C:\MeshCentral (you list this folder alot above)
the log files could be in that folder instead!
also the should be a folder called WinService and in there are the logs (my mistake just checked source code)

@ZENAdmin-Ops
Copy link
Author

ZENAdmin-Ops commented Nov 4, 2024

With one slash

autobackup creates an autobackup file, but there is no archive

backupconfig says all the right things in the console, but no backup file is created.

Also backupconfig causes the service to stop

@si458
Copy link
Collaborator

si458 commented Nov 4, 2024

With one slash

autobackup creates an autobackup file, but there is no archive

backupconfig says all the right things in the console, but no backup file is created.

Also backupconfig causes the service to stop

you have given like 3 different things here with like 3 different setups?
they all cant be doing those exact things surely?

the must be something wrong with your setup,
if you are awake in the morning (10hours time),
email myself and ill try connect into your machine and have alook, as something isnt right with your setup

@ZENAdmin-Ops
Copy link
Author

ZENAdmin-Ops commented Nov 4, 2024

With two slashes

autobackup creates an autobackup file, but no archive

backupconfig says all the right things in the console

With one slash
autobackup creates an autobackup file, but there is no archive
backupconfig says all the right things in the console, but no backup file is created.
Also backupconfig causes the service to stop

you have given like 3 different things here with like 3 different setups? they all cant be doing those exact things surely?

the must be something wrong with your setup, if you are awake in the morning (10hours time), email myself and ill try connect into your machine and have alook, as something isnt right with your setup

Different commands, produce different results

Entirely logical

autobackup is one command

backupconfig is another command

@ZENAdmin-Ops
Copy link
Author

With two slashes

autobackup creates an autobackup file, but there is no archive

backupconfig says all the right things in the console, but no backup file is created.

With two slashes, backupconfig does not stop the Meshcentral service

@ZENAdmin-Ops
Copy link
Author

I'm happy for you to connect in to troubleshoot.

Send me an e-mail when you're ready, and if I'm around I will respond.

@ZENAdmin-Ops
Copy link
Author

ZENAdmin-Ops commented Nov 5, 2024

The slashes need to be this way "/" or the Web portal doesn't work

While the service was running with some of the other things we tried above, the Web portal was offline

@PTR-inc
Copy link
Contributor

PTR-inc commented Nov 5, 2024

Just checked with my windows test setup and mongodb. I am using mongo v8 btw, but that should not be an issue.
Tried forward and backslashes, both work. The path is normalized before usage in the backupfunction, so as long as you use '/' or '\' it should not be a problem. Even tried a mix: "mongoDumpPath": "C:/Program Files/MongoDB\Server/8.0/bin/mongodump.exe"
Still works.
I see in the logfiles you are running with some servicehelper, maybe try to exclude issues with the service.
If you add ' "debug": "main,db", ' to config.json settings part and then start it through a terminal, manually. Go to the root of the meshcentral-data folder and run 'node node_modules\meshcentral', you'll see the console messages.
What happens if you do an autobackup then?

@ZENAdmin-Ops
Copy link
Author

C:\MeshCentral>node node_modules\meshcentral
Installing modules [
'[email protected]',
'[email protected]',
'[email protected]',
'[email protected]',
'[email protected]',
'[email protected]',
'[email protected]',
'[email protected]',
'[email protected]',
'[email protected]',
'[email protected]',
'[email protected]',
'[email protected]',
'[email protected]',
'[email protected]',
'[email protected]',
'[email protected]',
'[email protected]',
'[email protected]',
'[email protected]',
'[email protected]'
]
Installing modules [
'[email protected]',
'[email protected]',
'[email protected]',
'[email protected]',
'[email protected]',
'[email protected]',
'[email protected]',
'[email protected]',
'[email protected]',
'[email protected]',
'[email protected]',
'[email protected]',
'[email protected]',
'[email protected]',
'[email protected]',
'[email protected]',
'[email protected]',
'[email protected]',
'[email protected]',
'[email protected]',
'[email protected]'
]
DB: Connected to MongoDB database...
MAIN: Core module windows-amt is 619988 bytes.
MAIN: Core module linux-amt is 568745 bytes.
MAIN: Core module linux-noamt is 472169 bytes.
MAIN: Core module windows-recovery is 134130 bytes.
MAIN: Core module linux-recovery is 80756 bytes.
MAIN: Core module windows-agentrecovery is 59533 bytes.
MAIN: Core module linux-agentrecovery is 6159 bytes.
MAIN: Core module windows-tiny is 6125 bytes.
MAIN: Core module linux-tiny is 6125 bytes.
MeshCentral HTTP redirection server running on port 80.
MeshCentral v1.1.33, WAN mode.
MAIN: Server started
MeshCentral Intel(R) AMT server running on mc1.zen.net.au:4433, alias port 54433.
MeshCentral HTTPS server running on mc1.zen.net.au:443, alias port 5443.
DB: Entering performBackup
DB: Entering createFileBackup
Auto-backup completed.

@si458
Copy link
Collaborator

si458 commented Nov 5, 2024

NOTE: THIS LINE BELOW IS A BUG! YOU CAN IGNORE IT! FIX IS HERE, BAD PR ON MY PART! 0ec8b06

@ZENAdmin-Ops plz email me when u get chance i lost ur email address haha

@PTR-inc
Copy link
Contributor

PTR-inc commented Nov 5, 2024

.. so as long as you use '/' or '' it should not be a problem. Even tried a mix: "mongoDumpPath": "C:/Program Files/MongoDB\Server/8.0/bin/mongodump.exe"

Uuurgh.. '\' should be '\\' ofcourse...always preview a comment lesson learned (again)

Can you show the content of the backup zipfile? There should be a .archive file in the meshcentral-data folder if there is no error in the console.

@ZENAdmin-Ops
Copy link
Author

There isn't.

@si458
Copy link
Collaborator

si458 commented Nov 5, 2024

just updating this issue, after connecting to the computer in question,
the .archive file for mongodb has been put inside the meshcentral-data folder
but if you check previous backups/other setups, the file should sit NEXT TO the meshcentral-data folder as explained here in the ubuntu restore for example
https://ylianst.github.io/MeshCentral/install/install2/#restore-backup-in-ubuntu
so will get this fixed,
we are going to test if the mongodb restore works with the database when we can :)

@PTR-inc
Copy link
Contributor

PTR-inc commented Nov 5, 2024

Ah ok, I put the db archive file in the meshcentral-data folder for backup convenience so all base meshcentral data is together.
@si458 I can change this behavior if you want and put it in the root of the zip. Also if a custom databasename is used this is reflected in the archive file, it is prepended instead of 'meshcentral'.

@si458
Copy link
Collaborator

si458 commented Nov 5, 2024

@PTR-inc would you mind plz!?
i was just looking into it but my heads cabbaged and its only 11am!

@PTR-inc
Copy link
Contributor

PTR-inc commented Nov 5, 2024

Sure!
Will drop the update later today

@si458
Copy link
Collaborator

si458 commented Nov 5, 2024

@PTR-inc ive made a few changes to your PR fc387ca
your PR also goofed up nedb backups as it kept crashing
ive also now pur the variables on the global object instead,
that way they can be accessed from anywhere in the application for later use

@PTR-inc
Copy link
Contributor

PTR-inc commented Nov 5, 2024

Ah yes, my bad. I tested all the dbdumps, not the nedb one with that last change. Thanks

@si458
Copy link
Collaborator

si458 commented Nov 5, 2024

@PTR-inc hey no worries we all live and learn!
hopefully these commits now fix @ZENAdmin-Ops issue with restoring the backups!
the file is indeed in the correct place now, just testing the restore to do 👍

@ZENAdmin-Ops
Copy link
Author

Hello,

I'm still getting the same error with the restore as before.

I'm wondering if these instructions are relevant:

If using MongoDB, copy the backup.archive back,
make sure to clean up any existing “meshcentral”
database, run “mongo” and type:
use meshcentral
db.dropDatabase()

How to run "mongo" ?

@si458
Copy link
Collaborator

si458 commented Nov 5, 2024

@ZENAdmin-Ops where are you seeing those instructions?
in theory u need create a clean blank database (so if the was one, delete it and recreate it)
then restore the archive using mongodump --archive=FILEHERE.archive
https://www.mongodb.com/docs/database-tools/mongorestore/mongorestore-examples/#restore-from-an-archive-file
also the duplicate id is because the database already has data inside it
https://www.mongodb.com/community/forums/t/how-to-avoid-duplicate-id-error-during-restoring-collections-using-mongorestore/6225

@ZENAdmin-Ops
Copy link
Author

I found those instructions from another ticket.

But I'm not clear on how to perform them.

@si458
Copy link
Collaborator

si458 commented Nov 5, 2024

i use mongodb compass as its a nice gui front end of my mac which might help u
https://www.mongodb.com/try/download/compass

@ZENAdmin-Ops
Copy link
Author

Thanks that was a big help.

Restore appears to have worked.

I'll confirm by updating the DNS and see if endpoints connect successfully.

@ZENAdmin-Ops
Copy link
Author

ZENAdmin-Ops commented Nov 5, 2024

A number of the mesh agents have connected, but none of the AMT agents have connected.

I'm not going to be able to troubleshoot this until this evening my time, because users will be using the computers, so I won't be able to connect to the endpoints. Perhaps a restart of the endpoint will be needed to 'refresh' the AMT agent.

@si458
Copy link
Collaborator

si458 commented Nov 5, 2024

@ZENAdmin-Ops this question gets asked alot about how to refresh the amt, and the doesnt appear to be an answer,
the only answer i have found is to physically unplug/plug the device back in
because for example if a DNS record changes, you would need to wait X secs for the dns record to expire
but then how does the amt device refresh its dns?
amt is a real pain/mystery sometimes haha

@ZENAdmin-Ops
Copy link
Author

The existing AMT agents weren't connecting because I messed up the NAT entries at the new site.

FM. So many things to check.

So this ticket can be closed. Thanks for your assistance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants