ScyllaDB University LIVE, FREE Virtual Training Event | March 21
Register for Free
ScyllaDB Documentation Logo Documentation
  • Deployments
    • Cloud
    • Server
  • Tools
    • ScyllaDB Manager
    • ScyllaDB Monitoring Stack
    • ScyllaDB Operator
  • Drivers
    • CQL Drivers
    • DynamoDB Drivers
    • Supported Driver Versions
  • Resources
    • ScyllaDB University
    • Community Forum
    • Tutorials
Install
Ask AI
ScyllaDB Docs ScyllaDB Manual ScyllaDB for Administrators Admin Tools Nodetool Nodetool scrub

Caution

You're viewing documentation for an unstable version of ScyllaDB Manual. Switch to the latest stable version.

Nodetool scrub¶

NAME¶

scrub - Help identify and fix corrupted SSTable. Not all kinds of corruption can be skipped or fixed by scrub. Remove faulty data, eliminate tombstoned rows that have surpassed the table’s gc_grace period, and fix out-of-order rows and partitions.

SYNOPSIS¶

           nodetool [(-h <host> | --host <host>)] [(-p <port> | --port <port>)]
                [(-pp | --print-port)] [(-pw <password> | --password <password>)]
                [(-pwf <passwordFilePath> | --password-file <passwordFilePath>)]
                [(-ns | --no-snapshot)]
                [(-s | --skip-corrupted)]
                [(-m <scrub_mode> | --mode <scrub_mode>)]
                [(-q <quarantine_mode> | --quarantine-mode <quarantine_mode>)]
                [--drop-unfixable-sstables]
                [--] <keyspace> [<table...>]

Supported scrub modes: ABORT, SKIP, SEGREGATE, VALIDATE
Supported quarantine modes: INCLUDE, EXCLUDE, ONLY

OPTIONS¶

Parameter

Description

-ns / –no-snapshot

Do not take a snapshot of all scrubbed tables before starting scrub (default false).

-s / –skip-corrupted

Skip corrupted rows or partitions even when scrubbing counter tables. (Deprecated, use ‘–mode’ instead. default false)

-m <scrub_mode> / –mode <scrub_mode>

How to handle corrupt data (one of: ABORT|SKIP|SEGREGATE|VALIDATE, default ABORT; overrides ‘–skip-corrupted’)

-q <quarantine_mode> / –quarantine-mode <quarantine_mode>

How to handle quarantined SSTables (one of: INCLUDE|EXCLUDE|ONLY, default INCLUDE)

–drop-unfixable-sstables

Drop unfixable SSTables instead of aborting the entire scrub (only valid with –mode=SEGREGATE)

