---
tags: 筆記, synology, hyper backup
---
# Synology Hyper backup - google drive destination corrupted 處理
1. 登入SSH,並執行下面程序
```=
#檢查備份設定
sudo -i
cat /usr/syno/etc/synobackup.conf
#查看錯誤原因
cd /volume1/@img_bkp_cache/google_drive_*
cd *.hbk
cat Guard/detect/error.log
#update to Hyper Backup. Version 3.0.2-2531 後可省略這步
mv /volume1/homes/drive_agent_7_1.py /volume1/\@appstore/HyperBackup/addon/google_drive/python/drive_agent.py
cd /volume1/\@appstore/HyperBackup/addon/google_drive/python/
chown -R root:root drive_agent.py;chmod 755 drive_agent.py
# for each failed task 修正資料庫狀態為準備中
cd /volume1/@img_bkp_cache/google_drive_*
cd *.hbk
sqlite3 Config/target_info.db "UPDATE target_info SET status='ready'"
# 修改工作狀態
vi /var/synobackup/config/task_state.conf
#Edit task_state.conf (using vi) to the following:
last_state="Backupable"
state="Backupable"
```
2. 重新開機
## 解法2
"Src" is the name for the source NAS and "Dst" is the name for the destination NAS.
Before proceeding,
a. Disable any backup schedules.
b. Check that your disks and memory are all performing well. If there is any hardware fault, fix it first.
SSH into Dst to perform the following steps.
1. Change to root.
> sudo -i
2. Change into backup directory.
> cd /volume1/backups/Dst/
3. Check the status. You should get "detect-bad".
> sqlite3 Config/target_info.db "select status from target_info"
4. Change to HyperBackup Vault's bin folder and run synoimgbkptool.
> cd /var/packages/HyperBackupVault/target/bin
> nohup ./synoimgbkptool -r /volume1/backups -t Dst -R detect > /volume1/\@tmp/recover.output &
You may get "nohup: ignoring input and redirecting stderr to stdout". It's ok to ignore this.
5. Wait for synoimgbkptool to complete running. It can take a very long time, 3 to 4 days. You can check with the following command.
> ps aux | grep synoimgbkptool
If you see something similar to the following, it is still running.
admin 12451 34.0 0.6 390148 24976 ? S Nov28 3689:58 ./synoimgbkptool -r /volumeUSB1/usbshare -t Dst -R detect
root 15620 0.0 0.0 23148 2324 pts/23 S+ 02:57 0:00 grep --color=auto synoimgbkptool
Otherwise, you should see something similar to this.
root 15620 0.0 0.0 23148 2324 pts/23 S+ 02:57 0:00 grep --color=auto synoimgbkptool
You can now exit the SSH to Dst.
Next, SSH into Src.
1. Change to root.
> sudo -i
2. Change to HyperBackup's config directory.
> cd /var/synobackup/config/
3. Edit task_state.conf (using vi) to the following.
last_state="Backupable"
state="Backupable"
You can now exit SSH to Src.
Finally, log in to the admin portal. Start HyperBackup and choose "Check backup integrity". It can take a long time (3 to 4 days). Once that's completed without errors, you should be able to resume your backup schedule.