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

Unable to resume backup #218

Closed
jareware opened this issue Apr 15, 2018 · 3 comments
Closed

Unable to resume backup #218

jareware opened this issue Apr 15, 2018 · 3 comments
Assignees
Labels
Milestone

Comments

@jareware
Copy link

# couchbackup --version
2.2.0
# node -v
v8.2.1

First backup:

================================================================================
Performing backup on https://****:****@my-db.example.com/ca9d8d9c-d2e0-47b9-99e4-1d2d0f2ba344 using configuration:
{
  "bufferSize": 1000,
  "log": "ca9d8d9c-d2e0-47b9-99e4-1d2d0f2ba344.log",
  "mode": "full",
  "parallelism": 1
}
================================================================================
  couchbackup:backup Fetching all database changes... +0ms
  couchbackup:backup Total batches received: 1 +527ms
  couchbackup:backup Total batches received: 2 +88ms
  couchbackup:backup Total batches received: 3 +90ms
  couchbackup:backup Written batch ID: 0 Total document revisions written: 1000 Time: 2.346 +2s
  couchbackup:backup Written batch ID: 1 Total document revisions written: 2000 Time: 3.846 +1s
  couchbackup:backup Written batch ID: 2 Total document revisions written: 2984 Time: 5.295 +1s
  couchbackup:backup Finished - Total document revisions written: 2984 +11ms

Check to see the remote doc count:

# curl -s 'https://****:****@my-db.example.com/ca9d8d9c-d2e0-47b9-99e4-1d2d0f2ba344' | node -p 'JSON.parse(fs.readFileSync(0))' | grep doc_count
  doc_count: 2986,

Wait a while, run again:

# curl -s 'https://****:****@my-db.example.com/ca9d8d9c-d2e0-47b9-99e4-1d2d0f2ba344' | node -p 'JSON.parse(fs.readFileSync(0))' | grep doc_count
  doc_count: 2991,

OK, the remote DB has definitely changed; back up again:

================================================================================
Performing backup on https://****:****@my-db.example.com/ca9d8d9c-d2e0-47b9-99e4-1d2d0f2ba344 using configuration:
{
  "bufferSize": 1000,
  "log": "ca9d8d9c-d2e0-47b9-99e4-1d2d0f2ba344.log",
  "mode": "full",
  "parallelism": 1,
  "resume": true
}
================================================================================
  couchbackup:backup Fetching all database changes... +0ms
  couchbackup:backup Finished - Total document revisions written: 0 +339ms

Nothing got written, and the backup files (txt & log) haven't changed.

Is this a bug, or am I just misunderstanding how the --resume option works?

@ricellis
Copy link
Member

I'm afraid you're misunderstanding how the --resume option works.

The --resume option works for a backup that has finished spooling changes, but has not yet completed downloading all the necessary batches of documents.

I can see from your output above that your first backup has:

couchbackup:backup Finished - Total document revisions written: 2984 +11ms

So the resume in your second backup command has no effect because the backup has already completed.

What you are looking for is incremental backup, which is not available at this time. It is tracked in #11 (which I see you found and commented on). Seems like our documentation could use some improvement in this area.

@ricellis ricellis added the doc label Apr 16, 2018
@ricellis ricellis added this to Backlog in couchbackup Triage Apr 16, 2018
@ricellis ricellis moved this from Backlog to New in couchbackup Triage Apr 16, 2018
@jareware
Copy link
Author

Ah, good to know! And good that I checked before leaving the script running, thinking I'm always backed up. :>

Do you want a small PR for the docs change?

@smithsz smithsz self-assigned this Apr 17, 2018
@smithsz
Copy link
Contributor

smithsz commented Apr 17, 2018

Thanks @jareware. I'll update the docs for this.

couchbackup Triage automation moved this from New to Done Apr 17, 2018
@ricellis ricellis added this to the 2.next milestone May 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Development

No branches or pull requests

3 participants