Results 1 to 2 of 2

Thread: Backup to tar the updated files ONLY

  1. #1
    Join Date
    Sep 2008
    Yangon, Myanmar
    Ubuntu 10.10 Maverick Meerkat

    Question Backup to tar the updated files ONLY

    In this post mdpalow wrote that it's possible to "copy updated files to another drive using tar".

    I use tar to take daily backups of some of my files but when I run the below command it's still copying all the files to the tar again.

    sudo tar uvpf /media/BACKUP-1/backupFLASHDRIVE.tar /media/FLASHDRIVE
    Could you please tell me what I'm doing wrong and explain how, when my backup runs, I can get it to only copy the updated files?

  2. #2
    Join Date
    Mar 2008
    Ubuntu 9.10 Karmic Koala

    Re: Backup to tar the updated files ONLY

    The tar command "tar uvpf" uses the update flag. According to
    ‘--update’ (‘-u’) is not suitable for performing backups for two reasons: it does not change directory content entries, and it lengthens the archive every time it is used.
    To do incremental backups with tar, see
    (in particular, section 5.2)

    However, I wonder if a different tool such as rsync might be easier to use.
    For example,
    rsync -a /media/FLASHDRIVE/ /media/BACKUP-1
    would copy all files from /media/FLASHDRIVE/ to /media/BACKUP-1.
    One subsequent runs only files that have changed will get transferred.

Tags for this Thread


Posting Permissions

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