Skip to content

AxonOps — AI-Native Control Plane for Open Source Data Platforms

nodetool disablebackup

Disables incremental backup on the node.


Terminal window
nodetool [connection_options] disablebackup

See connection options for connection options.

nodetool disablebackup disables incremental backup mode on the node. Once disabled, Cassandra stops creating hard links to newly flushed SSTables. Existing backup files in the backups directory are not removed—they must be cleaned up manually.

Incremental backup creates hard links to new SSTables when they are created (during memtable flush, compaction, and other SSTable-producing operations), providing continuous backup capability. Disabling this feature stops the automatic link creation process.

Non-Persistent Setting

This setting is applied at runtime only and does not persist across node restarts. After a restart, incremental backup reverts to the incremental_backups setting in cassandra.yaml (default: false).

To make the change permanent, update cassandra.yaml:

incremental_backups: false

When incremental backup is disabled:

  1. No new hard links are created for flushed SSTables
  2. Existing backup files remain in place (not deleted)
  3. Disk space used by existing backups is retained
  4. The change takes effect immediately
  5. The setting reverts to the cassandra.yaml configuration on restart

Terminal window
nodetool disablebackup
Terminal window
nodetool disablebackup
nodetool statusbackup
# Expected output: not running

When backup files consume too much space:

Terminal window
# Check current backup sizes
du -sh /var/lib/cassandra/data/*/*/backups/
# Total: 150GB
# Stop new backups
nodetool disablebackup
# Copy existing backups to external storage
rsync -av /var/lib/cassandra/data/*/*/backups/ /backup/server/
# Clean up local backups
find /var/lib/cassandra/data -path "*/backups/*" -type f -delete
# Verify cleanup
du -sh /var/lib/cassandra/data/*/*/backups/

During maintenance operations:

Terminal window
# Disable during heavy operations
nodetool disablebackup
# Perform maintenance (repair, compaction, etc.)
nodetool repair -pr my_keyspace
# Re-enable after maintenance
nodetool enablebackup
# Verify
nodetool statusbackup

When migrating to a different backup solution:

Terminal window
# Disable incremental backup
nodetool disablebackup
# Clean up existing backup files
find /var/lib/cassandra/data -path "*/backups/*" -delete
# (Configure new backup solution)

During I/O-intensive operations:

Terminal window
# Disable to reduce I/O overhead
nodetool disablebackup
# Perform I/O-intensive operation
nodetool upgradesstables
# Re-enable
nodetool enablebackup

Remove unnecessary backup overhead before decommission:

Terminal window
# Disable backups (node is leaving)
nodetool disablebackup
# Clean up backup files
find /var/lib/cassandra/data -path "*/backups/*" -delete
# Proceed with decommission
nodetool decommission

AspectBefore DisableAfter Disable
New backup linksCreated on flushNot created
Existing backupsPresentStill present
Disk overheadGrows with flushesNo new growth
Recovery capabilityFull incrementalDepends on existing files
  • Existing backup files remain (must clean manually)
  • Snapshots are unaffected
  • Compaction behavior unchanged
  • Normal data operations continue

Disabling backup does not remove existing files:

