NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
FG
Aug 03, 2016Aspirant
Copy via SSH
firmware 6.5.0 readynas 2120 I am trying to copy the data (including the snapshots) from 1 volume to another within the NAS. I have a 4 disk raid 10, I have pulled bay disk out and replaced ...
- Aug 03, 2016
FG wrote:
I am stuck on copying via SSH. I have SSH service turned on in the system settings. When I setup a backup, is there a place to select SSH? The advanced tab of my backup is disabled, I can choose the advanced tab, but I cannot click on anything.
I meant accessing the NAS via ssh using something like putty (or terminal on mac) and copying the subvolume using the linux command line interface ot the NAS.
The copy itself would be done with btrfs send and btrfs receive
In the original thread, the comments were on how to copy the shares to a USB disk with snapshots. If you are copying to a NAS internal volume, you'd need to create shares first on the target volume from the web ui, and then copy to the root of each share.
FG wrote:
StephenB wrote "Copy the subvolumes over via ssh" Subvolumes........ meaning the indiviual shares within my Volume1?
Yes. Each share is a btrfs subvolume.
FG
Aug 03, 2016Aspirant
Yes, I am copying to internal volume. Shares are created on target.
Are you saying that since I am copying within the NAS that snapshots will come with the data to the target drive?
StephenB
Aug 04, 2016Guru - Experienced User
FG wrote:
Yes, I am copying to internal volume. Shares are created on target.
Are you saying that since I am copying within the NAS that snapshots will come with the data to the target drive?
No.
I'm saying that you can't just copy subvolumes to the new volume, because shares also need to be created in the ReadyNAS SQL database.
So if you have a share called Pictures now, you will need to something like
- copy the subvolume Pictures to the volume (as Pictures), using BTRFS send and receive
- create a share called temp on the new volume from the web ui
- delete the subvolume temp with ssh (leaving the share alone)
- rename the Pictures subvolume to temp
- rename the temp share to Pictures from the web ui (which will also rename the temp subvolume to Pictures)
This is a lot of work to preserve the snapshots. I'm curious to know why you are so determined to keep them???
For me the snapshots are like the recycle bin - something nice to have, but no problem clearing out if from time to time.
- FGAug 04, 2016Aspirant
IT is clearly not my main job. We are smaller company so I was saddled with these tasks many years ago. We were hit with Ransomware a couple months back........it did damage to just about anything with a ethernet cable that was powered on at the time.
In regards to the snapshots......I would hate to loss them only to learn after a few days later that our present data is corupt and rolling back to a snapshot would fix the problem.
- StephenBAug 04, 2016Guru - Experienced User
FG wrote:
In regards to the snapshots......I would hate to loss them only to learn after a few days later that our present data is corupt and rolling back to a snapshot would fix the problem.
I am worried that you are more likely to damage the data by attempting these heroics. If you simply migrate the data w/o the snapshots, you can take a manual snapshot immediately. That will give you the ability to roll back.
If that's not enough you could roll back the original volume after migration and then back it up to USB. That will give you a separate backup of the older files (which IMO is somewhat better than snapshots as far as ransomware is concerned).
Overall, you should have a backup plan in place (including disaster recovery). If you want any advice on that, perhaps open a new thread after the migration project is complete.
- FGAug 04, 2016Aspirant
I understand what you are saying about snapshots being like the recycle bin.
I like the snapshots because they are read only. When we we got hit with ransomware some of our backup were encrypted, if I understand the snapshots correctly, they can't be altered, so if the data on the NAS was ever to be compromised again I could simply roll back to the last good snapshot.
But at this point I think I will dump the snapshots. I tired using Putty last night, but I don't know it well enough and will probably make a mess of something.
Related Content
NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!