Advertisement
Guest User

Untitled

a guest
Oct 12th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. // Import replication module
  2. const replication = require("@arangodb/replication");
  3.  
  4. // Define replication parameters
  5. const targetDatabase = "testdb";
  6. const replicationParams = {
  7. endpoint: "ssl://master.domain:8530",
  8. username: "user",
  9. password: "userpwd",
  10. includeSystem: false,
  11. incremental: true,
  12. autoResync: true,
  13. autoStart: true,
  14. verbose: false,
  15. };
  16.  
  17. // Set active database
  18. db._useDatabase(targetDatabase);
  19.  
  20. // Start continuous replication
  21. console.log("Starting continuous replication");
  22. replication.setupReplication(replicationParams);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement