This might do better at StackExchange but I use Ubuntu as my file server.
So I'm trying to use tar
and gzip
to only backup the last 6 months of changes on my file server and it isn't working. It doesn't gzip
anything, it puts the tar file in the same directory as the script(not what i want), and it changes the name of the file to part of the tar string.
Here is the script:
#!/bin/bash
tod=$(date +%F_%H%M%S)
echo "start"
echo $tod
echo "testing tar, only the last 6 months"
tar -cvf--newer-mtime=08-11-2013 /homedepot/yellowsolo/xz/6months/xz$tod-last6months.tar /homedepot/yellowsolo/xz/official/official /homedepot/yellowsolo/xz/home/home
echo "now zipping"
gzip /homedepot/yellowsolo/xz/6months/xz$tod-last6months.tar.gz
echo $tod
echo "done"
exit
Thanks in advance
rsync
everything from another server to this one to archive it.