node-mongodb-s3-backup icon indicating copy to clipboard operation
node-mongodb-s3-backup copied to clipboard

Unexpected errors. Can't tell if succeeded or failed.

Open laran opened this issue 9 years ago • 5 comments

I'm going to try restoring from the backup. But it seems like it should not have logged errors. If they were genuine errors, where would I find a log?

root@mydb-mongodb:~/mongodb-s3-backup# mongodb_s3_backup -n config.json 21 Feb 23:20:34 - [info] Loading config file (/root/mongodb-s3-backup/config.json) 21 Feb 23:20:34 - [info] Starting mongodump of mydb 21 Feb 23:20:34 - [error] 2016-02-21T23:20:34.250-0500 writing mydb.tasks to /tmp/mongodb_s3_backup/mydb/tasks.bson 21 Feb 23:20:34 - [error] 2016-02-21T23:20:34.254-0500 writing mydb.projects to /tmp/mongodb_s3_backup/mydb/projects.bson 21 Feb 23:20:34 - [error] 2016-02-21T23:20:34.255-0500 writing mydb.notes to /tmp/mongodb_s3_backup/mydb/notes.bson 21 Feb 23:20:34 - [error] 2016-02-21T23:20:34.256-0500 writing mydb.entries to /tmp/mongodb_s3_backup/mydb/entries.bson 2016-02-21T23:20:34.259-0500 done dumping mydb.projects (58 documents) 2016-02-21T23:20:34.259-0500 writing mydb.users to /tmp/mongodb_s3_backup/mydb/users.bson 2016-02-21T23:20:34.260-0500 done dumping mydb.entries (23 documents) 2016-02-21T23:20:34.260-0500 writing mydb.migrations to /tmp/mongodb_s3_backup/mydb/migrations.bson 21 Feb 23:20:34 - [error] 2016-02-21T23:20:34.262-0500 done dumping mydb.tasks (189 documents) 21 Feb 23:20:34 - [error] 2016-02-21T23:20:34.264-0500 done dumping mydb.users (3 documents) 2016-02-21T23:20:34.264-0500 writing mydb.meteor_oauth_pendingCredentials to /tmp/mongodb_s3_backup/mydb/meteor_oauth_pendingCredentials.bson 2016-02-21T23:20:34.265-0500 done dumping mydb.migrations (1 document) 2016-02-21T23:20:34.265-0500 writing mydb.meteor_accounts_loginServiceConfiguration to /tmp/mongodb_s3_backup/mydb/meteor_accounts_loginServiceConfiguration.bson 2016-02-21T23:20:34.266-0500 done dumping mydb.meteor_oauth_pendingCredentials (0 documents) 21 Feb 23:20:34 - [error] 2016-02-21T23:20:34.268-0500 done dumping mydb.notes (24 documents) 2016-02-21T23:20:34.268-0500 done dumping mydb.meteor_accounts_loginServiceConfiguration (0 documents) 21 Feb 23:20:34 - [info] mongodump executed successfully 21 Feb 23:20:34 - [info] Starting compression of mydb into mydb_2016_2_21_1456114834218.tar.gz 21 Feb 23:20:34 - [info] successfully compress directory 21 Feb 23:20:34 - [info] Attemping to upload mydb_2016_2_21_1456114834218.tar.gz to the mydb-mongodb-backups s3 bucket 21 Feb 23:20:34 - [info] Successfully uploaded to s3 21 Feb 23:20:34 - [info] Successfully backed up mydb 21 Feb 23:20:34 - [info] Removing /tmp/mongodb_s3_backup/mydb 21 Feb 23:20:34 - [info] Removing /tmp/mongodb_s3_backup/mydb_2016_2_21_1456114834218.tar.gz root@mydb-mongodb:~/mongodb-s3-backup# ls

laran avatar Feb 22 '16 04:02 laran

That's strange. Can you try manually dumping the database and see if there are errors? Something is getting passed to stderror

theycallmeswift avatar Feb 23 '16 19:02 theycallmeswift

I have no trouble dumping with mongodump. I get the same message, for instance 2016-02-21T23:20:34.264-0500 done dumping mydb.users (3 documents). But it prints to stdout instead of stderr.

I'll see if I can get some more info for you tonight.

laran avatar Feb 23 '16 21:02 laran

Can you also send me your node, mongo, and packaged module versions?

theycallmeswift avatar Feb 23 '16 21:02 theycallmeswift

Same problem here. Mongodump works perfect. node-mongodb-s3-backup also works good it sends data to s3 but I see some errors on dumping stage.

node: v0.10.25 mongo: 3.0.11 mongodb_s3_backup: v0.0.8

mete89 avatar Apr 26 '16 13:04 mete89

@mete89 I encounter the same problem and it is a bug from mongodump. So basically every log goes to stderr instead of stdout for mongodump.

More details at https://jira.mongodb.org/browse/TOOLS-1565 https://jira.mongodb.org/browse/TOOLS-1484

simonsiu2017 avatar Feb 07 '17 08:02 simonsiu2017