Skip to content

Instantly share code, notes, and snippets.

View evangelicaldev's full-sized avatar
⚔️
building something

Phil evangelicaldev

⚔️
building something
  • Some place that sometimes rains
View GitHub Profile
@evangelicaldev
evangelicaldev / Dockerfile36
Created April 4, 2020 18:47
Dockerfile MongoDB 4.2 and 3.6
FROM ubuntu
COPY <cert file> .
RUN apt-get update
RUN apt-get install -y wget gnupg
RUN wget -qO - https://www.mongodb.org/static/pgp/server-3.6.asc | apt-key add -
RUN echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-3.6.list
RUN apt-get update

Variables used below:

  • $compose_endpoint:$compose_port: the hostname/port combination used to talk to the Compose deployment
  • $icd_endpoint:$icd_port: the hostname/port combination used to talk to IBM Cloud Databases
  • $compose_username:$compose_password: the username/password combination used to authenticate against the Compose deployment
  • $icd_username:$icd_password: the username/password combination used to authenticate against IBM Cloud Databases
  • $bucket_name: the name of the bucket we're going to use
  • $path_to_snapshot_folder: the base path inside the bucket where we want to write all snapshot data. Make sure there's no leading slash (e.g: folder1/folder2, not /folder1/folder2)
  • $access_key: the IBM Cloud Object Storage/S3 repo access key
  • $secret_key: the IBM Cloud Object Storage/S3 repo secret key
"""
Forked from https://gist.github.com/kitwalker12/517d99c3835975ad4d1718d28a63553e
Modified to work with IBM Cloud Databases for Redis
Copies all keys from the source Redis host to the destination Redis host.
Useful to migrate Redis instances where commands like SLAVEOF and MIGRATE are
restricted (e.g. IBM Cloud Databases for Redis).
The script scans through the keyspace of the given database number and uses
a pipeline of DUMP and RESTORE commands to migrate the keys.
Requires Redis 2.8.0 or higher.
### Keybase proof
I hereby claim:
* I am aa7955 on github.
* I am algerious (https://keybase.io/algerious) on keybase.
* I have a public key whose fingerprint is 5FB3 4DCB D493 93A8 2A0E EBD4 2F79 6158 E0DE 95C8
To claim this, I am signing this object: