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.
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 );
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkRead more