restoring files ext2 linux

Posted on 2004-11-02
Last Modified: 2010-04-20
Hi there,
I had a crash on a computer and I had a backup made with webmin backup, I was able to restore almost all the files, but in some directories, when I do a restore , only the directories were restored but not the files, I checked the back file and those files are there, what command should I use to force the restore of the files as well?

thanks for your time
Question by:rcinformatica
    LVL 38

    Expert Comment


       First,  use "df -k" to check the disk space left. Make sure the partition you try to restore to have enough space.

       Umount the filesystem which you have problem to restore. And run "fsck" on the umounted filesystem to fix the filesystem
    problem if there is any.

       Then restore again.

       If it still fails, then retore to other directory and copy back to the origianl directory.


    Author Comment

    hi thanks for the answer, I cheked with df -k and there is 40gb free, could you tell me how can I unmount the filesystem and run fsck?

    thanks again
    LVL 38

    Accepted Solution


      Say the mount point is /home, login as root and do
    # umount /home    (If the device busy, do "fuser -uk /home" and umount it again)

      Then do
    # fsck /home  (you may use option "-y" for fsck)
       Type "y" when fsck prompt for fix.


    Author Comment

    Hi thnks
    I checked the file system with fsck and foud a couple of errors and fixed, I tried again to restore to other directories, and it does restore almost all the files and dirs, but some files it changes owner to the user and some others does not and the dir  belong to root, and in the dirs that belong to root it still does not copy the files but only create directories, beside even in the files that are restored I cannot get access with http and apache and it says Forbidden

    thanks very much for your help I need to have the server running asap......

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    In my business, I use the LTS (Long Term Support) versions of Linux. My workstations do real work, and so I rarely have the patience to deal with silly problems caused by an upgraded kernel that had experimental software on it to begin with from a r…
    The purpose of this article is to demonstrate how we can use conditional statements using Python.
    Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now