- SSH into the target machine
- Make a deploy_keys folder and change into it
mkdir ~/.ssh/deploy_keys
cd ~/.ssh/deploy_keys
- Create a new key pair
ssh-keygen -t rsa -b 4096 -C "[email protected]"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Demo: https://jsfiddle.net/elky/f6khaf2t/ | |
<div class="element"> | |
<div class="truncate"> | |
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt | |
ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco | |
laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in | |
voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat | |
non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. |
- install mongodb on local machine (mongodump & mongorestore) commands are required.
- command dumping
mongodump -h xxx11.mlab.com:11 -u user -p password --authenticationDatabase release-db -d release-db -o /home/dumps
**Options** `-h`: mlab host:port, `-u`: db user, `-p`: db user password, `--authenticationDatabase` `-d`: mlab dbname, `-o`: path to store backupfiles
-
restore command, to restore locally
mongorestore --db dname /home/dumps
Otherwise to restore in mlab, create a new db and replace the options