A script to make it easy to recover your data from your Synology's drives using a computer.
Now supports encrypted volumes.
Click here to see list
Drive source | DSM version | Btrfs/Ext | Storage Pool type | RAID | Encrypted | Notes |
---|---|---|---|---|---|---|
DS720+ | 7.2.1 Update 4 | Btrfs | Multiple Volume | SHR | Volume | Single drive |
DS720+ | 7.2.1 Update 4 | Btrfs | Multiple Volume | SHR | no | Single drive |
DS1812+ | 6.2.4 Update 7 | Btrfs | Multiple Volume | SHR | no | Single drive |
DS1812+ | 6.2.4 Update 7 | Btrfs | Single Volume | Basic | no | Failed, faulty HDD |
The script automatically does steps 4 to 15 from this web page:
https://kb.synology.com/en-id/DSM/tutorial/How_can_I_recover_data_from_my_DiskStation_using_a_PC
So you need to do steps 1 to 3 from that web page.
The same environment rules as on Synology's web page apply:
Applicable to:
- DSM version 6.2.x and above
- Volumes using the Btrfs or ext4 file systems
- Encrypted volumes using the Btrfs or ext4 file systems
- Ubuntu 19.10 (Eoan Ermine) only (Synology's recommended 18.04 has a bug with persistent partition)
Not applicable to:
- Volumes using read-write SSD cache
Currently the script does NOT support:
- Encrypted shared folders
At the moment the script only supports mounting 1 volume at a time. You'd need to run the script again to mount a 2nd volume.
- Make sure your PC has sufficient drive slots for drive installation (you can use a USB dock).
- Remove the drives from your Synology NAS and install them in your PC or USB dock. For RAID or SHR configurations, you must install all the drives (excluding hot spare drives) in your PC at the same time.
- Download the Desktop image for Ubuntu version 19.10 Eoan Ermine
- Synology's recommended 18.04 has a bug with persistent partition so any changes you make in Ubuntu will be lost when you shut down Ubuntu.
- Newer Ubuntu versions like 20.04.6 LTS and 22.04.4 LTS require an 8GB USB drive and install an mdadm version that won't work with DSM's superblock location.
- You'll need a 4GB or larger USB drive.
- Prepare a Ubuntu environment by following the instructions in this tutorial with 1 exception:
- Set Persistent partition size in Rufus to greater than 0 so any changes you make in Ubuntu are saved to the USB drive.
- If the drives contain an encrytped volume, or volumes:
- Find your [NASNAME]_volume#.rkey for each encrypted volume. e.g. MYNAS_volume1.rkey, DISKSTATION_volume1.rkey or RACKSTATION_volume1.rkey etc.
- Copy the *.rkey file or files to a USB drive or network share.
- Once Rufus has finished creating the boot drive you can reboot the computer, enter the BIOS and set it to boot from the USB drive, and boot into Ubuntu.
- I highly recommend unplugging the SATA cables from the PC's drives, while the computer is turned off, so you don't accidentially install Ubuntu on them.
- IMPORTANT! When Ubuntu asks if you want to want to "Try Ubuntu" or "Install Ubuntu" select "Try Ubuntu".
After booting into Ubuntu:
- Plug in the USB drive containing the *.rkey file or files, or browse to the network share where your *.rkey file or files are located.
- Copy the *.rkey file or files to Home.
- Open Firefox from the tool bar and go to https://github.com/007revad/Synology_Recover_Data or https://tinyurl.com/synorecover and download the latest release's zip file.
- Open Files from the tool bar and click on Downloads, right-click on the zip file and select Extract.
- Right-click on the syno_restore_data.sh file and select Properties.
- Click Permissions.
- Tick Allow executing file as program.
- Copy syno_recover_data.sh up 1 level to home.
- Click on the Show Applications icon on the bottom left of the desktop.
- Type terminal in the search bar.
- Right-click on Terminal and click on Save to favorites.
- Press Esc twice to return to the desktop.
There are 2 ways you can access you data:
- Accessing your volume from the Home folder
- Accessing your volume from Media on the tool bar
DSM 7 with 2 storage pools and volumes
DSM 7 SHR single volume
DSM 6 Classic RAID single volume
DSM 7 Encrypted volume