
Research
Supply Chain Attack on Axios Pulls Malicious Dependency from npm
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.
@profullstack/quantum-database-backups
Advanced tools
CLI tool for creating post-quantum encrypted Supabase database backups
A universal CLI tool for creating post-quantum encrypted database backups that are automatically emailed to recipients. Supports Supabase, MongoDB, MySQL, and PostgreSQL.
@profullstack/post-quantum-helper for quantum-resistant encryption| Database | CLI Tool | Backup Command | Restore Command |
|---|---|---|---|
| Supabase | pnpx supabase | db dump | db reset |
| MongoDB | mongodump | mongodump --archive | mongorestore --archive |
| MySQL | mysqldump | mysqldump | mysql |
| PostgreSQL | pg_dump | pg_dump --format=custom | pg_restore |
pnpm add -g supabase# Install globally from npm (when published)
pnpm add -g @profullstack/quantum-database-backups
# Or install from local directory
cd quantum-database-backups
pnpm install
pnpm link --global
# Now you can use 'qdb' from anywhere
qdb --help
# Clone the repository
git clone <repository-url>
cd quantum-database-backups
# Install dependencies
pnpm install
# Run locally with node
node src/cli.js --help
Run the interactive setup wizard to configure QDB:
qdb init
This will prompt you for:
Configuration is saved to ~/.config/quantum-database-backups/config.json with secure permissions (0600).
Alternatively, you can configure via environment variables:
export SMTP_USER="your-email@example.com"
export SMTP_PASS="your-app-password"
export SMTP_HOST="smtp.gmail.com" # Optional
export SMTP_PORT="587" # Optional
You need to generate your post-quantum encryption keys. Create a keys.json file:
{
"publicKey": "your-public-key-here",
"privateKey": "your-private-key-here"
}
⚠️ IMPORTANT: Keep your keys.json file secure and backed up separately. Without it, you cannot decrypt your backups!
For Gmail SMTP, use an App Password.
# Using saved configuration
qdb backup
# With explicit options
qdb backup \
--email recipient@example.com \
--keys ./keys.json \
--db-name mydb
qdb backup \
--provider mongodb \
--email admin@example.com \
--keys ./keys.json \
--db-name mydb \
--uri mongodb://localhost:27017
qdb backup \
--provider mysql \
--email admin@example.com \
--keys ./keys.json \
--db-name mydb \
--host localhost \
--port 3306 \
--user root \
--password mypassword
qdb backup \
--provider postgres \
--email admin@example.com \
--keys ./keys.json \
--db-name mydb \
--host localhost \
--port 5432 \
--user postgres \
--password mypassword
-e, --email <email> - Recipient email address-k, --keys <path> - Path to keys.json file-d, --db-name <name> - Database name for filename-p, --provider <name> - Database provider (supabase, mongodb, mysql, postgres)-w, --work-dir <path> - Working directory for backups (default: ./backups)--keep-files - Keep intermediate files (default: false)--no-email - Skip sending emailProvider-Specific Options:
--host <host> - Database host (MySQL, PostgreSQL)--port <port> - Database port (MySQL, PostgreSQL)--user <user> - Database user (MySQL, PostgreSQL)--password <password> - Database password (MySQL, PostgreSQL)--uri <uri> - Connection URI (MongoDB)qdb restore \
--input ./backups/backup.encrypted \
--keys ./keys.json \
--provider supabase
qdb restore \
--input ./backups/backup.encrypted \
--keys ./keys.json \
--provider mongodb \
--uri mongodb://localhost:27017 \
--database mydb \
--drop
qdb restore \
--input ./backups/backup.encrypted \
--keys ./keys.json \
--provider mysql \
--host localhost \
--port 3306 \
--user root \
--password mypassword \
--database mydb
qdb restore \
--input ./backups/backup.encrypted \
--keys ./keys.json \
--provider postgres \
--host localhost \
--port 5432 \
--user postgres \
--password mypassword \
--database mydb \
--clean
-i, --input <path> - Path to encrypted backup file (required)-k, --keys <path> - Path to keys.json file (required)-p, --provider <name> - Database provider (supabase, mongodb, mysql, postgres) (default: supabase)--host <host> - Database host (MySQL, PostgreSQL)--port <port> - Database port (MySQL, PostgreSQL)--user <user> - Database user (MySQL, PostgreSQL)--password <password> - Database password (MySQL, PostgreSQL)--database <name> - Database name--uri <uri> - Connection URI (MongoDB)--drop - Drop existing data before restore (MongoDB/PostgreSQL)--clean - Clean database before restore (PostgreSQL)qdb decrypt \
--input ./backups/supabase-backup-20241006-123456-mydb.zip.encrypted \
--output ./restored-backup.zip \
--keys ./keys.json
-i, --input <path> - Path to encrypted file (required)-o, --output <path> - Path for decrypted output file (required)-k, --keys <path> - Path to keys.json file (required)qdb info
This displays your current configuration and available commands.
QDB uses the following priority order for configuration:
~/.config/quantum-database-backups/config.json)This allows you to:
qdb initThe backup process follows these steps:
pnpx supabase db dump to create SQL backup--keep-files is used)Backup files follow this naming pattern:
supabase-backup-{YYYYMMDD-HHMMSS}-{dbname}.{extension}
Example: supabase-backup-20241006-143022-production.zip.encrypted
.gitignore# Run all tests
pnpm test
# Run with coverage
pnpm test -- --coverage
# Check code style
pnpm run lint
# Format code
pnpm run format
# Check formatting without changes
pnpm run format:check
quantum-database-backups/
├── src/
│ ├── cli.js # CLI entry point
│ ├── backup.js # Database backup logic
│ ├── encrypt.js # Post-quantum encryption
│ ├── email.js # Email functionality
│ └── utils.js # Helper functions
├── tests/
│ └── utils.test.js # Test files
├── .eslintrc.json # ESLint configuration
├── .prettierrc.json # Prettier configuration
├── package.json # Project dependencies
└── README.md # This file
Make sure you've set the SMTP_USER and SMTP_PASS environment variables:
export SMTP_USER="your-email@example.com"
export SMTP_PASS="your-password"
Ensure:
pnpm add -g supabaseYour keys.json file must contain both publicKey and privateKey fields:
{
"publicKey": "...",
"privateKey": "..."
}
MIT
Contributions are welcome! Please follow these guidelines:
For issues and questions, please open an issue on the GitHub repository.
© Profullstack, Inc. https://profullstck.com
FAQs
CLI tool for creating post-quantum encrypted Supabase database backups
We found that @profullstack/quantum-database-backups demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.

Security News
TeamPCP is partnering with ransomware group Vect to turn open source supply chain attacks on tools like Trivy and LiteLLM into large-scale ransomware operations.