Results 1 to 4 of 4

Thread: deleted file from samba share

  1. #1
    Join Date
    Jul 2007
    Beans
    239
    Distro
    Kubuntu

    deleted file from samba share

    I posted this thread in the beginners thread but with no feedback so I'll give it a shot here, a user has deleted some folders off a samba share. Is there some form of trash folder where the files go. I do not make backups of these folders but it would be nice to be able to get them back.

    Thanks
    AMD X2 3800+ ATI X1600 running 7.10 64bit

  2. #2
    Join Date
    May 2008
    Location
    Eugene, OR, USA
    Beans
    435

    Re: deleted file from samba share

    There is no trash folder; the files have been deleted.

    However, you may be able to use a forensic tool like foremost to recover some of the deleted files (foremost is in the repositories and you can install it via Synaptic or "sudo apt-get install foremost").

    You can read the manual page once you install the package, but a typical command line would be:

    Code:
    foremost -vd -t all /dev/sda1
    "-v" means "be verbose" so that the program tells you what it's doing
    "-d" means follow indirect block pointers (a MUST for Unix file systems)
    "-t all" means look for all file types that foremost recognizes (see the manual page if you want to look for specific file types)
    "/dev/sda1" is the name of the file system you want foremost to search through-- this may be different on your machine

    I should warn you that even if foremost is able to recover the data, it won't be able to recover the original file names. So you'll end up having to look at the all recovered files in order to figure out what they are and whether you want them or not.
    Hal Pomeranz, Deer Run Associates
    [[ Various Linux/Unix related documents ]]
    [[ Command-Line Kung Fu blog ]]

  3. #3
    Join Date
    Jul 2007
    Beans
    239
    Distro
    Kubuntu

    Re: deleted file from samba share

    Ok, great thanks for the advice like I said the files weren't that important or else I would of made back ups. So I think I'll just cut my loses.

    Is there a way to implement a trash on samba shares then maybe just run a weekly script to empty the trash ??

    Thanks again.

    Quote Originally Posted by HalPomeranz View Post
    There is no trash folder; the files have been deleted.

    However, you may be able to use a forensic tool like foremost to recover some of the deleted files (foremost is in the repositories and you can install it via Synaptic or "sudo apt-get install foremost").

    You can read the manual page once you install the package, but a typical command line would be:

    Code:
    foremost -vd -t all /dev/sda1
    "-v" means "be verbose" so that the program tells you what it's doing
    "-d" means follow indirect block pointers (a MUST for Unix file systems)
    "-t all" means look for all file types that foremost recognizes (see the manual page if you want to look for specific file types)
    "/dev/sda1" is the name of the file system you want foremost to search through-- this may be different on your machine

    I should warn you that even if foremost is able to recover the data, it won't be able to recover the original file names. So you'll end up having to look at the all recovered files in order to figure out what they are and whether you want them or not.
    AMD X2 3800+ ATI X1600 running 7.10 64bit

  4. #4
    Join Date
    May 2008
    Location
    Eugene, OR, USA
    Beans
    435

    Re: deleted file from samba share

    Quote Originally Posted by guilly View Post
    Is there a way to implement a trash on samba shares then maybe just run a weekly script to empty the trash ??
    Apparently there is a way to do this, although I've never personally implemented it:

    http://www.techiesabode.com/show/sho....php?tip_id=20
    Hal Pomeranz, Deer Run Associates
    [[ Various Linux/Unix related documents ]]
    [[ Command-Line Kung Fu blog ]]

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •