refactor databag sync method, same as role