til-jmac / tableau-server-housekeeping Goto Github PK
View Code? Open in Web Editor NEWScripts to keep your Tableau Server backed up, neat, and tidy
Scripts to keep your Tableau Server backed up, neat, and tidy
Hi. Great job. Thanks.
I implemented it for my Tableau Server maintenance routine.
Suggestion: Cleanup section in the beginning of the script. Tableau recommends to clean up logs and temporary files before backing up to keep data files size smaller. Backup runs faster.
There are some minor errors I have corrected in my version:
1 - In the tsm maintenance backup command, the $backupname should be $backup_name.
2 - There is missing "echo" word command in the else statements when "found, deleting..." (both else statements).
Thanks for sharing.
We need to change the log-archives script zip format to .json format Can you please help on it
cd../../../../../../..
cd C:\Windows\System32\cmd.exe
cd ../..
cd C:\ProgramData\Tableau\Tableau Server\data\tabsvc\files\log-archives
tsm maintenance ziplogs -f archievedlogs -d -u -p
exit
I would change the line
sudo chmod +x /var/opt/tableau/tableau_server/data/scripts/tableau-server-housekeeping.sh
to
sudo chmod 700 /var/opt/tableau/tableau_server/data/scripts/tableau-server-housekeeping.sh
because of the cleartext password in the schript.
It will be very useful if you could add email notification with the status of Clean up logs and Bakcup.
In /tableau-server-housekeeping/windows/2019.2 and later/tableau-server-backup-script.cmd you look to have removed the command line options for tsm username and password. There is however still one occurrence in the script that is looking for these and this is causing the script to error and partially fail:
:: Grab the location of the backup directory
:set_backup_dir
ECHO %date% %time% : Getting the location of the default backup directory
FOR /F "tokens=* USEBACKQ" %%F IN (tsm configuration get -k basefilepath.backuprestore -u %tsmadmin% -p %tsmpassword%
) DO (SET "backuppath=%%F")
ECHO The default backup path is:
ECHO %backuppath%
If you remove the -u %tsmadmin% -p %tsmpassword% from the script all then works correctly.
inside files
For example, to schedule it to run once a day at 01:00, add this to your crontab
0 1 * * * /var/opt/tableau/tableau_server/scripts/tableau-server-housekeeping-linux.sh > /home//tableau-server-housekeeping.log
but files names:
tableau-server-backup.bash
tableau-server-logs-cleanup.bash
copy pasted that to cron and looking why it didn't works)
the -v switch in the tsm maintenance cleanup call appears to be removed.
/linux/tableau-server-backup.bash
You define copy_backup="no"
but in
#copy backups to different location (optional)
if [ "$copybackup" == "yes" ];
you're missing the "_"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.