Upfrading from Ubuntu 14.03 to Ubuntu 16.0

Ralf Mardorf silver.bullet at zoho.com
Sat Jul 30 03:49:59 UTC 2016


On Sat, 30 Jul 2016 12:54:22 +1000, Peter wrote:
>Sorry to be generating so much traffic but at over 80 I find it hard
>to grasp some of the concepts.

No problem.

If I understand correctly you get access to some data and you want to
make a backup. So lets start with this.

1. Open a terminal.
2. Run

  ls -Gg /home/

It will show you something similar to

  drwxr-xr-x  27  4096 Jul 25 20:01 peter
  drwxr-x--- 123 12288 Jul 29 00:34 perhaps_another_home

You most likely have a tool that can auto-mount devices, IOW, if you
e.g. connect an USB backup drive it will automatically get mounted to

  /media/mount_point/ or /media/$USER/mount_point/
  or /run/media/$USER/mount_point/

I don't use those tools and so I don't know what Ubuntu does provide by
default. Regarding a http://askubuntu.com page it's

  /media/$USER/mount_point/

To copy your data run

  sudo mkdir /media/$USER/mount_point/home_$(date "+%Y%m%d").bak

to create a directory for the backup.

$(date "+%Y%m%d") adds the date to the directory name

Then copy the data by running
 
  sudo cp -pri /home/peter/ /media/$USER/mount_point/home_$(date "+%Y%m%d").bak/

For example, but without the path to the mount point, since no backup
drive is attached to my machine:

[rocketmouse at archlinux ~]$ ls -Gg /home/
total 20
drwx------   2  4096 May 30  2015 mary_jane_doe
drwxrwx---  15  4096 Jul 19  2015 music
drwxr-x--- 123 12288 Jul 29 00:34 rocketmouse

[rocketmouse at archlinux ~]$ sudo mkdir /tmp/home_$(date "+%Y%m%d").bak

[rocketmouse at archlinux ~]$ ls -Gg /tmp/
drwxr-xr-x 2 40 Jul 30 05:41 home_20160730.bak

[rocketmouse at archlinux ~]$ ls -Gg /tmp/home_20160730.bak/
total 0

[rocketmouse at archlinux ~]$ sudo cp -pri /home/mary_jane_doe/ /tmp/home_$(date "+%Y%m%d").bak/

resp. it's the same as running

[rocketmouse at archlinux ~]$ sudo cp -pri /home/mary_jane_doe/ /tmp/home_20160730.bak/

[rocketmouse at archlinux ~]$ ls -Gg /tmp/home_20160730.bak/
total 0
drwx------ 2 120 May 30  2015 mary_jane_doe

Regards,
Ralf




More information about the ubuntu-users mailing list