[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Confusion about including and excluding files in tarsnap.conf versus the command line

Hi there,

Just signed up and put $50 in my account (sorry, did $35 then $15
because I forgot to account for upload *and* storage costs), but I'm
stuck. Yesterday I did eventually calculate my expected usage using the
--dry-run parameter, but only by running a series of discrete commands
(e.g., tarsnap --dry-run --print-stats --humanize-numbers
-c /media/USER/PATH
--exclude /media/USER/PATH/.Trash-1000 /media/USER/PATH/lost
+found /media/USER/PATH/OTHER-EXCLUDED-DIRECTORY) on the paths I wanted
to back up. I could not figure out a way to run one command and have
tarsnap read /etc/tarsnap.conf to get my list of included and excluded

So here I am today and now wanting to run my first real back-up and I'm
stuck on the same problem. The information in step 1A at
http://www.tarsnap.com/simple-usage.html still seems to require me to
put my list of included and excluded paths on the command line. Why is
this? Why doesn't tarsnap just get the list from tarsnap.conf?

I don't mind if that's just the way it's done, but then I'm confused
about why there are options in tarsnap.conf to include and exclude

To make it clear how my system is set up, my tarsnap.conf contains the
following lines:

exclude /media/USER/PATH/.Trash-1000
exclude /media/USER/PATH/lost+found
exclude /media/USER/PATH/_hold

include /media/USER/PATH
include /home/USER
include /etc
include /opt

(/media/USER/PATH is where my spinning rust is mounted. In effect it's
my "home" directory, where 99.9% of my data is stored. I don't store
most stuff on the SSD [ / ] where the OS is installed and where my real
"home" directory is located.)

So is this really the full command I need to put in my tarsnap-backup.sh

/usr/local/bin/tarsnap -c \
	-f "$(uname -n)-$(date +%Y-%m-%d_%H-%M-%S)" \
	/media/USER/PATH \
	--exclude /media/USER/PATH/.Trash-1000 \
	/media/USER/PATH/lost+found \
	/media/USER/PATH/_hold \
	--include /home/USER /etc /opt