Skip to main content

Posts

Meteor Mongodb Mup Commands

docker exec -it mongodb mongo docker cp mongodb:dump/ce5-meteor . If deployed with mup, you are in luck. You can find the steps here:  https://github.com/xpressabhi/mup-data-backup Here are the steps again: MongoDB Data Backup deployed via mup These commands run well only if meteor deployed with mup tool. Mup creates docker for mongodb hence taking backup becomes easy with these commands. Backup Take backup of running app data from docker then copy to local folder out of docker. docker exec -it mongodb mongodump --archive= /root/m ongodump. gz --gzip docker cp mongodb : /root/m ongodump. gz mongodump_$ (date +%Y-%m-%d_%H-%M-%S). gz Copy backup to server Move data to another server/local machine or a backup location scp /path/to/dumpfile root@ serverip : /path/ to/backup Delete old data from meteor deployment Get into mongo console running in docker then drop current database before getting new data. docker exec -it mongodb mongo appName db. runCommand ( { dropDatabase : 1 } ) Rest
Recent posts

is MEteor is Cordova

  if (e.currentTarget.files && e.currentTarget.files[0]) {           var file = e.currentTarget.files[0];           var  chunkSize = Infinity;       var options = {           endpoint: "http://52.66.153.82:8000/uploads",           chunkSize: chunkSize,           metadata: {               filename: file.name,               user_id: "Ankit",           },            header: {               "key":"value"           },           beforeSend: function(xhr){xhr.setRequestHeader('X-Test-Header', 'test-value');},           onError: function(error) {               if (error.originalRequest) {                   if (confirm('Failed because: ' + error + '\nDo you want to retry?')) {                       options.resume = false;                       options.uploadUrl = upload.url;                       upload = new tus.Upload(file, options);                       upload.start();                       return;            
  function upload_image(e, template) {       $("#loader_class").removeClass("div_hide_class");       if (e.currentTarget.files && e.currentTarget.files[0]) {           var file = e.currentTarget.files[0];           var  chunkSize = Infinity;       var options = {           endpoint: "http://13.232.101.233:8000/uploads",           chunkSize: chunkSize,           metadata: {               filename: file.name,               user_id: "Ankit",           },            header: {               "key":"value"           },           beforeSend: function(xhr){xhr.setRequestHeader('X-Test-Header', 'test-value');},           onError: function(error) {               if (error.originalRequest) {                   if (confirm('Failed because: ' + error + '\nDo you want to retry?')) {                       options.resume = false;                       options.uploadUrl = upload.ur

SSL No 2

Hom Let’s Encrypt SSL, Nginx, MUP → Deployment (Meteor) Nginx used for SSL setup Let’s Encrypt free SSL certificate: Use the instructions on this page to use OpenSSL to create your certificate signing request (CSR) and then to install your  SSL  certificate on your  Nginx  server. Restart Note: After you've installed your  SSL /TLS certificate and configured the server to use it, you must restart your  Nginx  instance. Let’s start by generating Add a A Record in your domain’s DNS Settings Setting up Let’s Encrypt ssh into your server console and run following commands $ wget https://dl.eff.org/certbot-auto $ chmod a+x certbot-auto $ ./certbot-auto certonly -d yourdomain.com --standalone After successful execution of the last command you can see your Certificate & Key generated in /etc/letsencrypt/yourdomain.com Setting up Nginx Let’s install nginx which will be our proxy server $ sudo apt-get ins