You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The docker image contains a unconfigured orientdb installation and for running it you need to provide your own config folder from which OrientDB will read its startup settings.
35
41
@@ -39,69 +45,81 @@ The backup folder only needs to be mapped if you activate that setting on your O
39
45
40
46
41
47
Persistent distributed storage using BTSync
42
-
===========================================
48
+
-------------------------------------------
43
49
44
50
If you're not running OrientDB in a distributed configuration you need to take special care to backup your database (in case your host goes down).
45
51
46
52
Below is a simple, yet hackish, way to do this: using BTSync data containers to propagate the OrientDB config, LIVE databases and backup folders to remote location(s).
47
53
Note: don't trust the remote copy of the LIVE database folder unless the server is down and it has correctly flushed changes to disk.
48
54
49
55
1. Create BTSync shared folders on any remote location for the various folder you want to replicate
50
-
1.1 - config: orientdb configuration inside the config folder
51
-
1.2 - databases: the LIVE databases folder
52
-
1.3 - backup: the place where OrientDB will store the zipped backups (if you activate the backup in the configuration file)
53
56
54
-
2. Take note of the BTSync folder secrets <CONFIG_FOLDER_SECRET>, <DATABASES_FOLDER_SECRET>, <BACKUP_FOLDER_SECRET>
57
+
1.1. config: orientdb configuration inside the config folder
55
58
56
-
3. Launch BTSync data containers for each of the synched folder you created giving them proper names:
57
-
`docker run -d --name orientdb_config -v /opt/orientdb/config nesrait/btsync /opt/orientdb/config <CONFIG_FOLDER_SECRET>`
58
-
`docker run -d --name orientdb_databases -v /opt/orientdb/databases nesrait/btsync /opt/orientdb/databases <DATABASES_FOLDER_SECRET>`
59
-
`docker run -d --name orientdb_backup -v /opt/orientdb/backup nesrait/btsync /opt/orientdb/backup <BACKUP_FOLDER_SECRET>`
59
+
1.2. databases: the LIVE databases folder
60
+
61
+
1.3. backup: the place where OrientDB will store the zipped backups (if you activate the backup in the configuration file)
60
62
61
-
3. Wait until all files have magically appeared inside your BTSync data volumes:
62
-
`docker run --rm -i -t --volumes-from orientdb_config --volumes-from orientdb_databases --volumes-from orientdb_backup ubuntu du -h /opt/orientdb/config /opt/orientdb/databases /opt/orientdb/backup`
63
+
2. Take note of the BTSync folder secrets CONFIG_FOLDER_SECRET, DATABASES_FOLDER_SECRET, BACKUP_FOLDER_SECRET
63
64
64
-
4. Finally you're ready to start your OrientDB server
65
-
`docker run --name orientdb -d \
65
+
3. Launch BTSync data containers for each of the synched folder you created giving them proper names:
66
+
```bash
67
+
docker run -d --name orientdb_config -v /opt/orientdb/config nesrait/btsync /opt/orientdb/config CONFIG_FOLDER_SECRET
68
+
docker run -d --name orientdb_databases -v /opt/orientdb/databases nesrait/btsync /opt/orientdb/databases DATABASES_FOLDER_SECRET
69
+
docker run -d --name orientdb_backup -v /opt/orientdb/backup nesrait/btsync /opt/orientdb/backup BACKUP_FOLDER_SECRET
70
+
```
71
+
72
+
4. Wait until all files have magically appeared inside your BTSync data volumes:
73
+
```bash
74
+
docker run --rm -i -t --volumes-from orientdb_config --volumes-from orientdb_databases --volumes-from orientdb_backup ubuntu du -h /opt/orientdb/config /opt/orientdb/databases /opt/orientdb/backup
75
+
```
76
+
77
+
5. Finally you're ready to start your OrientDB server
78
+
```bash
79
+
docker run --name orientdb -d \
66
80
--volumes-from orientdb_config \
67
81
--volumes-from orientdb_databases \
68
82
--volumes-from orientdb_backup \
69
83
-p 2424 -p 2480 \
70
-
nesrait/orientdb-1.7.8`
84
+
nesrait/orientdb-1.7.8
85
+
```
71
86
72
87
73
88
OrientDB distributed
74
-
====================
89
+
--------------------
75
90
76
91
If you're running OrientDB distributed* you won't have the problem of losing the contents of your databases folder since they are already replicated to the other OrientDB nodes. From the setup above simply leave out the "--volumes-from orientdb_databases" argument and OrientDB will use the container storage to hold your databases' files.
77
92
78
-
*note: some extra work might be needed to correctly setup hazelcast running inside docker containers (see https://groups.google.com/forum/#!topic/vertx/MvKcz_aTaWM).
93
+
*note: some extra work might be needed to correctly setup hazelcast running inside docker containers ([see this discussion](https://groups.google.com/forum/#!topic/vertx/MvKcz_aTaWM)).
79
94
80
95
81
96
Ad-hoc backups
82
-
==============
97
+
--------------
83
98
84
-
With orientdb 1.7.8 we can now create ad-hoc backups by taking advantage of the new backup.sh script:
With orientdb 1.7.8 we can now create ad-hoc backups by taking advantage of [the new backup.sh script](https://github.com/orientechnologies/orientdb/wiki/Backup-and-Restore#backup-database):
86
100
87
101
- Using the orientdb_backup data container that was created above:
Note: I haven't tried the non-blocking backup (type=lvm) yet but found [this discussion about a docker LVM dependency issue](https://groups.google.com/forum/#!topic/docker-user/n4Xtvsb4RAw).
0 commit comments