NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
whc
Nov 02, 2019Aspirant
Rebuilding shares using SSH possible?
Just mistakenly deleted shares when I deleted stuck snapshots using SSH, is it possible to rebould those shares with SSH, have taken screenshot, so have the ID and gen numbers, maybe a SSH command ca...
whc
Nov 02, 2019Aspirant
btrfs restore, don't understand how to put togheter a command line for restore a share, cannot fint any examples online, below is the options:
btrfs restore [options] <device> <path> | -l <device>
Try to restore files from a damaged filesystem (unmounted)
-s|--snapshots get snapshots
-x|--xattr restore extended attributes
-m|--metadata restore owner, mode and times
-S|--symlink restore symbolic links
-v|--verbose verbose
-i|--ignore-errors ignore errors
-o|--overwrite overwrite
-t <bytenr> tree location
-f <bytenr> filesystem location
-u|--super <mirror> super mirror
-r|--root <rootid> root objectid
-d find dir
-l|--list-roots list tree roots
-D|--dry-run dry run (only list files that would be recovered)
-F force (do not prompt on large files looping frequently)
-X eXtreme search (use both BTRFS_DIR_ITEM_KEY and BTRFS_DIR_INDEX_KEY)
--path-regex <regex>
restore only filenames matching regex,
you have to use following syntax (possibly quoted):
^/(|home(|/username(|/Desktop(|/.*))))$
-c ignore case (--path-regex only)
whc
Nov 02, 2019Aspirant
Or maybe there is a command for using rsync, and backing up all data on the nas drives, no matter if deleted or not?
- SandsharkNov 02, 2019Sensei
Rsync cannot see the deleted subdirectory or the files in it, so it cannot do anything. Most of the tools that are around for restoring "lost" files in linux don't work when you lose an entire btrfs subvolume (which a share is), not just a directory.
Did you go to the script that was referenced in the other article? http://www.infotinks.com/btrfs-undelete-undeleting-recovering-accidentally-deleted-a-subvolume-or-file-in-btrfs-and-dont-have-a-snapshot/
I believe btrfs rescue can copy everything, including deleted subvolumes, from one volume to another, but it will truely copy everything. So you need enough space to also hold a copy of whatever you have not accidently deleted as well as what you have. https://btrfs.wiki.kernel.org/index.php/Manpage/btrfs-rescue .
This is where the best answer is "restore from your backup". I assumed you would not have asked if you had a backup.
- whcNov 02, 2019Aspirant
Thank you, will look into that. Right now am thinking of making images of the drives and experiment with the images, makes me a little nervous trying different commands in terminal not fully understanding them, even though I have the server in read mode.
Thinking of running Linux on my PC, seems to be no good free software to make images of Linux formatted drives. Maybe Mac is able to do that as well?
I plan to use my other readynas as backup, so I only read from my 316, have around 23tb free on the other server (416), and this 316 I have 6x3TB so 18TB total hoping it is fine. Maybe use a USB drive between the two NAS servers. Else I have 4 free SATA ports in my PC, could just connect som drives directly to that.
No backup I'm afraid, allot of images and home video files, backups from my computers, and such, so really would be unhappy not getting this'd files back. Just so darn expensive to backup to cloud and/or a nas server in another location, thinking of it often, but have not found a solution that does not cost to much, just a private home user.
- SandsharkNov 04, 2019Sensei
Any software that will make a block-by-block clone of the drives won't care about the formatting. Clonezilla and EaseUs Todo Backup are ones I am aware of that will do that under Windows
Most of my backup is also here at my home. I have a remotely located NAS with my brother in North Carolina (while I'm in Florida), but just for the really irreplaceable/critical stuff. If I did not have him as an option, I'd likely go with a cloud solution for that stuff.
My movies, music, etc. are mostly replaceable (assuming insurance covers loss of the original media if it's due to fire, theft, or huricane), but tax stuff and family photos aren't. Recovering the movies alone would take weeks at the recovery speed of most cloud syatems, and I just can't justify having that big a NAS with my brother.
Related Content
NETGEAR Academy
Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!