Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: backup home

  1. #1
    Join Date
    Jun 2008
    Location
    Canada
    Posts
    436

    Default backup home

    hi

    i search a way to backup my home to external hd (want to reformat my hd), format to ext4, restore backup

    what do you suggest me?

    thanks

  2. #2
    Join Date
    Jun 2008
    Location
    The English Lake District. UK - GMT/BST
    Posts
    36,734
    Blog Entries
    20

    Default Re: backup home

    If /home is on it's own partition you could use 'dd' to clone it from one to another
    Leap 15.1_KDE
    My Articles Was I any help? If yes: Click the star below

  3. #3
    Join Date
    Jan 2009
    Location
    Somewhere in Fictionland
    Posts
    1,479

    Default Re: backup home

    In alternative in this thread I did explain an other method to do it (always if /home is on a separate partition. However one can rewrite this to /home on the same partition, let me know in case).
    Just "clicking away" security warnings about a change in repo signature ? Not able to control?
    Then please vote for
    https://features.opensuse.org/312047
    openSUSE should have an efficient web of trust.

  4. #4
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: backup home

    On 2012-02-17 21:56, collinm wrote:

    > i search a way to backup my home to external hd (want to reformat my
    > hd), format to ext4, restore backup
    >
    > what do you suggest me?


    One of may ways:

    Code:
    rsync  --archive --acls --xattrs --hard-links --del --stats
    --human-readable --exclude=/lost+found   \
    /home /newhome
    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.4 x86_64 "Celadon" at Telcontar)

  5. #5
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,869
    Blog Entries
    3

    Default Re: backup home

    When I needed to do that, I logged out, then logged in as root at a virtual terminal (use CTRL-ALT-F1 for that).
    Code:
    cd /
    tar zcf /path/to/external/homestuff.tgz home
    where "/path/to/external" would usually be something like "/media/12345678/unix". Here, the drive is automounted to somewhere under "/media", and I create a "unix" directory for unix backups.

    To restore, mount the external disk in the same way.
    Make sure that "/home" is formatted as needed, and mounted. Then:
    Code:
    tar zxpf /path/to/external/homestuff.tgz
    I most recently did this when I switched to encrypting "/home".
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

  6. #6
    Join Date
    Jan 2009
    Location
    Somewhere in Fictionland
    Posts
    1,479

    Default Re: backup home

    Quote Originally Posted by nrickert View Post
    When I needed to do that, I logged out, then logged in as root at a virtual terminal (use CTRL-ALT-F1 for that).
    Code:
    cd /
    tar zcf /path/to/external/homestuff.tgz home
    where "/path/to/external" would usually be something like "/media/12345678/unix". Here, the drive is automounted to somewhere under "/media", and I create a "unix" directory for unix backups.

    To restore, mount the external disk in the same way.
    Make sure that "/home" is formatted as needed, and mounted. Then:
    Code:
    tar zxpf /path/to/external/homestuff.tgz
    I most recently did this when I switched to encrypting "/home".
    Hi, this is quite interesting. How much does the compression save in ratio compared to a "cp -ax" cloning? Does this completely preserve everything of /home? How much does this raise the time for a complete "backup" compared to non compressing? Compression can be a valid solution if the backupmedium is smaller than the /home. This is actually often the case with me, since I am "recycling" former HDD of notebooks as 2.5 external backup disks. Thank you for sharing this.

    @Carlos: rsync: does rsync support compression? For what I know, it doesn't. But you seem to know a lot more about rsync than me. :-)
    I usually avoid rsync because as you have seen the parameters are many and therefore I feel this procedure be prone to error by omission. I am using on a regular basis "lucky backup" however, which is nothing else than a GUI for rsync.
    Just "clicking away" security warnings about a change in repo signature ? Not able to control?
    Then please vote for
    https://features.opensuse.org/312047
    openSUSE should have an efficient web of trust.

  7. #7
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: backup home

    On 2012-02-18 09:36, stakanov wrote:

    > Hi, this is quite interesting. How much does the compression save in
    > ratio compared to a "cp -ax" cloning?


    Depends on what you have at home. Photos, videos, openoffice files:
    nothing, they are already compressed. Plain text files, can be 50%.

    > Does this completely preserve
    > everything of /home?


    There was a howto at the LDP that discussed this subject a lot.

    Hard-Disk-Upgrade, Hard Disk Upgrade Mini HOWTO
    <http://tldp.org/HOWTO/Hard-Disk-Upgrade/index.html>

    > How much does this raise the time for a complete
    > "backup" compared to non compressing?


    Again, depends on what you compress and the ratio you request. With -9 and
    video files, pretty slow.


    > @Carlos: rsync: does rsync support compression? For what I know, it
    > doesn't. But you seem to know a lot more about rsync than me. :-)


    No, it doesn't. I would love it did.

    I would also love having a compressed R/W filesystem in Linux, but we don't
    have it. The feature was prepared for ext3, but was not developed. many
    devs think it is not needed, disk space is cheap (or was, the factoriess
    were flooded and prices have soared) - but then, NTFS (windows) has it.

    > I usually avoid rsync because as you have seen the parameters are many
    > and therefore I feel this procedure be prone to error by omission.


    Ha! Do you think I know all those parameters from memory? I have a cheat
    sheet ;-)
    Or I do my own backup scripts.

    > I am
    > using on a regular basis "lucky backup" however, which is nothing else
    > than a GUI for rsync.


    I haven't tried that one, but there are several. One feature they have is
    that you can have several backup directories, dated. If a file doesn't
    change, the new directory contains a hardlink to the previous copy, so that
    it saves a lot of space.

    I have a list of backup programs:

    amanda
    dar
    rdiff-backup current copy is a mirror, old one is rdif.
    rsnapshot current copy is a mirror, old ones hardlinks and
    new files. Or the other way round.
    gadmin-rsync?
    http://www.dirvish.org/
    pdumpfs (http://0xcc.net/pdumpfs)
    duplicity
    duply
    Back-In-Time (http://backintime.le-web.org/)
    LuckyBackup


    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.4 x86_64 "Celadon" at Telcontar)

  8. #8
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,869
    Blog Entries
    3

    Default Re: backup home

    Quote Originally Posted by stakanov View Post
    Hi, this is quite interesting. How much does the compression save in ratio compared to a "cp -ax" cloning?
    I use tar, because I am backing up to an NTFS disk. Using tar preserves stuff that NTFS can't handle.

    As for the compression - I haven't timed it, but my guess is that there is no serious time cost. The compression reduces the amount of data that has to be sent over the USB link, which is probably slower than internal disk speeds. Most of the time cost of compression should be recovered in the time saved for data transmission.

    On 'rsync' - if you are doing that over ssh, then you can turn on compression of the ssh link.
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

  9. #9
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: backup home

    On 2012-02-18 15:16, nrickert wrote:
    >
    > stakanov;2441211 Wrote:
    >> Hi, this is quite interesting. How much does the compression save in
    >> ratio compared to a "cp -ax" cloning?

    >
    > I use tar, because I am backing up to an NTFS disk. Using tar
    > preserves stuff that NTFS can't handle.


    I forgot to say, that a single error in the tarred gzip, and you loose the
    entire archive. Unrecoverable.

    > On 'rsync' - if you are doing that over ssh, then you can turn on
    > compression of the ssh link.


    The transmission, yes, can be compressed. The stored files on destination
    are not.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.4 x86_64 "Celadon" at Telcontar)

  10. #10
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,869
    Blog Entries
    3

    Default Re: backup home

    Quote Originally Posted by robin_listas View Post
    I forgot to say, that a single error in the tarred gzip, and you loose the
    entire archive. Unrecoverable.
    True, though it has never happened to me.

    I always have other slightly older backups that I can use in case of such a disaster.
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

Page 1 of 2 12 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
  •