Created
January 6, 2023 23:30
-
-
Save BrianAker/d31d844320d9db6530ff4f66fd89a876 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| FILENAME="`hostname -s`-`cut -d' ' -f1 /etc/version`-`date +%Y%m%d`.db" | |
| #echo $FILENAME | |
| cp /data/freenas-v1.db /mnt/data/truenas/$FILENAME | |
| echo "Backup $FILENAME created" | |
| find /mnt/data/truenas/NAS-?-TrueNAS-*.db -mtime +365 -exec rm {} \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment