1
votes

I am using orientDB in embedded mode via java api. How do i perform automatic backup/restore the database at certain interval of time ? Any help would be highly appreciated.

1
Have you made any effort yourself? Some code would make it easier for you to get help! - Mad Dog Tannen

1 Answers

1
votes

Just create a TimerTask that run every X milliseconds and execute a database.backup(). Example of backup that is executed every 10 minutes (600,000 milliseconds):

  new Timer(true).schedule( new TimerTask() {
    @Override
    public void run() {
      database.backup();
    }
   }, 600000, 600000 );