× NETGEAR will be terminating ReadyCLOUD service by July 1st, 2023. For more details click here.
Orbi WiFi 7 RBE973
Reply

Can I restore only good files from backup USB disk to overwrite zero byte files?

Can I restore only good files from backup USB disk to overwrite zero byte files?

Just checking through my C volume I noticed some folders contain zero byte files, the time stamp is 2018 (all files in a folder have the exact same time and date) so I don't think this has anything to do with a disk upgrade I just performed, it's more likely to be a bad copy operation from 2018, I seem to recall I was having permission problems some time ago which are (fingers crossed) all sorted now.

 

Luckily I do have a USB drive backup, but to save me from manually checking every folder is there any 'Backup Restore' facility that will overwrite only zero byte files with good files from my USB drive?  The last thing I want to do is overwrite good files on the main disks with zero byte files that might be on the USB drive, or backup the zero byte files from the main disks to the USB drive.

 

If I have to go through each folder manually then I will, just thought I'd ask if there's a better way.

 

Also is there a way of finding all folders / files of zero bytes?

Model: RND4000v2|ReadyNAS NV+ v2 Chassis only
Message 1 of 3
StephenB
Guru

Re: Can I restore only good files from backup USB disk to overwrite zero byte files?


@jonnymorris98 wrote:

 

Also is there a way of finding all folders / files of zero bytes?


You can do this on a windows PC that has access to the shares using powershell.  This command will do it:

gci -rec -force -path \\nasname\sharename | foreach-object { if($_.length -eq 0) { write-host ("{0}" -f $_.FullName) } }

Use the real nas name (or IP address) and share name of course.  If the USB disk is connected to the PC, you can use the Windows path to the USB folder instead of \\nasname\sharename

 

You can write this to a file (for example output.txt) by adding

*> .\output.txt

to the end of the command.

 

I'm not sure if this will report zero-byte folders or not (I don't have any easy way to test that).

Message 2 of 3

Re: Can I restore only good files from backup USB disk to overwrite zero byte files?



@StephenB wrote:

@jonnymorris98 wrote:

 

Also is there a way of finding all folders / files of zero bytes?


You can do this on a windows PC that has access to the shares using powershell.  This command will do it:

gci -rec -force -path \\nasname\sharename | foreach-object { if($_.length -eq 0) { write-host ("{0}" -f $_.FullName) } }

 


This is proving to be very useful and time-saving, thank you very much! 

 

It's odd the way only a few folders have zero byte files in them, and when they are affected it's not always all files, it might be all of them or it might be from part way down the list (sorted by name).

 

 

Model: RND4000v2|ReadyNAS NV+ v2 Chassis only
Message 3 of 3
Top Contributors
Discussion stats
  • 2 replies
  • 690 views
  • 1 kudo
  • 2 in conversation
Announcements