dzitkowskik / mini-dos

Project for Distributed Operating Systems at Warsaw University of Technology (Mathematics and Computer Science department) Winter 2015
Apache License 2.0
0 stars 0 forks source link

Master backup (ON DEMAND) #70

Closed dzitkowskik closed 8 years ago

dzitkowskik commented 8 years ago

Prepare method for backuping master state to a file and restoring master from backup. Is should be triggered by command from master console. You must save all tables from in memory db to some file, as well as all node lists, task lists and so on.

davidmigloz commented 8 years ago

Done.

  1. When you enter b in master, a backup is created. It contains three files:

    a) backup_imdb.db: in-memory master database backup. b) backup_nodes.db: registered nodes backup. c) backup_tasks.db: tasks backup.

  2. When you enter r in master, a backup is restored (the three files must be in the root directory of the project):

    a) backup_imdb.db is restored. b) backup_nodes.db is restored. c) backup_tasks.db is restored. d) For each registered node, master call updateMaster() to update the new master interface in nodes.

*Problem: the new master interface cannot be updated in client automatically because we only have client->master communication.