Happening now! Shopify Community AMA: PayPal Express Migration to Shopify Payments | Ask your questions to be answered by our team.

Backup procedure has different count of customer records.

Backup procedure has different count of customer records.

ZacharyDesilets
Tourist
4 0 1

Backing up customer base.

 

So I have a graphql query that requests customer's from API in chunks of 50 using cursor, then inserts them into my database.

I'm at a loss to understand why my count has a 2000 record difference.

My store has 118k customers, but my procedure only pulls in 116k.

 

Any insight on getting a closer count?

 

 

 

 

$query = <<<'GRAPHQL'
query ($pageSize: Int!, $cursor: String) {
  customers(first: $pageSize, after: $cursor) {
    pageInfo {
      hasNextPage
      endCursor
    }
    edges {
      node {
        id
        firstName
        lastName
        email
        tags
        note
        createdAt
        updatedAt
        phone
        metafields(first: 10) {
          edges {
            node {
              key
              value
            }
          }
        }
        addresses(first: 5) {
          address1
          address2
          city
          province
          country
          zip
          countryCodeV2
          provinceCode
        }
      }
    }
  }
}
GRAPHQL;

 

 

 

 

Reply 1 (1)

Mike_Potter
Shopify Partner
83 0 15

Backups are hard! That's a lot of customer data. We've spent a lot of time at Rewind making sure that we get all the data from the store to ensure that everything is backed up. It's not easy when you're dealing with large stores like yours.

Co-Founder, Rewind (Backups for Shopify). Apps: Rewind, Shopify Staging (setup test and staging Shopify stores).