Refactor the restic repo related code for Kopia integration Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>