How to recover the deleted or moved data from a particular directory in Linux Environment? - data-recovery

I accidentally moved some files from /home/name/Pictures/ directory from my opensuse 11.4 machine to flash drive. Is there a way to recover the data? I lost the data from my flash drive.

Probably no.
Many (most?) Linux desktops have a "wastebasket". If you delete files using the GUI, you should be able to recover them from the wastebasket GUI:
There are also tools like TestDisk or ExtUndelete that might be able to help you:
http://www.linux.org/threads/undelete-files-on-linux-systems.4316/
http://extundelete.sourceforge.net/
Finally, here are some other links that might (might!) help:
http://www.linux.org/threads/undelete-files-on-linux-systems.4316/
https://superuser.com/questions/150027/how-to-recover-a-removed-file-under-linux
https://help.ubuntu.com/community/DataRecovery
http://www.smashingapps.com/2011/08/11/5-must-have-file-recovery-tools-for-linux-users.html
But frankly, your best choices for Linux are the same as for Windows: keep backups of anything you really care about!

Related

Migrate FreeNAS Data to Windows (over SMB)

My FreeNAS server is slowly dying and before that happens i need to migrate all data in the NAS to a windows server.
The FreeNAS has ZFS Snapshots and i need to restore data from a few days ago to the Windows server.
I have done some research and i can't think of the best way to do this. (i am not linux/Zfs savvy)
So the things i need to do is,
Restore ZFS Snaptshot from a few days ago to a windows Server
I mounted a windows share to the Freenas using mount_smbfs //username:password#server.name/share_name share_name/
I can copy and create files on that share just fine. So I was wondering if it was possible to restore an entire data set from an snapshot to the windows share.
Any help, tips is much appreciated.
Note. I could easily copy all data on a freenas volume to the windows share, but what makes it complicated for me, is restoring data from a snapshot without overwriting the current data on the volume and moving that data to the windows share.
You have two sensible possibilities:
Access the ZFS dataset (shared over SMB) from your Windows Server, then right-click on it in Explorer and choose "Previous Versions". You will get (after a short time depending on the number of snapshots) a list of all snapshots with their dates. You can then either explore them and copy some files over, or you can choose to copy all to another location (e. g. your new share).
Mount the Windows share on FreeNAS like you did, then go to <pool>/<filesystem>/.zfs/snapshot/ (path completion on the shell might be turned off for the .zfs directory, so type it in manually). There you'll find all your snapshots (like you would have on Windows' Previous Versions) and you can copy some or all files over to the new directory.
I would suggest the first way, because you have the GUI and cannot do any harm to the FreeNAS system this way.
On the other hand, have you thought about the possibility of rescuing the system? You did not specify why it's dying, but things like hard drives or mainboards can be swapped quite easily without requiring setting up everything anew. Maybe this would help you more than moving the data off to another, unconfigured system?

Filesharing between OS X & Windows 10 on a htdocs directory?

I had a practical question for my own work at home. I want to use quad monitor for my coding and other work. I can do this with my macbook pro attached to external triple monitor. But it is not practical because of all the cable management and Macbook Pro is barely keeping up with the performance running it. So what I wanted to do was having my PC run triple monitor and my Macbook as forth screen. Code on my pc and share/update the files in the htdocs directory on my OS X. Like how FTP works.
I found this link: http://www.itworld.com/article/2844141/how-to-share-mac-os-x-yosemite-files-with-windows-10.html
But I'm not sure if I will face sudden obstacles in doing this with my htdocs directory or other directories where my work is stored and updated from time to time.(example:Symfony projects)
I hope I mentioned everything. Thanks in advance!
Well, you can use one of the free cloud based, file-sharig service, like Microsoft OneDrive, Google Drive or Dropbox.
But files will not be updated immediately, you need to wait few seconds (in the best case scenario). So it might get frustrating quickly.
Also, from my experience, OneDrive on Mac is not the best choice when it comes to a Symfony project - it stops working after a while, probably because a lot of cache files, so I need to restart it and it's not usable at all.
Another solution might be using a version control system (f.e. Git) - but you would be able to see the code changes only after a commit and push (and do it manually, of course).

How do I Install Xcode 6 or 7 on an external drive?

