Posts Tagged ‘tar’

Backup newly modified files

My server backups over 20GB files everyday. It takes hours to tar those huge amount of files. I think this kind of stupid task is harmful to hard driver. One more stupid issue is that over 99% of files are not modified since last backup. So, here is the command to let me backup newly modified files only.

tar -zcvf /save/to/file.tar /filePath/* –newer-mtime ‘1 days ago’

You may want to change “1 days ago” to 2 days, or 5 days.

By the way, it’s better to do full backup monthly or bi-monthly. :)

  • Share/Save/Bookmark