Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I just upgraded from ~10.10 (it was stuck, un-upgradeable) to 12.04 by installing over the top of the existing installation.

The home folder and desktop files all seem to still be present, as expected, but the /var/www directory is gone!

A file system search doesn't turn anything up, looking for "www".

Apache doesn't seem to be installed anymore either.

Does the installer really delete the entire folder?

Output of fdisk -l:

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00032a24

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63   964622924   482311431   83  Linux
/dev/sda2       964622925   976768064     6072570    5  Extended
/dev/sda5       964622988   976768064     6072538+  82  Linux swap / Solaris

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x34e85825

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1              63  1953520064   976760001   fd  Linux raid autodetect

Disk /dev/sdg: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0b366f5b

   Device Boot      Start         End      Blocks   Id  System
/dev/sdg1              63  1953520064   976760001   fd  Linux raid autodetect

Output of df -h: (temporarily mounted in the 12.04 live cd)

Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       457G   77G  358G  18% /media/500GB

Using some of the file system tools (debugfs, extundelete, ext2grep) I can see the deleted www directory. However, it looks like that deletion combined with the operating system upgrade ruined any chances of recovering the directory.

share|improve this question
1  
Please add the output of sudo fdisk -l, mount and df -h. –  Eric Carvalho Jul 18 '12 at 2:12

1 Answer 1

up vote 3 down vote accepted

Sure, installing over an existing installation will preserve your home folder and settings, but everything outside it will be wiped out and installed anew. That's the difference between installation and upgrade. After install you'll have a default set of applications with default settings, that's why Apache is not installed.

In fact, even preserving the home folder is a relatively new feature of Ubuntu installer...

share|improve this answer
    
That's disappointing, tons of lost information. The computer had quit booting so I thought this would be an easy fix. Do you happen to know if I change /var/www to be a sym link to the raid array, would a future scenario just delete the sym link or would it also delete the linked directories/files? –  paulcsf Jul 18 '12 at 4:12
    
It should only delete the symlink - if it links to a separate partition that you don't set up as part of the install procedure. But if you wanted to preserve Apache and its settings, why not do an upgrade instead of a reinstall? I'm assuming you had your reasons. –  neon_overload Jul 18 '12 at 4:15
    
I don't think it gave me an upgrade option, I think it was install over the top, side-by-side, or format the disk. The system needed a fresh install, I don't mind the programs(Apache), but I wish I had known that keeping files only applied to the home directory. –  paulcsf Jul 18 '12 at 4:19
    
The reason for that is that on a desktop system users are not supposed to have stuff outside their home directories, so everything outside of /home belongs to the system and is presumed to be safe to delete –  Sergey Jul 18 '12 at 4:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.