1

Looks like my backup script it's excluding all the directories I've specified except for one /var/backups which contains the tar file just created with the script. What am I doing wrong?

I've already followed the suggestions in this post.

Here's my script:

tar -zcpf /var/backups/"full_system_backup_$(date +%Y%m%d_%H%M%S).tar.gz" --directory=/ --exclude=/var/backups --exclude=proc --exclude=sys --exclude=dev/pts .
Rui F Ribeiro
  • 56,709
  • 26
  • 150
  • 232

1 Answers1

1

The entry --exclude=/var/backups should read --exclude=var/backups to match the pattern expected by tar