Undelete, backup inodes


 
Thread Tools Search this Thread
Operating Systems Solaris Undelete, backup inodes
# 1  
Old 03-25-2014
Undelete, backup inodes

is there a way to backup all inodes? (could that help with undeleting files?)
# 2  
Old 03-25-2014
What exactly are you attempting or want to do?
What is your os?
what file system are you using?
# 3  
Old 03-26-2014
I'm not sure that I understand your question because, looking at your profile on this forum, you are a significant contributor. Therefore, I apologise in advance if I have completely missed the point.

There's no easy way AFAIK to 'backup' (and therefore restore) inodes. However, if it's idiots deleting files that you're concerned about, then sysadmins can manage that by creating a second 'link' to a file, in for example, another directory. If a user accidently/deliberately deletes a file then they only delete that link and the actual data isn't lost until all links are removed. Therefore, putting the link back where is should be will instantly 'restore' the file.

Does that help? Or, as I say, have I misunderstood the question?

Last edited by hicksd8; 03-26-2014 at 07:38 AM..
This User Gave Thanks to hicksd8 For This Post:
# 4  
Old 03-26-2014
I would add to hicksd8 comments that linking the directory will not help. You need to link each individual item.

For example, if you have directory /dir/main and link it to /dir/backup, it will appear to be two copies, but this is two copies of the directory itself, not the content. Deleting a file in /dir/main will also delete it in /dir/backup. You need to link:-
  • /dir/main/file1 to /dir/backup/file1
  • /dir/main/file2 to /dir/backup/file2
  • /dir/main/file3 to /dir/backup/file3

If you have subdirectories, you will need to create these and link the files, e.g. having /dir/main/sub1/fileA means you need to create /dir/backup/sub1 and then link:-
  • /dir/main/sub1/fileA to /dir/backup/sub1/fileA
  • /dir/main/sub1/fileB to /dir/backup/sub1/fileB
  • /dir/main/sub1/fileC to /dir/backup/sub1/fileC
If this is what you are after, I hope that this means you don't fall into a trap just by linking the directories.

If you are after something else, please explain where we have gone wrong. perhaps you need to review your backup strategy and your access rights if there is such a risk of loss.



Robin
This User Gave Thanks to rbatte1 For This Post:
# 5  
Old 03-26-2014
@rbatte1.....That is what I said......create the link to another directory NOT link the directory itself. Sorry I didn't make that clear enough.
# 6  
Old 03-26-2014
hicksd,
I think yours is an excellent suggestion. I just wanted to be explicit so that what may seem like a simple shortcut to reduce the effort didn't fail to protect them in the way hoped.

What you wrote was clear enough to me, but then that's because I'm always paranoid with such things having 'experienced unexpected behaviour' before Smilie The strongest lessons are with such 'interesting occurrences' Smilie


I suppose there will be a problem with any new files that are created and if we get round that, files that are deleted & then re-created and files that are changed, therefore the linked file is changed too.



orange47,
What do you actually need to achieve? Would it be simpler to remove the ability to remove the files in question? Is the root account known by those responsible for the losses. If it is, then they could cause untold damage on your server. If it isn't can you remove their write permission to the directory that the files are in?



Robin
# 7  
Old 03-26-2014
thanks, I just wanted a sort of small backup, that might help a bit in case some file gets accidentally deleted. filesystem is ufs, on sparc solaris 10.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. SCO

Versioning through undelete

Hi , I am using SCO openserver realease 3.2 and tried to test versioning on a directory with undelete -s . The command executes well but it is not creating any versions of the files in it. I have also setted versioning options via filesystem and then remounted it but of ... (0 Replies)
Discussion started by: dextergenious
0 Replies

2. Shell Programming and Scripting

rsync backup mode(--backup) Are there any options to remove backup folders on successful deployment?

Hi Everyone, we are running rsync with --backup mode, Are there any rsync options to remove backup folders on successful deployment? Thanks in adv. (0 Replies)
Discussion started by: MVEERA
0 Replies

3. UNIX for Advanced & Expert Users

Help with Inodes please

How can i trace Inode structure and modify it in UNIX kernel? We want to change the inode structure in the sense that we want to add a new field to the inode data structure. So we want to know how and where to trace inode (7 Replies)
Discussion started by: Group_Inode
7 Replies

4. UNIX for Advanced & Expert Users

UNDELETE a file

Hi, In tcsh, I mistakenly deleted some files under a dir with rm * Is there any way by which I can recover those files (without restoring to an earlier backup point) ? I mean any command like undelete or anything similar (10 Replies)
Discussion started by: snowline84
10 Replies

5. UNIX for Advanced & Expert Users

How to undelete

Hi Is there a way by which I can recover the last deleted file file from a folder. OR I had a file in a path .(i didnt notice the size at that time ) I tried ftp that file to my windows but got file of zero size. I want to check whether the file was already empty when I tried ftping it... (1 Reply)
Discussion started by: pratim09
1 Replies

6. UNIX for Dummies Questions & Answers

Undelete files in Unix

Hi Is there any way to restore files accidentally deleted in Unix (other than rm -i) (10 Replies)
Discussion started by: misenkiser
10 Replies

7. UNIX for Dummies Questions & Answers

inodes

how is the location of inodes in the physical disk. are they sequential like: bootblock|superblock|inode1|inode2| ....| datablock1|datablock2|datablock3 or are they distributed among data blocks like: bootblock|superblock|inode1|datablock1|inode2|datablock2|datablock3|inode3 |datablock4 (3 Replies)
Discussion started by: gfhgfnhhn
3 Replies

8. Filesystems, Disks and Memory

Undelete files

Right, a mate of mine screwed up today and deleted the entire contents of a directory and he really needs to get the files back. He's using Red Hat Enterprise Edition 4. The files were deleted using rm *. He can't remember if the hard drive was formatted using ext2 or ext3. Anybody have any idea... (0 Replies)
Discussion started by: Bacchus
0 Replies

9. Solaris

inodes

hi i need to find all the files that r linked to the current file as i need to delete the file as well as few of its links :confused: thnx in advance (1 Reply)
Discussion started by: livemyway
1 Replies

10. UNIX for Advanced & Expert Users

undelete

Hi All, I just given $rm abc.pc, I don't have backup also. is there any way to recover? thanks in advance krishna (3 Replies)
Discussion started by: krishna
3 Replies
Login or Register to Ask a Question