Results 1 to 9 of 9

Thread: What NOT to backup?

  1. #1

    Default What NOT to backup?

    I am using Lucky Backup with oS v13.1x64 KDE.
    I finally have a usb HD large enough to backup more than only my /home directory
    While backing up the entire system (full backup) I discovered the file kcore and had to abort due to it's huge size and plan to add that to my excludes list as apparently I don't need to backup that file because it is a virtual file.

    In looking for more info on what to exclude I find recommendations to exclude /sys, /dev, & /proc but I don't understand why those can be excluded.

    My question is that if I need to restore, say, due to a failed HD, if I exclude all those directories I don't see how I can get a working system restored.
    So if I need to restore should I do a fresh install and then restore things like /home, /etc, and who knows what else?

    I would like to know which directories (and/or files) I can safely not backup, or is kcore the only one I need to exclude. I know I don't need cache, temp, and that sort of thing.

    Thanks, Jon

  2. #2
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,742

    Default Re: What NOT to backup?

    All those are virtual file systems For example /proc is a window in the kernel. In Linux all things are files. /dev is a list of devices the system sees. /sys is a system related folder. These folders are all virtual and are created at run time and are not data on the disk.

  3. #3
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,742

    Default Re: What NOT to backup?

    Note also that you should have a Linux file system on the backup device to preserve the ownership permission on the file. Lucky uses rsync so you will lose permission if copying to a MS file system. Note there are other backup methods that that use tar and compressed tar in which case the permissions are saved in the tar and are thus safe on a MS formatted drive

  4. #4
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,124

    Default Re: What NOT to backup?

    Beside /home, I only backup /etc because it contains configuration files. The rest of the "system" directories is best restored by reinstalling.

    Of course when you have other places with data not in /home like databases, or web pages in /srv you should backup that also.
    Henk van Velden

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

    Default Re: What NOT to backup?

    On 2013-11-27 21:46, 6520302 wrote:

    > In looking for more info on what to exclude I find recommendations to
    > exclude /sys, /dev, & /proc but I don't understand why those can be
    > excluded.


    Because they don't really exist, they are virtual.

    Also, some chrooted services duplicate some of those directories you
    don't need to backup, somewhere in /var.

    I do the backup of the system parts as a partition image, done while the
    system is not running, ie, while running another system. Then all those
    virtual directories are empty, and in any case, it doesn't matter when
    you do an image, the size is the full size of the partition. I do it
    that way because restore is faster. Other people only backup /etc, they
    consider that installing the system again is fast enough.

    For home I use rsync.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 12.3 x86_64 "Dartmouth" at Telcontar)

  6. #6

    Default Re: What NOT to backup?

    Quote Originally Posted by gogalthorp View Post
    Note also that you should have a Linux file system on the backup device to preserve the ownership permission on the file. Lucky uses rsync so you will lose permission if copying to a MS file system. Note there are other backup methods that that use tar and compressed tar in which case the permissions are saved in the tar and are thus safe on a MS formatted drive
    Thanks everyone for the useful info, I didn't realize those directories were virtual and I will exclude those 3 specific directories from my backups.

    Replying to gogalthorp, I have formatted my usb HD to ext4 specifically because of permissions.

    As Carlos noted, in /var there is /var/lib/ntp/proc and the mount point of usb devices at /var/run/media/$USER

    Jon

  7. #7
    Join Date
    Jun 2008
    Location
    West Yorkshire, UK
    Posts
    3,450

    Default Re: What NOT to backup?

    Apart from /home, I only back up any /etc files which I have modified, a couple of non-standard fonts and mysql files because the rest is easy to reinstall (and probably quicker to reinstall than to restore from a backup).

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

    Default Re: What NOT to backup?

    On 2013-11-27 22:06, gogalthorp wrote:
    >
    > Note also that you should have a Linux file system on the backup device
    > to preserve the ownership permission on the file. Lucky uses rsync so
    > you will lose permission if copying to a MS file system. Note there are
    > other backup methods that that use tar and compressed tar in which case
    > the permissions are saved in the tar and are thus safe on a MS formatted
    > drive


    A note, though: I do not trust compressed tars as reliable backups. Just
    a one byte error, and the entire archive is lost, decompression error.

    However, I can not propose an alternative I consider safe and good
    enough. It should be a method that compresses file by file, then put
    them in a single archive. Or it could be a method that includes
    autorepair blocks. The commercial RAR application does so, but besides
    being commercial I think it does not backup/restore all the unix type
    attributes.

    I did see a backup script that was safe about a decade ago. It used cpio
    with compression by single files. But it disappeared from distribution.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 12.3 x86_64 "Dartmouth" at Telcontar)

  9. #9
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,124

    Default Re: What NOT to backup?

    Quote Originally Posted by 6520302 View Post
    and the mount point of usb devices at /var/run/media/$USER

    Jon
    That one is also vulnarable. It is created at device connection. And /var/run is also a a tmpfs. Use
    Code:
    mount
    to see what is not mounted not having one of the physical file system types you already know..
    Henk van Velden

Posting Permissions

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