Browse Source

init

init
pascal.pp 3 years ago
parent
commit
58400fd36d
1 changed files with 20 additions and 0 deletions
  1. 20
    0
      backup_docker.sh

+ 20
- 0
backup_docker.sh View File

@@ -0,0 +1,20 @@
1
+#!/bin/bash
2
+varBackupDir="/home/backup-docker/"
3
+
4
+
5
+echo "Backup rocketchat"
6
+docker rmi rocketchat-backup && docker commit -p rocketchat_rocketchat_1 rocketchat-backup && sleep 20;
7
+backupRocket=$(docker save -o "$varBackupDir"rocketchat-backup.tar rocketchat-backup)
8
+sleep 10;
9
+
10
+echo "Backup MongoDB"
11
+docker rmi mongo-backup && docker commit -p rocketchat_mongo_1 mongo-backup && sleep 20;
12
+backupMongo=$(docker save -o "$varBackupDir"mongo-backup.tar mongo-backup)
13
+sleep 10;
14
+
15
+echo "Backup Hubot"
16
+docker rmi hubot-backup && docker commit -p rocketchat_hubot_1 hubot-backup && sleep 20;
17
+backupHubot=$(docker save -o "$varBackupDir"hubot-backup.tar hubot-backup)
18
+sleep 10;
19
+
20
+echo "Fin"

Loading…
Cancel
Save