Go back to the main page

Backup & Restore Guide

SAP Specialist Cockpit — Full Disaster Recovery Procedures
Overview

Backup Architecture

The SAP Specialist Cockpit backup creates a compressed .tar.gz archive of the entire portal and all supporting infrastructure, then uploads it to a Google Cloud Storage bucket. Each backup is timestamped so you can restore to any specific point in time.

PropertyValue
Source Serversapidesecc8.fivetran-internal-sales.com
GCS Bucketgs://sap-hana-backint/sapidesecc8_webserver/
Archive Formatsap_specialist_cockpit_YYYYMMDD_HHMMSS.tar.gz
Typical Size~4 MB (compressed)
Backup & Restore Console

Create Backup

Select the scope and create a new timestamped backup archive in Google Cloud Storage.

Existing Backups

GCS Bucket: gs://sap-hana-backint/sapidesecc8_webserver/

Loading backups...
Automated Restore

One-click restore from the latest backup. Select a backup from the Console first, then use these quick actions. Each button downloads the archive, restores only the selected component, and cleans up automatically. Master password is required for all restore operations.

Portal (HTML Pages)

Landing page, documentation, icons, downloads, vault files. No restart needed — files served from disk.

SSL Certificates

Certificate chain and private key. Services will be restarted automatically after restore.

Server Scripts

Production and dev web server Python scripts, env file. Services will be restarted.

Systemd Units

Production, dev, and watchdog service/timer units. Daemon will be reloaded.

Helper Scripts

Backup, brtools, license query, and SQ1 management scripts in /usr/local/bin/.

Crontab

Root crontab entries for scheduled backups and monitoring. Replaces current crontab entirely.

Full Restore (All Components)

Restores everything: portal, server, SSL, systemd, scripts, and crontab. Services will be restarted and daemon reloaded. Use only for full disaster recovery.

What's Backed Up

Archive Contents

Each backup archive contains the complete state of the cockpit and portal:

