private void initBackupServer() {
		try {
			connectBackupServer();
			if(backupServer != null) {
				
				// get information from database
				HashMap<String, ArrayList<String>> tblMessages;
				HashMap<String, String> tblUser = db.getUsers();
				HashMap<String,HashMap<String,String>> tblFriendships = db.getFriendships();
				System.out.println("User: " + tblUser.toString());
				System.out.println("friends: " + tblFriendships.toString());
				
				// register the users
				for(String user : tblUser.keySet()) {
					backupServer.newUser(user, tblUser.get(user), ServerInterface.SERVER);
				}
				
				
				// register the friendships
				for(String id : tblFriendships.keySet()) {
					for(String user : tblFriendships.get(id).keySet()) {
						backupServer.addBuddy(user, tblFriendships.get(id).get(user), ServerInterface.SERVER);
					}
				}
				
				// send the messages
				for(String user : tblUser.keySet()) {
					tblMessages = db.getMessages(user);
					for(String sender : tblMessages.keySet()) {
						for(String message : tblMessages.get(sender)) {
							backupServer.sendMessage(sender, user, message, ServerInterface.SERVER);
						}
					}
				}
				
				// login the already logged in users
				for(String user : getAllUser()) {
					backupServer.login(user, tblUser.get(user), _userStore.get(user), ServerInterface.SERVER);
				}
			}
		} catch(Exception ex) {
			System.out.println("ERROR in registerBackupServer");
		}
		initRequested = false;
	}