Posted By

brm on 06/16/15


Tagged

backup tar


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

brm


Tar backup file 1 day before


 / Published in: Bash
 

Script using tar to backup new file created 1 day before

  1. #!/bin/sh
  2.  
  3. YESTERDAY='date +%D -date=-1day'
  4. ( cd /dir/ && tar --create --file=- --newer=$YESTERDAY . ) | ( cd /dest_dir/ && tar xvpf - )

Report this snippet  

You need to login to post a comment.