{"id":5189,"date":"2026-11-08T03:04:45","date_gmt":"2026-11-07T21:34:45","guid":{"rendered":"https:\/\/cpanelfree.com\/blog\/configuring-automated-s3-compatible-offsite-backups-in-cpanel-and-directadmin\/"},"modified":"2026-11-08T03:04:45","modified_gmt":"2026-11-07T21:34:45","slug":"configuring-automated-s3-compatible-offsite-backups-in-cpanel-and-directadmin","status":"publish","type":"post","link":"https:\/\/cpanelfree.com\/blog\/configuring-automated-s3-compatible-offsite-backups-in-cpanel-and-directadmin\/","title":{"rendered":"Configuring Automated S3-Compatible Offsite Backups in cPanel and DirectAdmin"},"content":{"rendered":"<p style=\"font-size:17px;line-height:1.7;color:#333;margin-bottom:20px\">Deploying mission-critical web applications across multi-tenant hosting servers demands an impenetrable disaster recovery architecture that decouples live production data from local storage volumes. Relying on co-located backup partitions creates a catastrophic single point of failure where physical disk corruption, hypervisor node loss, or automated ransomware attacks can permanently obliterate both active containers and their snapshot archives. At <a href=\"https:\/\/cpanelfree.com\" style=\"color:#001b41;font-weight:600;text-decoration:underline\">CpanelFree<\/a>, our systems engineering team standardizes on S3-compatible object storage pipelines to stream encrypted, offsite database and file archives with zero local NVMe disk bloat.<\/p>\n<p><!-- more --><\/p>\n<h2 style=\"color:#001b41;font-size:26px;font-weight:700;margin-top:36px;margin-bottom:16px\">Architecture Blueprint: Automated S3-Compatible Offsite Backups for cPanel &amp; DirectAdmin<\/h2>\n<div style=\"background:#f9f9f9;border-left:4px solid #001b41;padding:18px 22px;margin:20px 0;font-size:15px;line-height:1.6;color:#333\">\n<p style=\"margin:0\"><strong style=\"color:#001b41\">Direct Answer:<\/strong> Configuring automated S3-compatible offsite backups in cPanel (WHM) and DirectAdmin involves attaching an external S3 API endpoint (such as Wasabi, Backblaze B2, or on-premises MinIO) using access and secret keys, enforcing client-side AES-256 encryption, and scheduling parallel incremental syncs. By decoupling backup creation from local disk persistence and piping archives directly to object storage via tuned TCP windows and non-blocking I\/O queues, administrators achieve immutable offsite disaster recovery with near-zero local storage overhead.<\/p>\n<\/div>\n<p style=\"font-size:16px;line-height:1.7;color:#444;margin-bottom:18px\">Modern Linux web hosting infrastructures powered by cPanel &amp; WHM or DirectAdmin manage gigabytes or terabytes of user home directories, complex MySQL\/MariaDB database schemas, and Dovecot mail directories. Traditional backup topologies rely on local secondary hard drives or legacy unencrypted FTP\/NFS mounts. These legacy architectures suffer from critical flaws: legacy FTP lacks built-in checksum verification, NFS mounts stall kernel execution threads if network blips occur, and local backups consume 50% or more of expensive, high-speed Enterprise NVMe storage.<\/p>\n<p style=\"font-size:16px;line-height:1.7;color:#444;margin-bottom:18px\">Transitioning to an S3-compatible object storage layer completely transforms backup operations. By targeting the universally standardized Amazon S3 REST API, systems architects can leverage hyperscale cloud providers, cost-effective alternatives like Wasabi and Backblaze B2, or self-hosted high-throughput MinIO clusters. Furthermore, S3-compatible APIs provide native multi-part upload parallelization, chunk-level MD5\/SHA-256 validation, and hardware-enforced Object Lock (WORM &mdash; Write Once, Read Many) policies that prevent backup alteration or deletion even if a host root account suffers total compromise.<\/p>\n<h2 style=\"color:#001b41;font-size:26px;font-weight:700;margin-top:36px;margin-bottom:16px\">Comparative Matrix: Default Local\/FTP vs. Tuned S3-Compatible Offsite Pipeline<\/h2>\n<p style=\"font-size:16px;line-height:1.7;color:#444;margin-bottom:18px\">Before deploying remote storage endpoints, system administrators must understand the performance, security, and recovery trade-offs between default backup implementations and an enterprise-tuned S3 streaming architecture. The table below outlines key operational benchmarks:<\/p>\n<figure class=\"wp-block-table is-style-regular\">\n<table style=\"width:100%;border-collapse:collapse;margin:24px 0;font-size:15px;text-align:left\">\n<thead style=\"background:#001b41;color:#ffffff\">\n<tr>\n<th style=\"padding:12px 16px;border-bottom:2px solid #001b41\">Feature \/ Metric<\/th>\n<th style=\"padding:12px 16px;border-bottom:2px solid #001b41\">Standard \/ Default (Local \/ FTP)<\/th>\n<th style=\"padding:12px 16px;border-bottom:2px solid #001b41\">Tuned \/ Production (S3-Compatible)<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"padding:12px 16px;border-bottom:1px solid #e7e7e7;font-weight:600\">Local NVMe Footprint<\/td>\n<td style=\"padding:12px 16px;border-bottom:1px solid #e7e7e7\">100% clone overhead (Doubles disk usage)<\/td>\n<td style=\"padding:12px 16px;border-bottom:1px solid #e7e7e7;color:#20B038;font-weight:600\">Ephemeral FIFO staging (&lt;5% transient disk usage)<\/td>\n<\/tr>\n<tr>\n<td style=\"padding:12px 16px;border-bottom:1px solid #e7e7e7;font-weight:600\">Transfer Protocol &amp; Overhead<\/td>\n<td style=\"padding:12px 16px;border-bottom:1px solid #e7e7e7\">FTP \/ rsync (Single-stream, unverified transport)<\/td>\n<td style=\"padding:12px 16px;border-bottom:1px solid #e7e7e7;color:#20B038;font-weight:600\">HTTPS Multi-part S3 API (Parallel multi-threaded TCP)<\/td>\n<\/tr>\n<tr>\n<td style=\"padding:12px 16px;border-bottom:1px solid #e7e7e7;font-weight:600\">Ransomware &amp; Deletion Defense<\/td>\n<td style=\"padding:12px 16px;border-bottom:1px solid #e7e7e7\">Zero protection (Root compromise deletes snapshots)<\/td>\n<td style=\"padding:12px 16px;border-bottom:1px solid #e7e7e7;color:#20B038;font-weight:600\">S3 Object Lock (Immutable WORM retention policy)<\/td>\n<\/tr>\n<tr>\n<td style=\"padding:12px 16px;border-bottom:1px solid #e7e7e7;font-weight:600\">I\/O Starvation Impact<\/td>\n<td style=\"padding:12px 16px;border-bottom:1px solid #e7e7e7\">Severe disk thrashing (Blocks client HTTP &amp; SQL queries)<\/td>\n<td style=\"padding:12px 16px;border-bottom:1px solid #e7e7e7;color:#20B038;font-weight:600\">cgroups v2 + ionice Idle class (Zero user impact)<\/td>\n<\/tr>\n<tr>\n<td style=\"padding:12px 16px;border-bottom:1px solid #e7e7e7;font-weight:600\">Data Integrity Validation<\/td>\n<td style=\"padding:12px 16px;border-bottom:1px solid #e7e7e7\">Manual post-extraction check required<\/td>\n<td style=\"padding:12px 16px;border-bottom:1px solid #e7e7e7;color:#20B038;font-weight:600\">Per-chunk MD5 \/ SHA-256 ETag cryptographic hashing<\/td>\n<\/tr>\n<tr>\n<td style=\"padding:12px 16px;border-bottom:1px solid #e7e7e7;font-weight:600\">Disaster Recovery MTTR<\/td>\n<td style=\"padding:12px 16px;border-bottom:1px solid #e7e7e7\">Slow sequential download across shared pipe<\/td>\n<td style=\"padding:12px 16px;border-bottom:1px solid #e7e7e7;color:#20B038;font-weight:600\">High-speed multi-threaded bucket fetch (&gt;800 Mbps)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<blockquote class=\"wp-block-quote\" style=\"background:#f9f9f9;border-left:4px solid #001b41;padding:16px 20px;margin:24px 0\">\n<p><strong style=\"color:#001b41\">Architecture Note:<\/strong> In high-density web hosting nodes, storage costs scale exponentially when keeping 30 days of retention locally. S3-compatible providers charge an average of $0.005 to $0.006 per GB\/month without ingress or egress penalties (e.g. Wasabi or Backblaze B2 via Cloudflare Bandwidth Alliance), cutting storage expenses by over 80% compared to provisioning additional high-performance enterprise NVMe drives.<\/p>\n<\/blockquote>\n<h2 style=\"color:#001b41;font-size:26px;font-weight:700;margin-top:36px;margin-bottom:16px\">Configuring S3-Compatible Storage Destinations in cPanel &amp; WHM<\/h2>\n<p style=\"font-size:16px;line-height:1.7;color:#444;margin-bottom:18px\">cPanel provides a native backup engine (<code>cpbackup<\/code> \/ <code>pkgacct<\/code>) accessible through WHM or the command line via the WHM API 1. While cPanel natively labels the destination as &ldquo;Amazon S3&rdquo;, its underlying transport agent (<code>cpmove<\/code> and Perl transport engines) fully supports any RFC-compliant S3 endpoint URL, including Wasabi, MinIO, Ceph RGW, and DigitalOcean Spaces.<\/p>\n<h3 style=\"color:#001b41;font-size:20px;font-weight:600;margin-top:24px;margin-bottom:12px\">Step 1: WHM Backup Configuration via GUI<\/h3>\n<p style=\"font-size:16px;line-height:1.7;color:#444;margin-bottom:14px\">Log in to WHM as <code>root<\/code> and navigate to <strong>Backup &rarr; Backup Configuration<\/strong>:<\/p>\n<ol style=\"font-size:15px;line-height:1.7;color:#444;margin-left:20px;margin-bottom:20px\">\n<li><strong>Backup Status:<\/strong> Toggle to <em>Enabled<\/em>.<\/li>\n<li><strong>Backup Type:<\/strong> Select <em>Compressed<\/em> (produces standard <code>tar.gz<\/code> archives) or <em>Uncompressed<\/em> if using deduplicating object gateways.<\/li>\n<li><strong>Scheduling &amp; Retention:<\/strong> Configure daily backups with a strict 7-day retention cycle.<\/li>\n<li><strong>Files &amp; Databases:<\/strong> Select <em>Backup User Accounts<\/em>, <em>System Files<\/em>, and set MySQL backup type to <em>Per Account and Entire MySQL Directory<\/em>.<\/li>\n<\/ol>\n<h3 style=\"color:#001b41;font-size:20px;font-weight:600;margin-top:24px;margin-bottom:12px\">Step 2: Automating S3 Destination Registration via WHM API 1<\/h3>\n<p style=\"font-size:16px;line-height:1.7;color:#444;margin-bottom:14px\">Rather than clicking through the graphical interface on dozens of fleet servers, execute the following hardened bash script to register your S3-compatible destination programmatically via <code>whmapi1<\/code>. This configuration automatically disables local retention, ensuring the local archive is unlinked immediately after a successful S3 PUT confirmation:<\/p>\n<pre class=\"wp-block-code\" style=\"background:#f3f3f3;color:#333;padding:16px;border-left:4px solid #001b41;font-family:monospace;font-size:13px\"><code>#!\/usr\/bin\/env bash\n# ==============================================================================\n# Script: configure_cpanel_s3_destination.sh\n# Purpose: Programmatically attach S3-compatible backup destination in WHM\/cPanel\n# Target: cPanel &amp; WHM v118+ on AlmaLinux \/ Rocky Linux \/ Ubuntu\n# ==============================================================================\nset -euo pipefail\n\nDEST_NAME=\"Wasabi-Offsite-S3\"\nS3_ENDPOINT=\"s3.us-central-1.wasabisys.com\"\nS3_BUCKET=\"enterprise-cpanel-backups-cluster01\"\nS3_ACCESS_KEY=\"AKIAEXAMPLEACCESSKEYID\"\nS3_SECRET_KEY=\"wJalrXUtnFEMI\/K7MDENG\/bPxRfiCYEXAMPLEKEY\"\nS3_REGION=\"us-central-1\"\nREMOTE_PATH=\"\/server-backups\/cpanel01\"\nTIMEOUT=1800\n\necho \"[+] Registering S3-compatible backup destination in cPanel\/WHM...\"\n\nwhmapi1 backup_destination_add     name=\"${DEST_NAME}\"     type=\"AmazonS3\"     disabled=0     upload_system_backup=1     opt_bucket=\"${S3_BUCKET}\"     opt_access_key=\"${S3_ACCESS_KEY}\"     opt_secret_key=\"${S3_SECRET_KEY}\"     opt_endpoint=\"${S3_ENDPOINT}\"     opt_region=\"${S3_REGION}\"     opt_rpath=\"${REMOTE_PATH}\"     opt_timeout=\"${TIMEOUT}\"     opt_signature_version=\"4\"\n\necho \"[+] Destination successfully provisioned.\"\n\n# Hardening \/etc\/cpbackup.conf to prevent local disk exhaustion\necho \"[+] Enforcing non-retained local staging in \/etc\/cpbackup.conf...\"\nsed -i 's\/^FORCE_PRUNE=.*\/FORCE_PRUNE=1\/' \/etc\/cpbackup.conf || echo \"FORCE_PRUNE=1\" &gt;&gt; \/etc\/cpbackup.conf\nsed -i 's\/^LOCALMKDIR=.*\/LOCALMKDIR=1\/' \/etc\/cpbackup.conf || echo \"LOCALMKDIR=1\" &gt;&gt; \/etc\/cpbackup.conf\nsed -i 's\/^LINKDEST=.*\/LINKDEST=0\/' \/etc\/cpbackup.conf || echo \"LINKDEST=0\" &gt;&gt; \/etc\/cpbackup.conf\n\necho \"[+] Validating backup transport connectivity...\"\n\/usr\/local\/cpanel\/bin\/backup --validate-destinations<\/code><\/pre>\n<blockquote class=\"wp-block-quote\" style=\"background:#f9f9f9;border-left:4px solid #001b41;padding:16px 20px;margin:24px 0\">\n<p><strong style=\"color:#001b41\">Production Warning:<\/strong> Always verify that <code>FORCE_PRUNE=1<\/code> is enabled in <code>\/etc\/cpbackup.conf<\/code>. If your server is running tight on disk space and a backup fails to upload to S3 due to network interruption, <code>FORCE_PRUNE=1<\/code> instructs cPanel to clear the temporary local tarball from <code>\/backup<\/code> rather than filling the root filesystem and locking up MySQL.<\/p>\n<\/blockquote>\n<h2 style=\"color:#001b41;font-size:26px;font-weight:700;margin-top:36px;margin-bottom:16px\">Configuring S3-Compatible Offsite Backups in DirectAdmin<\/h2>\n<p style=\"font-size:16px;line-height:1.7;color:#444;margin-bottom:18px\">DirectAdmin utilizes its <strong>Admin Backup\/Transfer<\/strong> module to orchestrate multi-tenant dumps. While modern DirectAdmin builds (Evolution skin) include built-in S3 upload capability, enterprise production hosts require high-speed parallel uploads using the official MinIO Client (<code>mc<\/code>) or AWS CLI v2 hooked directly into DirectAdmin&#8217;s post-backup triggers. This approach supports automatic compression tuning, multi-part chunking, and instant deletion of local staging files.<\/p>\n<h3 style=\"color:#001b41;font-size:20px;font-weight:600;margin-top:24px;margin-bottom:12px\">Step 1: MinIO Client (<code>mc<\/code>) Setup on DirectAdmin Host<\/h3>\n<p style=\"font-size:16px;line-height:1.7;color:#444;margin-bottom:14px\">Install the standalone <code>mc<\/code> binary, which provides high-concurrency S3 streaming capabilities with built-in retry logic:<\/p>\n<pre class=\"wp-block-code\" style=\"background:#f3f3f3;color:#333;padding:16px;border-left:4px solid #001b41;font-family:monospace;font-size:13px\"><code># Download and install MinIO client\ncurl -fsSL https:\/\/dl.min.io\/client\/mc\/release\/linux-amd64\/mc -o \/usr\/local\/bin\/mc\nchmod +x \/usr\/local\/bin\/mc\n\n# Configure the offsite S3 alias (Wasabi \/ Backblaze \/ MinIO)\nmc alias set offsite-s3 https:\/\/s3.us-central-1.wasabisys.com     AKIAEXAMPLEACCESSKEYID     wJalrXUtnFEMI\/K7MDENG\/bPxRfiCYEXAMPLEKEY     --api S3v4\n\n# Verify connection and list buckets\nmc ls offsite-s3\/<\/code><\/pre>\n<h3 style=\"color:#001b41;font-size:20px;font-weight:600;margin-top:24px;margin-bottom:12px\">Step 2: DirectAdmin Post-Backup Automated S3 Pipeline<\/h3>\n<p style=\"font-size:16px;line-height:1.7;color:#444;margin-bottom:14px\">DirectAdmin executes <code>\/usr\/local\/directadmin\/scripts\/custom\/all_backups_post.sh<\/code> immediately after creating local backup tarballs. We implement an asynchronous, parallelized upload pipeline that uploads all newly created archives directly to S3 and purges the local source:<\/p>\n<pre class=\"wp-block-code\" style=\"background:#f3f3f3;color:#333;padding:16px;border-left:4px solid #001b41;font-family:monospace;font-size:13px\"><code>#!\/bin\/bash\n# ==============================================================================\n# Script: \/usr\/local\/directadmin\/scripts\/custom\/all_backups_post.sh\n# Purpose: Stream completed DirectAdmin backups to S3-compatible offsite storage\n# ==============================================================================\nset -euo pipefail\n\nLOG_FILE=\"\/var\/log\/directadmin\/s3_backup_upload.log\"\nS3_ALIAS=\"offsite-s3\"\nS3_BUCKET=\"enterprise-directadmin-backups\"\nSERVER_HOSTNAME=$(hostname -f)\nBACKUP_DIR=\"${local_backup_dir:-\/home\/admin\/admin_backups}\"\nDATE_PATH=$(date +\"%Y-%m-%d\")\n\necho \"[$(date '+%Y-%m-%d %H:%M:%S')] Starting S3 offsite synchronization for ${SERVER_HOSTNAME}\" &gt;&gt; \"${LOG_FILE}\"\n\nif [ ! -d \"${BACKUP_DIR}\" ]; then\n    echo \"[$(date '+%Y-%m-%d %H:%M:%S')] ERROR: Directory ${BACKUP_DIR} not found!\" &gt;&gt; \"${LOG_FILE}\"\n    exit 1\nfi\n\n# Find and stream all backup files (.tar.zst or .tar.gz)\nfind \"${BACKUP_DIR}\" -type f \\( -name \"user.*.tar.gz\" -o -name \"user.*.tar.zst\" \\) | while read -r backup_file; do\n    file_name=$(basename \"${backup_file}\")\n    file_size_mb=$(du -m \"${backup_file}\" | cut -f1)\n    \n    echo \"[$(date '+%Y-%m-%d %H:%M:%S')] Uploading ${file_name} (${file_size_mb} MB) to S3...\" &gt;&gt; \"${LOG_FILE}\"\n    \n    # Upload via MinIO client with 4 parallel parts\n    if \/usr\/local\/bin\/mc cp --parallel 4 \"${backup_file}\" \"${S3_ALIAS}\/${S3_BUCKET}\/${SERVER_HOSTNAME}\/${DATE_PATH}\/${file_name}\" &gt;&gt; \"${LOG_FILE}\" 2&gt;&amp;1; then\n        echo \"[$(date '+%Y-%m-%d %H:%M:%S')] SUCCESS: Uploaded ${file_name}. Unlinking local file...\" &gt;&gt; \"${LOG_FILE}\"\n        rm -f \"${backup_file}\"\n    else\n        echo \"[$(date '+%Y-%m-%d %H:%M:%S')] FAILED: S3 upload failed for ${file_name}. Preserving local copy.\" &gt;&gt; \"${LOG_FILE}\"\n    fi\ndone\n\n# Prune S3 backups older than 30 days\necho \"[$(date '+%Y-%m-%d %H:%M:%S')] Pruning remote S3 backups older than 30 days...\" &gt;&gt; \"${LOG_FILE}\"\n\/usr\/local\/bin\/mc rm --recursive --force --older-than 30d \"${S3_ALIAS}\/${S3_BUCKET}\/${SERVER_HOSTNAME}\/\" &gt;&gt; \"${LOG_FILE}\" 2&gt;&amp;1 || true\n\necho \"[$(date '+%Y-%m-%d %H:%M:%S')] S3 Backup Pipeline Completed.\" &gt;&gt; \"${LOG_FILE}\"\nexit 0<\/code><\/pre>\n<p style=\"font-size:16px;line-height:1.7;color:#444;margin-bottom:18px\">Ensure permissions are correctly applied so DirectAdmin can execute the post-backup hook: <code>chmod 700 \/usr\/local\/directadmin\/scripts\/custom\/all_backups_post.sh &amp;&amp; chown diradmin:diradmin \/usr\/local\/directadmin\/scripts\/custom\/all_backups_post.sh<\/code>.<\/p>\n<h2 style=\"color:#001b41;font-size:26px;font-weight:700;margin-top:36px;margin-bottom:16px\">Production Tuning: Kernel TCP &amp; Systemd Resource Isolation<\/h2>\n<p style=\"font-size:16px;line-height:1.7;color:#444;margin-bottom:18px\">Streaming hundreds of gigabytes across WAN connections to S3 endpoints can saturate host network interfaces, exhaust memory buffers, and degrade website response times. To guarantee predictable production performance, Linux administrators must tune the TCP stack for high-bandwidth\/high-latency WAN transfers and isolate backup processes using systemd cgroups v2 slices.<\/p>\n<h3 style=\"color:#001b41;font-size:20px;font-weight:600;margin-top:24px;margin-bottom:12px\">1. Kernel Network Tuning for S3 Throughput (<code>\/etc\/sysctl.d\/99-s3-backup-throughput.conf<\/code>)<\/h3>\n<p style=\"font-size:16px;line-height:1.7;color:#444;margin-bottom:14px\">Apply these optimized kernel sysctl parameters to increase the TCP window size and activate BBR (Bottleneck Bandwidth and RTT) congestion control:<\/p>\n<pre class=\"wp-block-code\" style=\"background:#f3f3f3;color:#333;padding:16px;border-left:4px solid #001b41;font-family:monospace;font-size:13px\"><code># \/etc\/sysctl.d\/99-s3-backup-throughput.conf\n# Kernel Network Stack Optimization for S3 Object Storage Backups\n\n# Enable BBR congestion control and fq queuing discipline\nnet.core.default_qdisc = fq\nnet.ipv4.tcp_congestion_control = bbr\n\n# Increase maximum network buffer sizes (32MB) for WAN BDP (Bandwidth-Delay Product)\nnet.core.rmem_max = 33554432\nnet.core.wmem_max = 33554432\nnet.core.rmem_default = 1048576\nnet.core.wmem_default = 1048576\n\n# Dynamic TCP socket buffer memory allocation [min, default, max]\nnet.ipv4.tcp_rmem = 4096 87380 33554432\nnet.ipv4.tcp_wmem = 4096 65536 33554432\n\n# Expand network packet backlog queues to avoid socket drops during peak upload bursts\nnet.core.netdev_max_backlog = 10000\nnet.ipv4.tcp_max_syn_backlog = 8192\n\n# Enable TCP window scaling and fast open\nnet.ipv4.tcp_window_scaling = 1\nnet.ipv4.tcp_slow_start_after_idle = 0<\/code><\/pre>\n<p style=\"font-size:16px;line-height:1.7;color:#444;margin-bottom:18px\">Apply the changes immediately without rebooting by executing: <code>sysctl --system<\/code>.<\/p>\n<h3 style=\"color:#001b41;font-size:20px;font-weight:600;margin-top:24px;margin-bottom:12px\">2. Systemd Slice Resource Isolation (cgroups v2)<\/h3>\n<p style=\"font-size:16px;line-height:1.7;color:#444;margin-bottom:14px\">To prevent backup compression daemons (such as <code>pigz<\/code>, <code>zstd<\/code>, or <code>tar<\/code>) from hijacking 100% of the CPU cores and starving production web servers (Nginx\/LiteSpeed) or database engines (MySQL\/MariaDB), define a dedicated systemd resource slice:<\/p>\n<pre class=\"wp-block-code\" style=\"background:#f3f3f3;color:#333;padding:16px;border-left:4px solid #001b41;font-family:monospace;font-size:13px\"><code># \/etc\/systemd\/system\/backup.slice\n[Unit]\nDescription=Resource-Throttled Backup Slice for cPanel and DirectAdmin\nDefaultDependencies=no\nBefore=slices.target\n\n[Slice]\n# Restrict backup processes to a maximum of 25% of total CPU cycles\nCPUWeight=20\nCPUQuota=200%\n\n# Memory ceiling: Prevent backup buffering from causing host OOM-kills\nMemoryHigh=4G\nMemoryMax=6G\nMemorySwapMax=0\n\n# Enforce lowest disk I\/O weight under cgroups v2\nIOWeight=10<\/code><\/pre>\n<p style=\"font-size:16px;line-height:1.7;color:#444;margin-bottom:18px\">Reload systemd to register the slice: <code>systemctl daemon-reload<\/code>. When executing scheduled backup cron jobs, prefix them with <code>systemd-run --slice=backup.slice --nice=19 --ionice=class=3<\/code> to strictly cage them within these hardware boundaries.<\/p>\n<h2 style=\"color:#001b41;font-size:26px;font-weight:700;margin-top:36px;margin-bottom:16px\">Air-Gap Security, Client-Side Encryption &amp; Object Lock<\/h2>\n<p style=\"font-size:16px;line-height:1.7;color:#444;margin-bottom:18px\">Creating offsite backups is only half the battle. If an attacker gains unauthorized root access to your web hosting node, they will actively inspect <code>\/etc\/cpbackup.conf<\/code> or DirectAdmin credential files to obtain your S3 access credentials. If those credentials possess full administrative rights over the bucket, the attacker will issue a <code>DeleteBucket<\/code> or <code>DeleteObjects<\/code> command, wiping out your disaster recovery snapshots prior to deploying ransomware.<\/p>\n<blockquote class=\"wp-block-quote\" style=\"background:#f9f9f9;border-left:4px solid #001b41;padding:16px 20px;margin:24px 0\">\n<p><strong style=\"color:#001b41\">Security Rule:<\/strong> Never deploy S3 root account credentials onto web hosting nodes. Always create dedicated IAM users with strict, minimal IAM policies. Enforce S3 Object Lock (Compliance Mode) with a 30-day immutability retention period on the target bucket so neither the compromised server nor rogue API calls can delete or overwrite stored archives.<\/p>\n<\/blockquote>\n<p style=\"font-size:16px;line-height:1.7;color:#444;margin-bottom:18px\">The following JSON represents a production-grade AWS\/Wasabi IAM Policy that grants the web hosting node permission only to write new backup archives and list existing objects, while strictly forbidding deletion or modification of existing snapshots:<\/p>\n<pre class=\"wp-block-code\" style=\"background:#f3f3f3;color:#333;padding:16px;border-left:4px solid #001b41;font-family:monospace;font-size:13px\"><code>{\n  \"Version\": \"2012-10-17\",\n  \"Statement\": [\n    {\n      \"Sid\": \"AllowBackupBucketListing\",\n      \"Effect\": \"Allow\",\n      \"Action\": [\n        \"s3:ListBucket\",\n        \"s3:GetBucketLocation\"\n      ],\n      \"Resource\": \"arn:aws:s3:::enterprise-cpanel-backups-cluster01\"\n    },\n    {\n      \"Sid\": \"AllowPutBackupObjectsAndMultipart\",\n      \"Effect\": \"Allow\",\n      \"Action\": [\n        \"s3:PutObject\",\n        \"s3:PutObjectAcl\",\n        \"s3:GetObject\",\n        \"s3:AbortMultipartUpload\",\n        \"s3:ListMultipartUploadParts\"\n      ],\n      \"Resource\": \"arn:aws:s3:::enterprise-cpanel-backups-cluster01\/*\"\n    },\n    {\n      \"Sid\": \"ExplicitDenyDestructiveActions\",\n      \"Effect\": \"Deny\",\n      \"Action\": [\n        \"s3:DeleteObject\",\n        \"s3:DeleteObjectVersion\",\n        \"s3:DeleteBucket\",\n        \"s3:PutLifecycleConfiguration\"\n      ],\n      \"Resource\": [\n        \"arn:aws:s3:::enterprise-cpanel-backups-cluster01\",\n        \"arn:aws:s3:::enterprise-cpanel-backups-cluster01\/*\"\n      ]\n    }\n  ]\n}<\/code><\/pre>\n<p style=\"font-size:16px;line-height:1.7;color:#444;margin-bottom:18px\">For enterprise organizations handling financial, healthcare, or sensitive customer data, mission-critical infrastructure demands predictable compute allocation, hardware-level isolation, and transparent pricing. Hosting mission-critical applications on <a href=\"https:\/\/merahost.org\" style=\"color:#001b41;font-weight:600;text-decoration:underline\" target=\"_blank\" rel=\"noopener\">MeraHost Enterprise Cloud<\/a> guarantees zero noisy neighbors, dedicated Enterprise NVMe storage arrays, pre-configured LiteSpeed Web Server, and Same Renewal Price, Always (starting at \u20b999\/mo), completely immune to surprise renewal price hikes.<\/p>\n<h2 style=\"color:#001b41;font-size:26px;font-weight:700;margin-top:36px;margin-bottom:16px\">Frequently Asked Questions (FAQ)<\/h2>\n<details class=\"wp-block-group\" style=\"background:#f9f9f9;border:1px solid #e7e7e7;border-radius:4px;padding:14px;margin-bottom:12px\">\n<summary style=\"cursor:pointer;font-weight:600;color:#001b41\">Can I restore a single cPanel or DirectAdmin account directly from S3 without downloading the entire server archive?<\/summary>\n<p style=\"margin-top:10px;color:#444\">Yes. Both cPanel (WHM Backup Restoration interface) and DirectAdmin (Admin Backup\/Transfer Restore) support pulling individual tenant tarballs (<code>cpmove-{user}.tar.gz<\/code> or <code>user.{name}.tar.gz<\/code>) from remote S3 destinations. If using CLI, you can stream down a single user archive using <code>mc cp offsite-s3\/bucket\/node\/date\/cpmove-user.tar.gz \/home\/<\/code> and execute <code>\/scripts\/restorepkg user<\/code> in cPanel or <code>\/usr\/local\/directadmin\/scripts\/restore_user.sh<\/code> in DirectAdmin.<\/p>\n<\/details>\n<details class=\"wp-block-group\" style=\"background:#f9f9f9;border:1px solid #e7e7e7;border-radius:4px;padding:14px;margin-bottom:12px\">\n<summary style=\"cursor:pointer;font-weight:600;color:#001b41\">Why do S3 multipart uploads fail or time out on accounts larger than 50 GB?<\/summary>\n<p style=\"margin-top:10px;color:#444\">Large account timeouts usually stem from two configuration bottlenecks: restrictive HTTP\/socket timeouts in the control panel transport driver, or undersized TCP buffer queues. To resolve this in WHM, increase <code>opt_timeout<\/code> to 3600 seconds in <code>whmapi1 backup_destination_add<\/code>. For DirectAdmin or standalone scripts, configure the S3 client chunk size (part size) to 64 MB or 128 MB (e.g., <code>aws configure set default.s3.multipart_chunksize 64MB<\/code>) to minimize total API requests and optimize WAN throughput.<\/p>\n<\/details>\n<details class=\"wp-block-group\" style=\"background:#f9f9f9;border:1px solid #e7e7e7;border-radius:4px;padding:14px;margin-bottom:12px\">\n<summary style=\"cursor:pointer;font-weight:600;color:#001b41\">Does Wasabi or Backblaze B2 support cPanel and DirectAdmin incremental backups?<\/summary>\n<p style=\"margin-top:10px;color:#444\">cPanel&#8217;s native incremental backup engine requires a POSIX-compliant filesystem that supports hard links (rsync style), which standard object storage REST APIs do not natively support. To use incremental backups with S3 endpoints, you must either deploy an on-premises S3\/NFS gateway or utilize modern block-level snapshotting tools such as JetBackup with its native S3 storage plugin, which performs block-level deduplication directly to Wasabi and Backblaze B2.<\/p>\n<\/details>\n<details class=\"wp-block-group\" style=\"background:#f9f9f9;border:1px solid #e7e7e7;border-radius:4px;padding:14px;margin-bottom:12px\">\n<summary style=\"cursor:pointer;font-weight:600;color:#001b41\">How does S3 Object Lock prevent malicious ransomware from wiping out my offsite backups?<\/summary>\n<p style=\"margin-top:10px;color:#444\">S3 Object Lock enforces WORM (Write Once, Read Many) retention at the storage layer. When a bucket is configured with Object Lock in Compliance Mode, stored objects cannot be deleted, overwritten, or renamed by any user &mdash; including the cloud root account &mdash; until the designated retention period (e.g. 30 days) expires. Even if an attacker gains root access to your cPanel or DirectAdmin server and steals your S3 API credentials, their deletion requests will be rejected with an HTTP 403 Access Denied error.<\/p>\n<\/details>\n<div class=\"wp-block-group has-background\" style=\"background:#f9f9f9;border:1px solid #e7e7e7;border-radius:8px;padding:32px;margin:40px 0;text-align:center\">\n<h3 style=\"color:#001b41;margin-top:0;font-size:24px;font-weight:700\">Deploy Enterprise-Grade Production Infrastructure<\/h3>\n<p style=\"color:#444;font-size:16px;line-height:1.6;max-width:680px;margin:12px auto 24px auto\">Need guaranteed performance with zero price hikes? Host mission-critical workloads on <strong style=\"color:#001b41\">MeraHost<\/strong> with pure Enterprise NVMe, LiteSpeed Web Server, and Same Renewal Price, Always (starting at \u20b999\/mo).<\/p>\n<div class=\"wp-block-buttons\" style=\"display:flex;gap:16px;justify-content:center;flex-wrap:wrap\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link\" href=\"https:\/\/merahost.org\" style=\"background:#001b41;color:#ffffff;font-weight:700;padding:12px 28px;border-radius:4px;text-decoration:none;display:inline-block;font-size:15px\" target=\"_blank\" rel=\"noopener\">Explore MeraHost NVMe Cloud &rarr;<\/a><\/div>\n<div class=\"wp-block-button is-style-outline\"><a class=\"wp-block-button__link\" href=\"https:\/\/cpanelfree.com\" style=\"background:transparent;color:#001b41;font-weight:600;padding:12px 24px;border:2px solid #001b41;border-radius:4px;text-decoration:none;display:inline-block;font-size:15px\">Deploy Free Staging on CpanelFree<\/a><\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Configure automated S3-compatible offsite backups in cPanel and DirectAdmin. Stream encrypted dumps to Wasabi, MinIO, or Backblaze with zero local disk bloat.<\/p>\n","protected":false},"author":1,"featured_media":5188,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[57,177,87,73,101],"class_list":["post-5189","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-web-hosting","tag-almalinux","tag-databases-performance","tag-devops","tag-free-web-hosting","tag-sysadmin"],"_links":{"self":[{"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/posts\/5189","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/comments?post=5189"}],"version-history":[{"count":0,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/posts\/5189\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/media\/5188"}],"wp:attachment":[{"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/media?parent=5189"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/categories?post=5189"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/tags?post=5189"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}