Ideally, /home
should be on a separate partition. Then, when you install, specify your partitions manually. Set up your home partition to live at /home
and make sure you don't format it. Then, you should have everything set up fine.
If you don't have a separate partition, you can use GParted to resize your partition and create a /home partition (which should usually be the largest partition) as ext4 or ext3. Then, copy everything in /home
to the new partition and set up fstab
.
# Assuming that the new partition has been created
# and formatted as ext4 and is known as /dev/sda2.
sudo mount /dev/sda2 /mnt
sudo cp -av /home/* /mnt # The -a option is really important here; if you forget it, things will break.
# Verify that everything was copied correctly; then...
cd /home # Make sure that nothing is using your home directory--not even the current working directory.
sudo rm -r /home/*
sudo umount /mnt && sudo mount /dev/sda2 /home
Then, add the following line to /etc/fstab
:
/dev/sda2 /home ext4 relatime 0 2
Here is how I would proceed.
If you want to try to manually recover, boot the ubuntu live CD and update everything
sudo apt-get update && sudo apt-get -y dist-upgrade
You then mount your ubuntu partition at /mnt
sudo -i
mount /dev/sdxy /mnt
You can the copy /etc to /mnt/etc
cp -Raf /etc /mnt
You will then need to manually edit /mnt/etc/passwd
and /mnt/etc/group
and /mnt/etc/sudoers
The format should be easy enough to understand from existing entries, but if not ask. Make sure your user is in the admin group.
Add in your user to those files ^^
Then chroot
sudo chroot /mnt
And set your user password
passwd your_user
You also need to update /mnt/etc/fstab
, define your root partition and swap. You can use the live CD as a template for most of the entries.
reboot and hope it works.
If not, boot the live CD and back up your data to a flash driver or alternate partition and re-install.
Best of luck
Best Answer
It's in the directory where you ran the command:
If you did
rsync .thunderbird user@host:
and notrsync .thunderbird user@host
(note the:
), then the directory was copied to the home directory ofuser
onhost
(so/home/user
would usually be redundant inuser@host:/home/user
). Without the:
, the second argument is just the path to a target directory on the local system.The same applies to
scp
.Note that
rsync
does not delete source files unless you tell it to. So.thunderbird
is still where it was, and a new copy is made wherever it was copied to.Also note that
rsync
has different behaviour based on whether the source directory had a trailing/
. These two are different:In the first case, the
.thunderbird
directory is copiedsomewhere
, but in the second case, the contents of.thunderbird
are copied (so you won't seesomewhere/.thunderbird
, but if there was a.thunderbird/foo
, you'd seesomewhere/foo
instead ofsomewhere/.thunderbird/foo
).