Terminal window
# Per-keyspace backup sizes
du -sh /var/lib/cassandra/data/*/*/backups/
# Total backup size
find /var/lib/cassandra/data -path "*/backups/*" -type f -exec du -ch {} + | tail -1
Terminal window
# Back up to external storage first
rsync -av /var/lib/cassandra/data/*/*/backups/ /backup/final_incremental/
Terminal window
# Remove all backup files (careful!)
find /var/lib/cassandra/data -path "*/backups/*" -type f -delete
# Or remove per-keyspace
rm -rf /var/lib/cassandra/data/my_keyspace/*/backups/*
# Verify removal
find /var/lib/cassandra/data -path "*/backups/*" -type f | wc -l
# Should be 0

Workflow: Complete Backup Disable and Cleanup

Section titled “Workflow: Complete Backup Disable and Cleanup”
disable_and_cleanup_backup.sh
#!/bin/bash
echo "=== Disable Incremental Backup ==="
echo ""
# 1. Check current state
echo "1. Current status: $(nodetool statusbackup)"
# 2. Check current backup size
echo "2. Current backup size:"
find /var/lib/cassandra/data -path "*/backups/*" -type f -exec du -ch {} + 2>/dev/null | tail -1
# 3. Disable backup
echo "3. Disabling incremental backup..."
nodetool disablebackup
# 4. Verify disabled
echo "4. New status: $(nodetool statusbackup)"
# 5. Optional: Clean up existing backups
read -p "5. Remove existing backup files? (y/n): " cleanup
if [ "$cleanup" = "y" ]; then
echo " Removing backup files..."
find /var/lib/cassandra/data -path "*/backups/*" -type f -delete
echo " Done."
fi
echo ""
echo "=== Complete ==="

When backup is enabled, SSTables have hard links in the backups directory:

SSTable: /data/keyspace/table/nb-1-big-Data.db
Backup: /data/keyspace/table/backups/nb-1-big-Data.db
(both point to same disk blocks)

After compaction removes the original SSTable:

  • The backup file becomes the only reference
  • Disk space is now exclusively used by backup

To reclaim space after disabling:

Terminal window
# Check space used by backups
du -sh /var/lib/cassandra/data/*/*/backups/
# Remove to reclaim
find /var/lib/cassandra/data -path "*/backups/*" -delete
# Verify space recovered
df -h /var/lib/cassandra

Terminal window
nodetool disablebackup
# Does not persist across restart

Edit cassandra.yaml:

incremental_backups: false

Then either restart or use nodetool:

Terminal window
# For immediate effect without restart
nodetool disablebackup
MethodEffectPersistence
nodetool disablebackupImmediateUntil restart
cassandra.yaml: falseAfter restartPermanent
BothImmediate + permanentBest practice

Terminal window
nodetool statusbackup
# Expected: not running

Even after disable, verify no new files:

Terminal window
# Before operation
ls /var/lib/cassandra/data/my_keyspace/my_table-*/backups/ | wc -l
# Count: 50
# Force flush
nodetool flush my_keyspace
# After flush (should be same if disabled)
ls /var/lib/cassandra/data/my_keyspace/my_table-*/backups/ | wc -l
# Count: 50 (unchanged)

Terminal window
# Retry disable
nodetool disablebackup
# Check JMX connectivity
nodetool info
# Verify
nodetool statusbackup

If new backup files appear after disable:

Terminal window
# Verify disabled
nodetool statusbackup
# Should be: not running
# Check cassandra.yaml (might override on restart)
grep incremental_backups /etc/cassandra/cassandra.yaml
# If yaml says true, update it
vim /etc/cassandra/cassandra.yaml
# Set: incremental_backups: false

If deletion fails:

Terminal window
# Check file ownership
ls -la /var/lib/cassandra/data/my_keyspace/*/backups/
# Check if files are open
lsof +D /var/lib/cassandra/data/my_keyspace/my_table/backups/
# May need to run as cassandra user
sudo -u cassandra rm -rf /var/lib/cassandra/data/*/*/backups/*

Disable backup across all nodes:

disable_backup_cluster.sh
#!/bin/bash
# Get list of node IPs from local nodetool status
nodes=$(nodetool status | grep "^UN" | awk '{print $2}')
echo "Disabling incremental backup cluster-wide"
echo "==========================================="
for node in $nodes; do
echo -n "$node: "
ssh "$node" "nodetool disablebackup 2>/dev/null && echo 'disabled' || echo 'failed'"
done
echo ""
echo "Verification:"
for node in $nodes; do
echo -n "$node: "
ssh "$node" "nodetool statusbackup"
done

Disable Backup Guidelines

  1. Document the reason - Note why backup was disabled
  2. Copy before cleanup - Always backup before deleting files
  3. Update cassandra.yaml - Make change persistent if intended
  4. Verify status - Confirm disabled with statusbackup
  5. Clean up disk - Remove old backup files to reclaim space
  6. Cluster consistency - Apply to all nodes if disabling cluster-wide
  7. Re-enable after maintenance - Don't forget to restore backup if temporary

CommandRelationship
enablebackupEnable incremental backup
statusbackupCheck backup status
snapshotFull point-in-time backup
listsnapshotsList existing snapshots
clearsnapshotRemove snapshots