If like me you just learned bareos and tested around a little, and you are now ready for production, follow the stept below to clear your bareos setup and you can start from scratch without having to reconfigure.
Reset Bareos (delete storage and clear database):
Stop all Deamons:
service bareos-dir stop
service bareos-fd stop
service bareos-sd stop
Remove all files:
rm -Rf /var/lib/bareos/storage/
rm /var/lib/bareos/*
Drop database
cd /usr/lib/bareos/scripts
./drop_bareos_database
Create database
./create_bareos_database
./make_bareos_tables
./grant_bareos_privileges
Restart services
service bareos-dir start
service bareos-sd start
service bareos-fd start
Deze reactie is verwijderd door de auteur.
BeantwoordenVerwijderenDoes this work with Bareos 16.2 since somee change where added?
BeantwoordenVerwijderenThanks!
Hi Stacey, This indeed works with Bareos 16.2 as well.
BeantwoordenVerwijderenDo please note that the storage directory's in his example might be different from your storage. Basicly these commands delete all databases and rebuild them from scratch. And you need to delete all previously created volumes as well to prevent any errors later on. Success!
For dropping and creating database - For me root had no privileges so first su - postgres
BeantwoordenVerwijderen