NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
BaJohn
May 04, 2015Virtuoso
Deleting a file or folder from ALL snapshots.
I have just moved most of my collection of photos from one folder to another on my PC, as part of my recent 'tidy' project.
The PC is backed up regularly to the ReadyNAS system, which does snapshots every night and once a week. I also manually do snapshots after significant changes to the data.
So there are many snapshots of the original source for those photos on the NAS, which with the COW switched on will change these to 1 real copy plus any changes there might be, on this evenings snapshot. Since I will have the new source for the photos backed up, ALL the photos in the old snapshots, which take up at least as much space as the original and maybe more are superfluous, and will under normal circumstances never be removed until all snapshots related to them are deleted. This MAY be years away, possibly never.
Hence my question: Is there an easy way of deleting the contents of a folder throughout ALL snapshots that contain it?
Equally could this be done for 1 file as well? I am thinking here of some enormous files that reside on my system, like disc and system dumps etc.
I have a feeling the answer is NO, but I will pose the question anyway.
Thanks in advance.
The PC is backed up regularly to the ReadyNAS system, which does snapshots every night and once a week. I also manually do snapshots after significant changes to the data.
So there are many snapshots of the original source for those photos on the NAS, which with the COW switched on will change these to 1 real copy plus any changes there might be, on this evenings snapshot. Since I will have the new source for the photos backed up, ALL the photos in the old snapshots, which take up at least as much space as the original and maybe more are superfluous, and will under normal circumstances never be removed until all snapshots related to them are deleted. This MAY be years away, possibly never.
Hence my question: Is there an easy way of deleting the contents of a folder throughout ALL snapshots that contain it?
Equally could this be done for 1 file as well? I am thinking here of some enormous files that reside on my system, like disc and system dumps etc.
I have a feeling the answer is NO, but I will pose the question anyway.
Thanks in advance.
Certainly I confirmed this on the NAS today (see below).readysecure1985 wrote: Snapshots are read-only, not read-write. Therefore, once a snapshot is taken, it's read-only from that point on.
btrfs has a way to turn snapshots read-write, but doing so will not be supported by NETGEAR and is at your own risk.
http://unix.stackexchange.com/questions ... t-writable
What I find interesting is that you say that is what we should NOT be doing, and then show us how to do it :o.
I'm not a Linux expert, so would not be going down that route anyway.
It's nice to know that someone else might find the facility I am suggesting useful.btaroli wrote:
But on another Linux box, I find all my snapshots are by default read-write. Need to see if I can default that the other way. Given how these are created, they really shouldn't be modifiable. Though it might be handy if some were.
I double checked today and No the snapshots are NOT deletable from the PC, they only appear to be deleted.btaroli wrote: So, BaJohn, I suspect that whatever you are seeing is not coming from the NAS... perhaps something running on the PC is creating those folders you see?
When viewing on the PC, the properties are 'full access' to everyone and if you highlight and delete, it asks "do you want to permanently delete this file - Yes or No"?. When I click yes, the screen refreshes with the file shown as deleted from the snapshot folder. No other messages about it did not happen, or about needing authority or anything.
It seems to me that the PC (Windows 7 Ultimate 64bit) and the NAS (RN516) are NOT talking to each other in the same language, as the NAS knows I cannot delete the snapshot file, BUT the PC thinks it can.
Wierd ay, perhaps it's a case of "Can't see the wood for the B... Trees."
24 Replies
Replies have been turned off for this discussion
- btaroliProdigyJust realized I could hit this from HTTP to at least confirm the appearance of the NAS snapshots in the share.
I expect I will find I can't delete from them. But if yours appear differently, at least you'll know they're not coming from the NAS. ;) - btaroliProdigy
readysecure1985 wrote: Snapshots are read-only, not read-write. Therefore, once a snapshot is taken, it's read-only from that point on.
btrfs has a way to turn snapshots read-write, but doing so will not be supported by NETGEAR and is at your own risk.
http://unix.stackexchange.com/questions ... t-writable
Interesting indeed. Certainly I confirmed this on the NAS# btrfs property get /data/media/.snapshots/30/snapshot ro
ro=true
But on another Linux box, I find all my snapshots are by default read-write. Need to see if I can default that the other way. Given how these are created, they really shouldn't be modifiable. Though it might be handy if some were.# btrfs property get /fedora20_20141215 ro
ro=false - btaroliProdigyAfter reading a bit, it seems that support for marking btrfs snapshots read-only was a much more recent addition. Used to be they were always writable. :) Anyway, I did confirm that the "snapshot" folder that enabling access on the share does indeed NOT allow for deleting files. So, BaJohn, I suspect that whatever you are seeing is not coming from the NAS... perhaps something running on the PC is creating those folders you see? And in that case, perhaps you might well delete a common file from all those subdirectories.
- BaJohnVirtuoso
Certainly I confirmed this on the NAS today (see below).readysecure1985 wrote: Snapshots are read-only, not read-write. Therefore, once a snapshot is taken, it's read-only from that point on.
btrfs has a way to turn snapshots read-write, but doing so will not be supported by NETGEAR and is at your own risk.
http://unix.stackexchange.com/questions ... t-writable
What I find interesting is that you say that is what we should NOT be doing, and then show us how to do it :o.
I'm not a Linux expert, so would not be going down that route anyway.
It's nice to know that someone else might find the facility I am suggesting useful.btaroli wrote:
But on another Linux box, I find all my snapshots are by default read-write. Need to see if I can default that the other way. Given how these are created, they really shouldn't be modifiable. Though it might be handy if some were.
I double checked today and No the snapshots are NOT deletable from the PC, they only appear to be deleted.btaroli wrote: So, BaJohn, I suspect that whatever you are seeing is not coming from the NAS... perhaps something running on the PC is creating those folders you see?
When viewing on the PC, the properties are 'full access' to everyone and if you highlight and delete, it asks "do you want to permanently delete this file - Yes or No"?. When I click yes, the screen refreshes with the file shown as deleted from the snapshot folder. No other messages about it did not happen, or about needing authority or anything.
It seems to me that the PC (Windows 7 Ultimate 64bit) and the NAS (RN516) are NOT talking to each other in the same language, as the NAS knows I cannot delete the snapshot file, BUT the PC thinks it can.
Wierd ay, perhaps it's a case of "Can't see the wood for the B... Trees."
Related Content
NETGEAR Academy

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