-- This option can be used to separate command-line options from the list of argument, (useful when arguments might be mistaken for command-line options.

<keyspace> The keyspace to scrub.

[<table...>] Optional. One or more tables to scrub. By default, all tables in the keyspace are scrubbed.

SCRUB MODES¶

Scrub mode

Description

ABORT

Abort scrubbing when the first validation error occurs. (default).

SKIP

Skip corrupted rows or partitions. (equivalent to the legacy –skip-corrupted option). Warning: This mode can cause data loss by removing invalid data portions or entire SSTables if severely corrupted (e.g., digest mismatch detected).

SEGREGATE

Sort out-of-order rows or partitions by segregating them into additional SSTables.

VALIDATE

Read-only mode: report any corruptions found while scrubbing but do not fix them. By default, corrupt SSTables are moved into a “quarantine” subdirectory so they will not be subject to compaction.

QUARANTINE MODES¶

Quarantine mode

Description

INCLUDE

Process both regular and quarantined SSTables (default).

EXCLUDE

Process only regular (non-quarantined) SSTables.

ONLY

Process only quarantined SSTables.

Examples¶

Scrub all tables in a keyspace (mykeyspace)

> nodetool scrub mykeyspace

Scrub a specific table (mytable) in a keyspace (mykeyspace)

> nodetool scrub mykeyspace mytable

Scrub a specific table (mytable) in a keyspace (mykeyspace) in SEGREGATE mode

> nodetool scrub -m SEGREGATE mykeyspace mytable

Scrub a specific table (mytable) in a keyspace (mykeyspace) in VALIDATE mode without taking a preliminary snapshot

> nodetool scrub -m VALIDATE --no-snapshot mykeyspace mytable

Scrub a specific table (mytable) in a keyspace (mykeyspace) in SEGREGATE mode dropping unfixable SSTables

> nodetool scrub -m SEGREGATE --drop-unfixable-sstables mykeyspace mytable

Procedures for Removing Bad SSTables¶

Method 1: Quarantine and Drop¶

Step 1: Run scrub in VALIDATE mode to identify and quarantine corrupted SSTables:

> nodetool scrub -m VALIDATE keyspace_name table_name

This will move corrupted SSTables to a quarantine directory. The quarantine directory is a sub-directory of the table’s respective data directory.

Step 2 (Optional): Preserve quarantined SSTables for analysis:

Before permanently dropping the corrupted SSTables, consider copying some or all of them aside, somewhere outside of the ScyllaDB data directory, so they are preserved for later investigation by the ScyllaDB R&D team, to determine the root cause of the corruption.

# Copy quarantined SSTables to a backup location for analysis
> cp -r /path/to/data/keyspace_name/table_dir/quarantine /path/to/backup/location/

Step 3: Drop the quarantined SSTables using dropquarantinedsstables:

> nodetool dropquarantinedsstables keyspace_name table_name

This permanently removes the quarantined SSTables from the specified table.

Method 2: Segregate with Drop Unfixable Flag¶

This approach attempts to fix what can be fixed and automatically drops SSTables that cannot be fixed.

Note

This method should be used for the subset of corruption issues where SEGREGATE mode can actually help: where corruption manifests at least partly in reordered partitions or rows.

Step 1: Run scrub in SEGREGATE mode with the --drop-unfixable-sstables flag:

> nodetool scrub -m SEGREGATE --drop-unfixable-sstables keyspace_name table_name

This will:

  • Attempt to segregate and fix out-of-order data where possible

  • Remove faulty data

  • Automatically drop SSTables that cannot be fixed

  • Create new properly ordered SSTables from the recoverable data

Copyright

© 2016, The Apache Software Foundation.

Apache®, Apache Cassandra®, Cassandra®, the Apache feather logo and the Apache Cassandra® Eye logo are either registered trademarks or trademarks of the Apache Software Foundation in the United States and/or other countries. No endorsement by The Apache Software Foundation is implied by the use of these marks.

Was this page helpful?

PREVIOUS
Nodetool ring
NEXT
Nodetool setcompactionthroughput
  • Create an issue
  • Edit this page

On this page

  • Nodetool scrub
    • NAME
    • SYNOPSIS
    • OPTIONS
    • SCRUB MODES
    • QUARANTINE MODES
    • Examples
    • Procedures for Removing Bad SSTables
      • Method 1: Quarantine and Drop
      • Method 2: Segregate with Drop Unfixable Flag
ScyllaDB Manual
  • master
    • master
    • 2025.4
    • 2025.3
    • 2025.2
    • 2025.1
  • Getting Started
    • Install ScyllaDB
      • Launch ScyllaDB on AWS
      • Launch ScyllaDB on GCP
      • Launch ScyllaDB on Azure
      • ScyllaDB Web Installer for Linux
      • Install ScyllaDB Linux Packages
      • Install scylla-jmx Package
      • Run ScyllaDB in Docker
      • Install ScyllaDB Without root Privileges
      • Air-gapped Server Installation
      • ScyllaDB Housekeeping and how to disable it
      • ScyllaDB Developer Mode
    • Configure ScyllaDB
    • ScyllaDB Configuration Reference
    • ScyllaDB Requirements
      • System Requirements
      • OS Support
      • Cloud Instance Recommendations
      • ScyllaDB in a Shared Environment
    • Migrate to ScyllaDB
      • Migration Process from Cassandra to ScyllaDB
      • ScyllaDB and Apache Cassandra Compatibility
      • Migration Tools Overview
    • Integration Solutions
      • Integrate ScyllaDB with Spark
      • Integrate ScyllaDB with KairosDB
      • Integrate ScyllaDB with Presto
      • Integrate ScyllaDB with Elasticsearch
      • Integrate ScyllaDB with Kubernetes
      • Integrate ScyllaDB with the JanusGraph Graph Data System
      • Integrate ScyllaDB with DataDog
      • Integrate ScyllaDB with Kafka
      • Integrate ScyllaDB with IOTA Chronicle
      • Integrate ScyllaDB with Spring
      • Shard-Aware Kafka Connector for ScyllaDB
      • Install ScyllaDB with Ansible
      • Integrate ScyllaDB with Databricks
      • Integrate ScyllaDB with Jaeger Server
      • Integrate ScyllaDB with MindsDB
  • ScyllaDB for Administrators
    • Administration Guide
    • Procedures
      • Cluster Management
      • Backup & Restore
      • Change Configuration
      • Maintenance
      • Best Practices
      • Benchmarking ScyllaDB
      • Migrate from Cassandra to ScyllaDB
      • Disable Housekeeping
    • Security
      • ScyllaDB Security Checklist
      • Enable Authentication
      • Enable and Disable Authentication Without Downtime
      • Creating a Custom Superuser
      • Generate a cqlshrc File
      • Reset Authenticator Password
      • Enable Authorization
      • Grant Authorization CQL Reference
      • Certificate-based Authentication
      • Role Based Access Control (RBAC)
      • ScyllaDB Auditing Guide
      • Encryption: Data in Transit Client to Node
      • Encryption: Data in Transit Node to Node
      • Generating a self-signed Certificate Chain Using openssl
      • Configure SaslauthdAuthenticator
      • Encryption at Rest
      • LDAP Authentication
      • LDAP Authorization (Role Management)
      • Software Bill Of Materials (SBOM)
    • Admin Tools
      • Nodetool Reference
      • CQLSh
      • Admin REST API
      • Tracing
      • ScyllaDB SStable
      • ScyllaDB Types
      • SSTableLoader
      • cassandra-stress
      • SSTabledump
      • SSTableMetadata
      • ScyllaDB Logs
      • Seastar Perftune
      • Virtual Tables
      • Reading mutation fragments
      • Maintenance socket
      • Maintenance mode
      • Task manager
    • ScyllaDB Monitoring Stack
    • ScyllaDB Operator
    • ScyllaDB Manager
    • Upgrade Procedures
      • About Upgrade
      • Upgrade Guides
    • System Configuration
      • System Configuration Guide
      • scylla.yaml
      • ScyllaDB Snitches
    • Benchmarking ScyllaDB
    • ScyllaDB Diagnostic Tools
  • ScyllaDB for Developers
    • Develop with ScyllaDB
    • Tutorials and Example Projects
    • Learn to Use ScyllaDB
    • ScyllaDB Alternator
    • ScyllaDB Drivers
  • CQL Reference
    • CQLSh: the CQL shell
    • Reserved CQL Keywords and Types (Appendices)
    • Compaction
    • Consistency Levels
    • Consistency Level Calculator
    • Data Definition
    • Data Manipulation
      • SELECT
      • INSERT
      • UPDATE
      • DELETE
      • BATCH
    • Data Types
    • Definitions
    • Global Secondary Indexes
    • Expiring Data with Time to Live (TTL)
    • Functions
    • Wasm support for user-defined functions
    • JSON Support
    • Materialized Views
    • DESCRIBE SCHEMA
    • Service Levels
    • ScyllaDB CQL Extensions
  • Alternator: DynamoDB API in Scylla
    • Getting Started With ScyllaDB Alternator
    • ScyllaDB Alternator for DynamoDB users
    • Alternator-specific APIs
  • Features
    • Lightweight Transactions
    • Global Secondary Indexes
    • Local Secondary Indexes
    • Materialized Views
    • Counters
    • Change Data Capture
      • CDC Overview
      • The CDC Log Table
      • Basic operations in CDC
      • CDC Streams
      • CDC Stream Changes
      • Querying CDC Streams
      • Advanced column types
      • Preimages and postimages
      • Data Consistency in CDC
    • Workload Attributes
    • Workload Prioritization
    • Backup and Restore
    • Incremental Repair
  • ScyllaDB Architecture
    • Data Distribution with Tablets
    • ScyllaDB Ring Architecture
    • ScyllaDB Fault Tolerance
    • Consistency Level Console Demo
    • ScyllaDB Anti-Entropy
      • ScyllaDB Hinted Handoff
      • ScyllaDB Read Repair
      • ScyllaDB Repair
    • SSTable
      • ScyllaDB SSTable - 2.x
      • ScyllaDB SSTable - 3.x
    • Compaction Strategies
    • Raft Consensus Algorithm in ScyllaDB
    • Zero-token Nodes
  • Troubleshooting ScyllaDB
    • Errors and Support
      • Report a ScyllaDB problem
      • Error Messages
      • Change Log Level
    • ScyllaDB Startup
      • Ownership Problems
      • ScyllaDB will not Start
      • ScyllaDB Python Script broken
    • Upgrade
      • Inaccessible configuration files after ScyllaDB upgrade
    • Cluster and Node
      • Handling Node Failures
      • Failure to Add, Remove, or Replace a Node
      • Failed Decommission Problem
      • Cluster Timeouts
      • Node Joined With No Data
      • NullPointerException
      • Failed Schema Sync
    • Data Modeling
      • ScyllaDB Large Partitions Table
      • ScyllaDB Large Rows and Cells Table
      • Large Partitions Hunting
      • Failure to Update the Schema
    • Data Storage and SSTables
      • Space Utilization Increasing
      • Disk Space is not Reclaimed
      • SSTable Corruption Problem
      • Pointless Compactions
      • Limiting Compaction
    • CQL
      • Time Range Query Fails
      • COPY FROM Fails
      • CQL Connection Table
    • ScyllaDB Monitor and Manager
      • Manager and Monitoring integration
      • Manager lists healthy nodes as down
    • Installation and Removal
      • Removing ScyllaDB on Ubuntu breaks system packages
  • Knowledge Base
    • Upgrading from experimental CDC
    • Compaction
    • Consistency in ScyllaDB
    • Counting all rows in a table is slow
    • CQL Query Does Not Display Entire Result Set
    • When CQLSh query returns partial results with followed by “More”
    • Run ScyllaDB and supporting services as a custom user:group
    • Customizing CPUSET
    • Decoding Stack Traces
    • Snapshots and Disk Utilization
    • DPDK mode
    • Debug your database with Flame Graphs
    • Efficient Tombstone Garbage Collection in ICS
    • How to Change gc_grace_seconds for a Table
    • Gossip in ScyllaDB
    • Increase Permission Cache to Avoid Non-paged Queries
    • How does ScyllaDB LWT Differ from Apache Cassandra ?
    • Map CPUs to ScyllaDB Shards
    • ScyllaDB Memory Usage
    • NTP Configuration for ScyllaDB
    • Updating the Mode in perftune.yaml After a ScyllaDB Upgrade
    • POSIX networking for ScyllaDB
    • ScyllaDB consistency quiz for administrators
    • Recreate RAID devices
    • How to Safely Increase the Replication Factor
    • ScyllaDB and Spark integration
    • Increase ScyllaDB resource limits over systemd
    • ScyllaDB Seed Nodes
    • How to Set up a Swap Space
    • ScyllaDB Snapshots
    • ScyllaDB payload sent duplicated static columns
    • Stopping a local repair
    • System Limits
    • How to flush old tombstones from a table
    • Time to Live (TTL) and Compaction
    • ScyllaDB Nodes are Unresponsive
    • Update a Primary Key
    • Using the perf utility with ScyllaDB
    • Configure ScyllaDB Networking with Multiple NIC/IP Combinations
  • Reference
    • AWS Images
    • Azure Images
    • GCP Images
    • Configuration Parameters
    • Glossary
    • Limits
    • API Reference
      • Authorization Cache
      • Cache Service
      • Collectd
      • Column Family
      • Commit Log
      • Compaction Manager
      • Endpoint Snitch Info
      • Error Injection
      • Failure Detector
      • Gossiper
      • Hinted Handoff
      • LSA
      • Messaging Service
      • Raft
      • Storage Proxy
      • Storage Service
      • Stream Manager
      • System
      • Task Manager Test
      • Task Manager
      • Tasks
    • Metrics
  • ScyllaDB FAQ
  • 2024.2 and earlier documentation
Docs Tutorials University Contact Us About Us
© 2025, ScyllaDB. All rights reserved. | Terms of Service | Privacy Policy | ScyllaDB, and ScyllaDB Cloud, are registered trademarks of ScyllaDB, Inc.
Last updated on 05 Dec 2025.
Powered by Sphinx 7.4.7 & ScyllaDB Theme 1.8.9
Ask AI