![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
pgdump-aws-lambda
Advanced tools
Lambda function for executing pg_dump and streaming the output to s3.
An AWS Lambda function that runs pg_dump and streams the output to s3.
It can be configured to run periodically using CloudWatch events.
{
"PGDATABASE": "oxandcart",
"PGUSER": "staging",
"PGPASSWORD": "uBXKFecSKu7hyNu4",
"PGHOST": "database.com",
"S3_BUCKET" : "my-db-backups",
"ROOT": "hourly-backups"
}
Note: you can test the lambda function using the "Test" button and providing config like above.
AWS lambda has a 5 minute maximum execution time for lambda functions, so your backup must take less time that that.
This function will store your backup with the following s3 key:
s3://${S3_BUCKET}${ROOT}/YYYY-MM-DD/YYYY-MM-DD@HH-mm-ss.backup
This script uses the pg_dump utility from PostgreSQL 9.6.2.
It should be able to dump older versions of PostgreSQL. I will try to keep the included binaries in sync with the latest from postgresql.org, but PR or message me if there is a newer PostgreSQL binary available.
You can pass the config option 'ENCRYPTION_PASSWORD' and the backup will be encrypted using aes-256-ctr algorithm.
Example config:
{
"PGDATABASE": "dbname",
"PGUSER": "postgres",
"PGPASSWORD": "password",
"PGHOST": "localhost",
"S3_BUCKET" : "my-db-backups",
"ENCRYPTION_PASSWORD": "my-secret-password"
}
To decrypt these dumps, use the command:
openssl aes-256-ctr -d -in ./encrypted-db.backup -nosalt -out unencrypted.backup
pg_dump
binarymkdir bin/postgres-9.5.2
scp -i YOUR-ID.pem ec2-user@AWS_IP:/usr/bin/pg_dump ./bin/postgres-9.5.2/pg_dump
scp -i YOUR-ID.pem ec2-user@AWS_UP:/usr/lib64/libpq.so.5.8 ./bin/postgres-9.5.2/libpq.so.5
NOTE: libpq.so.5.8
is found out by running ll /usr/lib64/libpq.so.5
and looking at where the symlink goes to.
FAQs
Lambda function for executing pg_dump and streaming the output to s3.
The npm package pgdump-aws-lambda receives a total of 20 weekly downloads. As such, pgdump-aws-lambda popularity was classified as not popular.
We found that pgdump-aws-lambda demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.