The capacity of my SSD is just 60Gb, and I have just over 5Gb of free space at the moment. Is there a way to install Xcode directly on the external drive? Or to do so I'd have first to make this drive bootable and boot my system from it?
There are various possible solutions, including, making use of symlinks, dual booting two versions of macOS (one on external SSD), and many more.
But the best way I found was to create a new macOS user and change its home directory to external SSD (by going to advanced user settings under Users & Groups System Preferences).
The exact steps I followed:
Create a new APFS partition on external SSD with 100GB storage. (say NewVol)
Create new macOS user and change its home directory to /Volume/NewVol/user
Logged into the new user with external SSD connected, and installed xcode in ~/Application. (i.e. the local Application folder, not /Application)
Why this works best is because you don't need to manually manage symlinks, also symlinks might create problems during builds. All the required files (including builds and temporary files) are stored in user directory, so no space occupied on internal drive. Also, no hassle of installing a complete separate OS, and going through cycles of reboots to switch the OS.
There are a couple of options you can consider.
Move some files to the external drive, instead of installing applications on it. This would be your best bet, since applications have dependancies. Also, if you run them from your SSD, they will get better performance.
If you absolutely need your files on your SSD, and you can't move them, then I would suggest moving any third party applications to see if you can free up space for Xcode, and run it from your SSD.
If the two options above don't work for you, then you will have to try and work with Xcode. There is no easy way to change the install location. Your option here would be to free up some space temporarily, by moving bigger files to an external drive. Then do the Xcode install in your applications folder. Once that's done, move Xcode to the external drive, and take your files back to your SSD. Here is another questions that talks about the same topic.

Silverlight 5 Trusted Mode. Accessing FileSystem and Local drives

Is there any way, any chance at all to access entire filesystem in SL app with elevated trust?
That will work both in Windows and Mac?
Through AutomationFactory,PInvoke or unmanaged code?
I need an app that could read local drives, folders and files.
UDP: Ok, seems it's possible to read folders and files using classes of System.IO from mscorlib. Although you still can't get information about local mounted drives. There is no DriveInfo in Silverlight's mscorlib :(
Ok I have an idea about this.
It is straightforward enough with Windows, to get the list of the local drives you can use AutomationFactory. There is plenty amount of examples if you google it. Search for something called SilverlightFileExplorer.
Now on a Mac you can use Directory.EnumerateDirectories("/") and then it gets all the folders in the root. Including Volumes folder which contains shortcuts to the local drives. I'm not an expert of Berkeley System Distribution (BSD) Unix filesystems, so I can't really promise that it would work on any Mac, but this approach works on mine.
I'm still playing around with that. When I get working prototype I'll probably share it through github or something.

Windows Home Server backup solution

I admit this is not strictly a programming question, although I do use my WHS as a source repository server for home projects, and I'm guessing many other coders here do as well.
Does anyone have a recommendation for a good backup solution for the non-fileshare portion of Windows Home Server? All the WHS backups I've seen handle the fileshares, but none of the system files or other administrative stuff on the box.
Thanks,
Andy
Windows Home Server is designed to not need a backup of the OS. If your system drive fails, install a new drive, and then boot the WHS OS setup disc and install the OS. It will find the data on the other drives and recreate all the shared folders. You do need to do some configuring once it is back up but that is pretty small compared to not having to back it up.
One good solution for backing up the home server itself is to attach an external drive, say via USB 2.0 or eSATA. For this to work, though, you need the supporting software like Norton Ghost or something similar installed on your WHS server.
Windows Home Server Power Pack 1 (aka WHS PP1) added a feature to perform backups of the WHS shared folders to an external drive -- as you mention, this feature is only intended to do the data side and not the OS.
If you have an HP MediaSmart server, you could try the method mentioned in Quick & Easy Windows Home Server Backup and Restore. The author said it worked for him, but of course, caveat emptor. This technique has you creating a disk-image for your backup, and using that to restore from in the Recovery Disk / Restore disk process.
If you want a faster way to recover your OS and you do not have a Media Smart server, you can also check out these instructions on how to use a USB flash drive for installing WHS, and merge in the instructions found above for restoring a disk image vis-à-vis the OS Recovery disk process.
WHS OS backup solved by running two copies of WHS each on its own computer in a virtual machine with each WHS backing up the other (running in a VM makes the WHS a file thus able to be backed up and restored by WHS).
iDrive is Great and free under 2 gigs

Resources