Results 1 to 5 of 5

Thread: How to check for 0 bytes and corrupt files before backup

  1. #1
    Join Date
    Jan 2011
    Beans
    9

    How to check for 0 bytes and corrupt files before backup

    Hi all,
    I would like to know what is the best way to check my hard drive for corrupt and 0 bytes files before backing it up with Déjà Dup. I had troubles with some documents getting completely blank (meaning file size = 0 bytes) after an online sync and want to prevent them (or other corrupt files) from being written over my existing backup.
    Thank you in advance!

  2. #2
    Join Date
    Feb 2013
    Beans
    Hidden!

    Re: How to check for 0 bytes and corrupt files before backup

    Put any directory you like instead of /home
    Code:
    find /home -size 0 -type f

  3. #3
    Join Date
    Jan 2011
    Beans
    9

    Re: How to check for 0 bytes and corrupt files before backup

    Thanks! and what about corrupt files?

  4. #4
    Join Date
    Nov 2011
    Location
    /dev/root
    Beans
    Hidden!

    Re: How to check for 0 bytes and corrupt files before backup

    Quote Originally Posted by looreenzoo View Post
    Thanks! and what about corrupt files?
    If it is an ext file system, you can check it before backing up. Unmount the partition, and run

    Code:
    sudo e2fsck -f /dev/sdxy
    where x is the drive letter and y is the partition number.

    Edit: Another and simpler way would be to run md5sum on all the candidate files to be backed up. Probably md5sum won't succeed with corrupted files.
    Last edited by sudodus; February 15th, 2013 at 03:43 PM.

  5. #5
    Join Date
    Jan 2011
    Beans
    9

    Re: How to check for 0 bytes and corrupt files before backup

    Thank you!

Tags for this Thread

Bookmarks

Posting Permissions

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