Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8460301
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T13:34:09+00:00 2026-06-10T13:34:09+00:00

I wanted to make an incremental backup with tar. I have made a full

  • 0

I wanted to make an incremental backup with tar.
I have made a full backup on 2012-04-08 and later I wanted to backup all files created or changed after that date.

So I did something like this:

cd /directory/I/wanted/to/back/up
tar --newer 2012-04-08 -cvnf "/backup/dir/$(date +%F).tar"

After a while I realised that tar is archiving files that I know have not changed since last backup. I checked their modification dates and they should not be included.

I coudn’t believe it so I made a little test:

cd ~
mkdir test
cd test
touch -t 201101010000 OLD
touch NEW
cd ..
tar -N 2012-01-01 -cvf test.tar ./test/*
tar -tf test.tar
ls -o ./test/

It clearly seems that tar is ignoring the -N, –newer and –after-date options. It has archived both files, even though the one I named OLD was created with a timestamp before 2012.

How can I help myself with this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T13:34:10+00:00Added an answer on June 10, 2026 at 1:34 pm

    Your date format must be

    tar --newer 20120408
    

    for newer files than Apr 8, 2012. No “-“!

    Or you can use

    TWODAYSAGO=`(date --date '2 days ago' --rfc-3339=seconds)`
    tar -cz  --newer-mtime="${TWODAYSAGO}"  -f bakfile.tgz  /dir_to_backup
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wanted to make a simple chart of users that have been created in
I wanted to make a generator that created files (and directories, etc...) based on
I wanted to make a option class, where you could load all preferences of
I wanted to make this script work somehow, but i find that after you
I have make Some Differential Backup for a Database, which will take the Backup
I wanted to make a dictionary using BST but I did not have any
I wanted to make a lazy list in Scheme. This is what I have
I wanted to make a vb.net version of this trick used to hide files
I wanted to make a Java based web crawler for an experiment. I heard
I wanted to make a JOptionPane.showOptionDialog with some JTextArea and JLabel . The problem

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.