0

I use incremental backup using

tar --create --file=/home/blueray/Documents/backup/dest/$(date +%Y-%m-%d-%H-%M-%S).tar --listed-incremental=/home/blueray/Documents/backup/dest/usr.snar /home/blueray/Documents/backup/src

But the problem is,

  1. it create too many .tar files as i backup multiple times a day. For example 2021-11-23-23-34-38.tar, 2021-11-23-23-34-43.tar . I am not understanding whether to merge or delete older tar files.

  2. How will I extract the tar files with minimum effort (expected a single command).

  3. Find a specific file to extract.

What can be the solution for this problem.

Is it even worth investing time in tar , given my requirements?

1
  1. It is normal to have a multiple backup version, if you delete the old tar file you can not extract/restore from it anymore.

  2. in order to extract you can issue the below command:

    tar --extract --verbose --verbose --listed-incremental=/dev/null --file=2021-11-23-23-34-38.tar
    

    I suppose here you want to restore from the file " 2021-11-23-23-34-38.tar "

  3. Regarding your 3rd point in order to find a specific file to extract you can list

    tar --list --verbose --verbose --listed-incremental=/home/blueray/Documents/backup/dest/usr.snar --file=2021-11-23-23-34-38.tar
    
New contributor
Ahmed Taha Hagag is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
2
  • In case of 2. will it extract just 2021-11-23-23-34-38.tar or all the files related to usr.snar?
    – blueray
    Nov 24 at 14:04
  • it will restor what was in 2021-11-23-23-34-38.tar only , that is why you have many multiple version from this incremental backup. Nov 26 at 14:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.