Skip to main content

#Copy0 diskutieren mit

We would like to split the data files into a data folder and the log files into a log folder. 

 

if this is the default location for data files and log files, can we change it?

opt/tableau/tableau_server/data/tabsvc/logs

./opt/tableau/tableau_server/data

3 Antworten
  1. 1. Nov. 2021, 17:34

    @Laura Cichanowicz​ 

    Sadly, there is not a command or configuration key to change the log files location, but maybe, just maybe (last resource) if you create a support case (customer.tableau.com), Tableau support may be able to give you one instruction (if exists, but I don't think there is one).

     

    As a workaround you may work with creating a script that creates a ziplog and copies them to the desired path, and then schedule it with crontab.

     

    ⌗VARIABLES SECTION

    # Set some variables - you should change these to match your own environment

     

    # Grab the current date in YYYY-MM-DD format

    DATE=`date +%Y-%m-%d`

    # Grab the current datetime for timestamping the log entries

    TIMESTAMP=`date '+%Y-%m-%d %H:%M:%S'`

    # Do you want to copy your archived logs to another location after completion?

    copy_logs="yes"

    # Where do you want to save your archived logs?

    external_log_path="/Backup-Server/log-archives"

    # How many days to you want to keep archived log files for in Tableau Server default path?

    log_days="1"

    # How many days to you want to keep archived log files for in External path?

    external_log_days="3"

    # What do you want to name your logs file? (will automatically append current date to this filename)

    log_name="logs"

    # END OF VARIABLES SECTION

     

    # LOAD ENVIRONMENT & USER INPUT

     

    # Load the Tableau Server environment variables into the cron environment

    source /etc/profile.d/tableau_server.sh

     

    # In case that doesn't work then this might do it

    load_environment_file() {

    if [[ -f /etc/opt/tableau/tableau_server/environment.bash ]]; then

    source /etc/opt/tableau/tableau_server/environment.bash

    env_file_exists=1

    fi

    }

     

    if [ "$#" -eq 2 ] ; then

    # Get tsm username from command line input

    tsmuser="$1"

    # Get tsm password from command line input

    tsmpassword="$2"

    tsmparams="-u $tsmuser -p $tsmpassword"

    elif [ $(echo $TABLEAU_SERVER_DATA_DIR_VERSION | cut -d. -f1) -ge 20192 ] && (id -nG | grep -q tsmadmin || [ ${EUID} -eq 0 ]) ; then

    # 2019.2 workflow. If running as tsmadmin member or root, do not set userinfo

    declare tsmparams

    fi

     

    # LOGS SECTION

    # get the path to the log archive folder

    log_path=$(tsm configuration get -k basefilepath.log_archive $tsmparams)

    echo $TIMESTAMP "The path for storing log archives is $log_path"

     

    # count the number of log files eligible for deletion in the Tableau Server default directory and output

    echo $TIMESTAMP "Cleaning up old log files..."

    lines=$(find $log_path -type f -name '*.zip' -mmin +$(($log_days * 60 * 24)) | wc -l)

    if [ $lines -eq 0 ]; then

    echo $TIMESTAMP $lines found, skipping...

    else echo $TIMESTAMP $lines found, deleting...

    ⌗remove log archives older than the specified number of days

    find $log_path -type f -name '*.zip' -mmin +$(($log_days * 60 * 24)) -exec rm {} \;

    echo $TIMESTAMP "Cleaning up completed."

    fi

     

    #archive current logs and copy to the remote storage

    echo $TIMESTAMP "Archiving current logs..."

    tsm maintenance ziplogs -a -t -o -f logs-$DATE.zip $tsmparams

    #copy logs to different location (optional)

    if [ "$copy_logs" == "yes" ];

    then

    echo $TIMESTAMP "Copying logs to remote share"

    cp -n $log_path/* $external_log_path/

    fi

     

    ⌗remove log archive older than the specified number of days in external storage

    lines=$(find $external_log_path -type f -name '*.zip' -mmin +$(($external_log_days * 60 * 24)) | wc -l)

    if [ "$copy_logs" == "yes" ];

    then

    echo $TIMESTAMP "Deleting logs older than specified number in days in remote share"

    if [ $lines -eq 0 ]; then

    echo $TIMESTAMP $lines found, skipping...

    else echo $TIMESTAMP $lines found, deleting...

    ⌗remove log archives older in external storage than the specified number of days

    find $external_log_path -type f -name '*.zip' -mmin +$(($external_log_days * 60 * 24)) -exec rm {} \;

    echo $TIMESTAMP "Cleaning up completed."

    fi

    fi

     

    # END OF LOGS SECTION

    Let's suppose you store this script with name tableau-server-housekeeping-linux.bash and you stored it in /home/dmartinez, then you can test it (In this case, the user in the server with tsm rights is dmartinez) (don't forget to give executing permission to the file)

    sudo su -l dmartinez -c /home/dmartinez/tableau-server-housekeeping-linux.bash

    Finally, if everything is working, schedule with crontab:

    sudo su -l dmartinez -c "crontab -e"

    And add a line at the end. For example, to schedule it to run once a day at 01:00, add this to your crontab:

    0 1 * * * /home/dmartinez/tableau-server-housekeeping-linux.bash  > /home/dmartinez/tableau-server-housekeeping.log

    Regards,

     

    Diego

0/9000

Paving issues removing the center alignment from copy, it is centered, I think it is due to <P> tag.. do you know if there is a way to quickly right align?

0/9000

Why am I getting an error saying "! Unable to copy" when trying to copy one of my engagement studios? The others seem to be copying fine. Any ideas?

2 Kommentare
  1. 15. Juli 2020, 09:34
    Hi Bill, this doesn't seem to be the case, I've ended all editing sessions and I'm still getting the same error message.
0/9000

Is there way to #retrieve an exact a #copy of an #email message sent through a Marketing Cloud account? i.e., to retrieve the full #content of an #email message sent from MC via the Content Builder #API?

 

I'm unable to find the right reference here: https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-apis.meta/mc-apis/content-api.htm

 

I notice the #AssetType 208 is #htmlemail - how can I retrieve the content of a specific Html Email sent via the API?

 

https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-apis.meta/mc-apis/base-asset-types.htm

 

P.S. I am aware about the Email Archiving solution - but I'm looking for something "in real time". ( https://help.salesforce.com/articleView?id=mc_es_email_archiving.htm&type=5 )

2 Kommentare
0/9000

Can we get a copy of the recording and the presentation

1 Kommentar
0/9000

Was stated in today webinar that Copy and paste for images for cases and CHATTER now works.

 

I must be doing something wrong but CtrlC and CtrlV do not seem to work in Winter19 for chatter. The image appears and then disappears as soon as you press save on the post. 

 

would love this to work and that i am doing something wrong.

2 Kommentare
  1. 16. Okt. 2018, 00:10
    lets hope a bug as it is a slightly better workflow but still very suboptimal.
0/9000