I'm pretty much a newbie at scripts. I redid the backup script for my OS drive. And I wanted to try using a function for the final "dumping", because it's used a number of times for different scenarios. Well, it won't work and I don't know why. I'm sure it's something stupid. :\
This is the piece giving me trouble:
And I call it with a simple "dump" near the end. But get this:
What does it mean? It isn't the commands, I use them all the time. The file even shows up, formatted correctly on the network drive I mount on /backup. But it errors out after that.
This is the piece giving me trouble:
Code:
# Dump
DIR="/backup/weekly.dump"
DATE=$(date +"%m-%d-%Y")
dump() {
echo "---> Dumping UFS (/) filesystem..."; echo
dump -0Lauf - /dev/ad4s1a | gzip > $DIR/root_$DATE.dump.gz
}
And I call it with a simple "dump" near the end. But get this:
Code:
---> Dumping UFS (/) filesystem...
./freebsd-backup: Cannot fork: Resource temporarily unavailable
./freebsd-backup: Cannot fork: Resource temporarily unavailable
What does it mean? It isn't the commands, I use them all the time. The file even shows up, formatted correctly on the network drive I mount on /backup. But it errors out after that.