Page 1 of 3 123 LastLast
Results 1 to 10 of 24

Thread: Backup of /Home

  1. #1
    Join Date
    Jul 2008
    Location
    West Wales
    Posts
    322

    Post Backup of /Home

    Hi

    I assume this is done at root su in the konsole?
    I would like to copy the whole of the /home including the hidden files

    I can use a dingle 8GB, I have the device node and the mounting point - not sure which should be used and what to put after cp?

    cp ?/home /mount/media/_BRIAN_

    should the second be the device node /dev/sdb1
    or the mountpoint /media/BRIAN_B

    Thanks
    Emachine e510 m360,Celeron 2.13GHz,Mobile Intel GL960,int.Graphics X3100,Vista & Suse 11.1, KDE3.5.
    PC running Suse 11.1, KDE3.5 with Pentium D CPU 3.00GHz,nVidia 7600GS,
    PC running XP & Suse 11.1, KDE3.5 with Pentium(R) D CPU 3.00GHz,nVidia 7600GS

  2. #2
    Join Date
    Mar 2008
    Location
    Oz
    Posts
    11,727
    Blog Entries
    2

    Default Re: Backup of /Home

    Su to get rootly powers first. Then if there exists an empty directory called _BRIANB in the directory /media -- then enter this:
    Code:
    cp -a /home/. /media/_BRIANB
    That will copy all the directories under the /home directory across to the directory _BRIANB. Note it will not reproduce the directory /home, just the directories under /home (like /jon and /henrietta etc)

    Note to include the period in /home/. because that switches on the hidden-file reader.
    Last edited by swerdna; 12-Mar-2009 at 03:11.
    Leap 42.3 & 15.1(Beta) &KDE
    FYIs from the days of yore

  3. #3
    Join Date
    Jun 2008
    Location
    Norwich, UK
    Posts
    215

    Default Re: Backup of /Home

    signetone wrote:

    >
    > Hi
    >
    > I assume this is done at root su in the konsole?
    > I would like to copy the whole of the /home including the hidden files
    >
    > I can use a dingle 8GB, I have the device node and the mounting point -
    > not sure which should be used and what to put after cp?
    >
    > cp ?/home /mount/media/_BRIAN_
    >
    > should the second be the device node /dev/sdb1
    > or the mountpoint /media/BRIAN_B
    >
    > Thanks
    >
    >


    Mount the device you are to copy to (usually /mnt) with write permissions

    # cp -a /home /mnt/_BRIAN_

    (or cp -av if you want to watch it in action)

    man cp will give you the info

    Alan



  4. #4
    Join Date
    Mar 2008
    Location
    Oz
    Posts
    11,727
    Blog Entries
    2

    Default Re: Backup of /Home

    If you want it to appear exactly in _BRIANB, including /home, then do these two commands:
    Code:
    mkdir /media/_BRIANB/home
    cp -a /home/. /media/_BRIANB/home
    Leap 42.3 & 15.1(Beta) &KDE
    FYIs from the days of yore

  5. #5
    Join Date
    Mar 2008
    Location
    Oz
    Posts
    11,727
    Blog Entries
    2

    Default Re: Backup of /Home

    The archive switch -a in the copy command is the same as switches -dpR. It preserves permissions, ownership and time stamps and also copies links.

    I keep forgetting things! Oh well, off to watch TV I think.
    Leap 42.3 & 15.1(Beta) &KDE
    FYIs from the days of yore

  6. #6
    Join Date
    Jul 2008
    Location
    West Wales
    Posts
    322

    Default Re: Backup of /Home

    Quote Originally Posted by swerdna View Post
    If you want it to appear exactly in _BRIANB, including /home, then do these two commands:
    Code:
    mkdir /media/_BRIANB/home
    cp -a /home/. /media/_BRIANB/home
    Sorry about the mistake in name of USB Device BRIAN_B_

    mkdir /media/BRIAN_B_/home
    cp -a /home/. /media/BRIAN_B_/home

    The first command worked fine.

    For the second I got many lines of feedback similar to

    cp: failed to preserve ownership for `/media/BRIAN_B_/home/./brian/bin/Script/backupscript.sh': Operation not permitted
    cp: failed to preserve ownership for `/media/BRIAN_B_/home/./brian/bin/Script': Operation not permitted
    cp: failed to preserve ownership for `/media/BRIAN_B_/home/./brian/bin/.directory': Operation not permitted
    cp: failed to preserve ownership for `/media/BRIAN_B_/home/./brian/bin/Turboprint/TURBOPRINT.TPKEY': Operation not permitted
    cp: failed to

    Any advice please

    Thanks
    Emachine e510 m360,Celeron 2.13GHz,Mobile Intel GL960,int.Graphics X3100,Vista & Suse 11.1, KDE3.5.
    PC running Suse 11.1, KDE3.5 with Pentium D CPU 3.00GHz,nVidia 7600GS,
    PC running XP & Suse 11.1, KDE3.5 with Pentium(R) D CPU 3.00GHz,nVidia 7600GS

  7. #7
    Join Date
    Mar 2008
    Location
    Oz
    Posts
    11,727
    Blog Entries
    2

    Default Re: Backup of /Home

    Just tried it myself. Works for me.

    So, let's look at the permissions aspect and the filesystems.
    First, did the usb drive automount or did you mount it yourself and if you mounted it yourself please give details of the method.

    Second, please post the dialogue you get with these commands issued in a console window:
    To check permissions on the mount:
    Code:
     ls -l /media
    To check permissions on the new home:
    Code:
    ls -l /media/_BRIANB
    To check what did get copied and the form of it:
    Code:
     ls -l /media/_BRIANB/home
    To check the filesystem that was mounted:
    Code:
     sudo /sbin/fdisk -l
    Leap 42.3 & 15.1(Beta) &KDE
    FYIs from the days of yore

  8. #8
    Join Date
    Jul 2008
    Location
    West Wales
    Posts
    322

    Default Re: Backup of /Home

    Quote Originally Posted by swerdna View Post
    Just tried it myself. Works for me.

    So, let's look at the permissions aspect and the filesystems.
    First, did the usb drive automount or did you mount it yourself and if you mounted it yourself please give details of the method.

    Second, please post the dialogue you get with these commands issued in a console window:
    To check permissions on the mount:
    Code:
     ls -l /media
    To check permissions on the new home:
    Code:
    ls -l /media/_BRIANB
    To check what did get copied and the form of it:
    Code:
     ls -l /media/_BRIANB/home
    To check the filesystem that was mounted:
    Code:
     sudo /sbin/fdisk -l
    Hi

    I am using a different dingle [8 GB]- I now realize it is not big enough anyway as the music folder is in home.
    but anyway the same thing happens with the files

    Thanks
    Emachine e510 m360,Celeron 2.13GHz,Mobile Intel GL960,int.Graphics X3100,Vista & Suse 11.1, KDE3.5.
    PC running Suse 11.1, KDE3.5 with Pentium D CPU 3.00GHz,nVidia 7600GS,
    PC running XP & Suse 11.1, KDE3.5 with Pentium(R) D CPU 3.00GHz,nVidia 7600GS

  9. #9
    Join Date
    Mar 2008
    Location
    Oz
    Posts
    11,727
    Blog Entries
    2

    Default Re: Backup of /Home

    @signetone: Here is the information you sent me:
    linux-p4d:/home/brian # ls -l /media
    total 16
    drwxr-xr-x 3 brian root 4096 1970-01-01 01:00 BRIAN_A_
    -rw-r--r-- 1 root root 179 2009-03-12 14:32 .hal-mtab
    -r-Sr----- 1 root root 0 2006-12-20 15:17 .hal-mtab-lock
    drwx------ 2 root root 4096 2007-12-18 19:20 sdb1
    linux-p4d:/home/brian #


    linux-p4d:/home/brian # ls -l /media/BRIAN_A_
    total 4
    drwxr-xr-x 4 brian root 4096 2009-03-12 14:03 home
    linux-p4d:/home/brian #

    linux-p4d:/home/brian # ls -l /media/BRIAN_A_/home
    total 8
    drwxr-xr-x 8 brian root 4096 2009-03-12 14:09 brian
    drwxr-xr-x 2 brian root 4096 2006-08-14 13:17 lost+found
    linux-p4d:/home/brian #


    linux-p4d:/home/brian # sudo /sbin/fdisk -l

    Disk /dev/sda: 320.0 GB, 320072933376 bytes
    255 heads, 63 sectors/track, 38913 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Device Boot Start End Blocks Id System
    /dev/sda1 1 262 2104483+ 82 Linux swap / Solaris
    /dev/sda2 * 263 2873 20972857+ 83 Linux
    /dev/sda3 2874 38913 289491300 83 Linux

    Disk /dev/sdb: 8065 MB, 8065646080 bytes
    8 heads, 32 sectors/track, 61535 cylinders
    Units = cylinders of 256 * 512 = 131072 bytes

    Device Boot Start End Blocks Id System
    /dev/sdb1 * 1 61536 7876591+ b W95 FAT32
    linux-p4d:/home/brian #
    I'll respond later. Distracted.
    Leap 42.3 & 15.1(Beta) &KDE
    FYIs from the days of yore

  10. #10
    Join Date
    Jan 2009
    Location
    USA Pennsylvania
    Posts
    1,287

    Smile Re: Backup of /Home

    Hi,

    I've used this when transferring my /home partition from my 120GB HD to my 250GB HD.

    EASEUS Disk Copy: Free Disk Copy, Disk Clone, Partition Copy Software. Sector by Sector for hard drive backup freeware.

    It's free. Download the .zip. Extract the .iso file and burn that to a cd. Then restart your computer and boot from cd. You choose the partition you want to copy and then the destination to copy to.

    You can also do full hard drive backups, backing up everything on the hard drive as it is.

    Since you're not booting up in linux, your computer will be rendered unusable while it's copying and transferring the data but it works.

    I've backed up to a 500GB external usb drive, with 120GB of data it took about 18 hours.

    It's a little faster when moving partitions back onto your hard drive.

    When you plug it in you can go through files just like a regular usb disk, so with the right permissions you can swap files to and from the usb disk.

    Hope this helps!
    Laptop: Dell Inspiron E1505 | OpenSUSE 12.1/Windows Vista | KDE | Intel CPU T2050 1.6 GHz | Intel 945GM | 3.2GB RAM
    Box: OpenSUSE 12.1/Windows 7 | KDE | Intel Core 2 Quad 8300 2.5GHz/core | nVidia Geforce 9500GT 1GB| 4 GB RAM

Page 1 of 3 123 LastLast

Posting Permissions

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