https://github.com/chmodshubham/harddisk-data-recovery
Recover deleted files from the harddisk/SSD.
https://github.com/chmodshubham/harddisk-data-recovery
harddisk recovery ssd
Last synced: 22 days ago
JSON representation
Recover deleted files from the harddisk/SSD.
- Host: GitHub
- URL: https://github.com/chmodshubham/harddisk-data-recovery
- Owner: chmodshubham
- Created: 2023-07-27T21:45:20.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-07-28T06:22:58.000Z (over 2 years ago)
- Last Synced: 2024-04-16T04:13:11.071Z (almost 2 years ago)
- Topics: harddisk, recovery, ssd
- Homepage:
- Size: 4.88 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Data Recovery from SSD/Harddisk
Recovering deleted files or folders from a server can be a complex task, especially if the server is not set up with a trash or recycle bin system. Here are some general steps you can follow:
If the files are deleted using `rm -rf` then forget about them and focus on not repeating the mistake.
#### 1. Stop using the system
As soon as you realize that you've deleted a file or folder, stop using the system. When a file is deleted, the space it occupied is marked as free and can be overwritten by other data. By continuing to use the system, you risk overwriting the deleted files and making them unrecoverable.
#### 2. Use a File Recovery Tool
There are several file recovery tools available for Linux systems. One of the most popular is `extundelete`.
To install `extundelete`, use `sudo apt-get install extundelete`
##### Identify the correct device
Use the `lsblk` or `df` command to identify the device identifier of the hard disk or SSD.
##### Unmount the device
Use the `umount` command to unmount the device. This is to prevent any further changes to the data on the device while we are trying to recover the deleted files.
```bash
# Replace /dev/sdb2 with your actual device if it's different.
umount /dev/sdb2
```

##### Filesystem Corruption Check
Run `fsck` on the filesystem with `sudo fsck /dev/sdb2` to fix any issues that `fsck` finds.
##### Recover the data
Use this command to recover a deleted directory:
```bash
sudo extundelete --restore-directory /path/to/deleted/directory /dev/sdb2
```
This option will attempt to recover all deleted files from the filesystem. Be aware that this could recover a large number of files and take a long time.
```bash
sudo extundelete --restore-all /dev/sdb2
```