DirectoryContentsSource Path
sap_skills/Landing page, all documentation HTML pages, SVG icons, JAR downloads, vault files, README/usr/sap/sap_skills/
server/Production & dev web server Python scripts, SSL certificate & key, environment file (Polaris OAuth)/usr/sap/gcs_explorer_server*.py, gcs_explorer_cert.pem, gcs_explorer_key.pem, gcs_explorer.env
systemd/Service units for production, dev, and watchdog (service + timer)/etc/systemd/system/gcs-explorer*.service|timer
scripts/Helper scripts: backup_webserver.sh, brbackup/brarchive scripts, license query scripts (S/4HANA, ECC, SQ1), SQ1 DB query & backup trigger/usr/local/bin/*.sh, /usr/local/bin/*.py
crontab.txtRoot crontab snapshotcrontab -l

File Inventory

CategoryFiles
Portal Pagesindex.html, 17 documentation/cockpit HTML pages
Iconssap_icon.svg, hana_icon.svg, gcp_icon.svg, slab_icon.svg
Downloadssapjco3.jar, libsapjco3.dylib, gson.jar
Servergcs_explorer_server.py (production), gcs_explorer_server_dev.py (dev)
SSLgcs_explorer_cert.pem (chained), gcs_explorer_key.pem
Systemd4 unit files (production, dev, watchdog service, watchdog timer)
Scripts8 helper scripts (backup, brtools, license queries, SQ1 management)
Vault.vault.enc, .vault.salt, .vault_key, vault_manager.py
Backup Procedure

Full Backup

Run these commands on sapidesecc8 to create a timestamped backup and upload it to GCS.

SSH into the server:
ssh root@sapidesecc8
Create full backup, upload to GCS, and clean up:
TIMESTAMP=$(date +%Y%m%d_%H%M%S) && \ mkdir -p /tmp/cockpit_backup_${TIMESTAMP} && \ cp -r /usr/sap/sap_skills /tmp/cockpit_backup_${TIMESTAMP}/sap_skills && \ mkdir -p /tmp/cockpit_backup_${TIMESTAMP}/server && \ cp /usr/sap/gcs_explorer_server.py /usr/sap/gcs_explorer_server_dev.py \ /usr/sap/gcs_explorer_cert.pem /usr/sap/gcs_explorer_key.pem \ /usr/sap/gcs_explorer.env /tmp/cockpit_backup_${TIMESTAMP}/server/ && \ mkdir -p /tmp/cockpit_backup_${TIMESTAMP}/systemd && \ cp /etc/systemd/system/gcs-explorer*.service \ /etc/systemd/system/gcs-explorer*.timer \ /tmp/cockpit_backup_${TIMESTAMP}/systemd/ && \ mkdir -p /tmp/cockpit_backup_${TIMESTAMP}/scripts && \ cp /usr/local/bin/backup_webserver.sh /usr/local/bin/brbackup_aba.sh \ /usr/local/bin/brarchive_aba.sh /usr/local/bin/s4h_license_query.py \ /usr/local/bin/sq1_db_query.py /usr/local/bin/sq1_trigger_backup.py \ /usr/local/bin/sq1_license_query.py /usr/local/bin/ecc8_license_query.py \ /tmp/cockpit_backup_${TIMESTAMP}/scripts/ && \ crontab -l > /tmp/cockpit_backup_${TIMESTAMP}/crontab.txt 2>/dev/null && \ cd /tmp && tar czf sap_specialist_cockpit_${TIMESTAMP}.tar.gz cockpit_backup_${TIMESTAMP}/ && \ gsutil cp /tmp/sap_specialist_cockpit_${TIMESTAMP}.tar.gz \ gs://sap-hana-backint/sapidesecc8_webserver/ && \ rm -rf /tmp/cockpit_backup_${TIMESTAMP} /tmp/sap_specialist_cockpit_${TIMESTAMP}.tar.gz && \ echo "Backup complete: sap_specialist_cockpit_${TIMESTAMP}.tar.gz"

List Existing Backups

List all backups in the bucket:
gsutil ls -l gs://sap-hana-backint/sapidesecc8_webserver/
Check total backup size:
gsutil du -sh gs://sap-hana-backint/sapidesecc8_webserver/

Delete Old Backups

Delete a specific backup:
gsutil rm gs://sap-hana-backint/sapidesecc8_webserver/sap_specialist_cockpit_YYYYMMDD_HHMMSS.tar.gz
Delete all backups from a specific month (use with caution):
gsutil ls gs://sap-hana-backint/sapidesecc8_webserver/ | grep "202601" | xargs gsutil rm
Restore Procedure

Full Restore from GCS

Follow these steps to restore the complete cockpit from a backup archive.

Step 1 — Download and Extract

List available backups:
gsutil ls -l gs://sap-hana-backint/sapidesecc8_webserver/
Download and extract the chosen backup:
cd /tmp && \ gsutil cp gs://sap-hana-backint/sapidesecc8_webserver/sap_specialist_cockpit_YYYYMMDD_HHMMSS.tar.gz . && \ tar xzf sap_specialist_cockpit_YYYYMMDD_HHMMSS.tar.gz && \ cd cockpit_backup_YYYYMMDD_HHMMSS

Step 2 — Restore Portal Files

Restores landing page, documentation pages, downloads, icons, and vault.

rm -rf /usr/sap/sap_skills && \ cp -r sap_skills /usr/sap/sap_skills && \ chmod 600 /usr/sap/sap_skills/.vault.enc /usr/sap/sap_skills/.vault.salt /usr/sap/sap_skills/.vault_key

Step 3 — Restore Server Files

Restore web server scripts:
cp server/gcs_explorer_server.py /usr/sap/gcs_explorer_server.py && \ cp server/gcs_explorer_server_dev.py /usr/sap/gcs_explorer_server_dev.py
Restore SSL certificate and key:
cp server/gcs_explorer_cert.pem /usr/sap/gcs_explorer_cert.pem && \ cp server/gcs_explorer_key.pem /usr/sap/gcs_explorer_key.pem && \ chmod 600 /usr/sap/gcs_explorer_key.pem
Restore environment file (Polaris OAuth):
cp server/gcs_explorer.env /usr/sap/gcs_explorer.env && \ chmod 600 /usr/sap/gcs_explorer.env

Step 4 — Restore Systemd Services

Copy service units, reload, and enable:
cp systemd/gcs-explorer.service /etc/systemd/system/ && \ cp systemd/gcs-explorer-dev.service /etc/systemd/system/ && \ cp systemd/gcs-explorer-watchdog.service /etc/systemd/system/ && \ cp systemd/gcs-explorer-watchdog.timer /etc/systemd/system/ && \ systemctl daemon-reload && \ systemctl enable gcs-explorer gcs-explorer-dev gcs-explorer-watchdog.timer

Step 5 — Restore Helper Scripts

cp scripts/* /usr/local/bin/ && \ chmod +x /usr/local/bin/backup_webserver.sh /usr/local/bin/brbackup_aba.sh \ /usr/local/bin/brarchive_aba.sh /usr/local/bin/s4h_license_query.py \ /usr/local/bin/sq1_db_query.py /usr/local/bin/sq1_trigger_backup.py \ /usr/local/bin/sq1_license_query.py /usr/local/bin/ecc8_license_query.py

Step 6 — Restore Crontab

Review the backed-up crontab first:
cat crontab.txt
Install it (replaces the current crontab entirely):
crontab crontab.txt

Step 7 — Restart Services and Clean Up

Restart all services:
systemctl restart gcs-explorer && \ systemctl restart gcs-explorer-dev && \ systemctl restart gcs-explorer-watchdog.timer
Clean up temporary files:
rm -rf /tmp/cockpit_backup_YYYYMMDD_HHMMSS /tmp/sap_specialist_cockpit_YYYYMMDD_HHMMSS.tar.gz
Full Restore Warning: A full restore replaces all portal files, server scripts, SSL certificates, systemd units, and helper scripts. Any changes made after the backup was taken will be lost. If you only need to restore specific components, use the partial restore procedures below.

Partial Restore — Portal Only

If the web server is fine but the HTML pages are corrupted or missing.

Download and extract the backup:
cd /tmp && \ gsutil cp gs://sap-hana-backint/sapidesecc8_webserver/sap_specialist_cockpit_YYYYMMDD_HHMMSS.tar.gz . && \ tar xzf sap_specialist_cockpit_YYYYMMDD_HHMMSS.tar.gz
Restore only the portal files:
cp -r cockpit_backup_YYYYMMDD_HHMMSS/sap_skills/* /usr/sap/sap_skills/
Clean up:
rm -rf /tmp/cockpit_backup_YYYYMMDD_HHMMSS /tmp/sap_specialist_cockpit_YYYYMMDD_HHMMSS.tar.gz
No restart needed: Portal HTML files are served directly from disk. Changes take effect immediately without restarting any service.

Partial Restore — Server Only

If the web server script is corrupted but portal files are intact.

Download and extract:
cd /tmp && \ gsutil cp gs://sap-hana-backint/sapidesecc8_webserver/sap_specialist_cockpit_YYYYMMDD_HHMMSS.tar.gz . && \ tar xzf sap_specialist_cockpit_YYYYMMDD_HHMMSS.tar.gz
Restore server script and restart:
cp cockpit_backup_YYYYMMDD_HHMMSS/server/gcs_explorer_server.py /usr/sap/ && \ systemctl restart gcs-explorer
Clean up:
rm -rf /tmp/cockpit_backup_YYYYMMDD_HHMMSS /tmp/sap_specialist_cockpit_YYYYMMDD_HHMMSS.tar.gz

Partial Restore — SSL Certificate Only

If the SSL certificate has been accidentally deleted or overwritten.

Download and extract:
cd /tmp && \ gsutil cp gs://sap-hana-backint/sapidesecc8_webserver/sap_specialist_cockpit_YYYYMMDD_HHMMSS.tar.gz . && \ tar xzf sap_specialist_cockpit_YYYYMMDD_HHMMSS.tar.gz
Restore certificate, key, and set permissions:
cp cockpit_backup_YYYYMMDD_HHMMSS/server/gcs_explorer_cert.pem /usr/sap/ && \ cp cockpit_backup_YYYYMMDD_HHMMSS/server/gcs_explorer_key.pem /usr/sap/ && \ chmod 600 /usr/sap/gcs_explorer_key.pem
Restart both servers:
systemctl restart gcs-explorer gcs-explorer-dev
Clean up:
rm -rf /tmp/cockpit_backup_YYYYMMDD_HHMMSS /tmp/sap_specialist_cockpit_YYYYMMDD_HHMMSS.tar.gz
Verify After Restore

Post-Restore Verification

After a full or partial restore, run these checks.

Check all services are running:
systemctl status gcs-explorer --no-pager && \ systemctl status gcs-explorer-dev --no-pager && \ systemctl status gcs-explorer-watchdog.timer --no-pager
Test HTTPS health endpoint:
curl -sk https://localhost/datalake_reader/api/health
Test portal landing page (expect 200):
curl -sk -o /dev/null -w "%{http_code}" https://localhost/sap_skills/
Test a documentation page (expect 200):
curl -sk -o /dev/null -w "%{http_code}" https://localhost/sap_skills/docs/SAP_ECC6_EHP8.html
Verify SSL certificate dates:
openssl x509 -in /usr/sap/gcs_explorer_cert.pem -noout -dates
Verify crontab:
crontab -l
Verify helper scripts exist:
ls -la /usr/local/bin/{backup_webserver,brbackup_aba,brarchive_aba}.sh \ /usr/local/bin/{s4h_license_query,ecc8_license_query,sq1_db_query,sq1_trigger_backup,sq1_license_query}.py
Quick Reference

Backup Commands

ActionCommand
Create full backupssh root@sapidesecc8 then run the backup script above
List backupsgsutil ls -l gs://sap-hana-backint/sapidesecc8_webserver/
Check backup sizegsutil du -sh gs://sap-hana-backint/sapidesecc8_webserver/
Download a backupgsutil cp gs://sap-hana-backint/sapidesecc8_webserver/<file> /tmp/
Delete a backupgsutil rm gs://sap-hana-backint/sapidesecc8_webserver/<file>

Restore Commands

ActionCommand
Download backupgsutil cp gs://sap-hana-backint/sapidesecc8_webserver/<file> /tmp/
Extract archivecd /tmp && tar xzf <file>
Restore portalcp -r cockpit_backup_*/sap_skills/* /usr/sap/sap_skills/
Restore servercp cockpit_backup_*/server/gcs_explorer_server.py /usr/sap/
Restore SSLcp cockpit_backup_*/server/gcs_explorer_*.pem /usr/sap/
Restore systemdcp cockpit_backup_*/systemd/* /etc/systemd/system/
Restore scriptscp cockpit_backup_*/scripts/* /usr/local/bin/
Restore crontabcrontab cockpit_backup_*/crontab.txt
Restart servicessystemctl daemon-reload && systemctl restart gcs-explorer gcs-explorer-dev