How to: Customize the tmp Directory Used for SiteWorx Backups

During the SiteWorx account backup process, InterWorx uses the /tmp directory defined in /home/interworx/iworx.ini to build the backup file. If this directory runs out of space during the process, the backup will fail, and an empty backup (0M) file will be created.

As such, it is often useful for system administrators to define a different /tmp directory than the default for InterWorx to use.

InterWorx allows the tmp directory location to be set in /home/interworx/iworx.ini. Permissions on the new directory will need to match the default /tmp folder.

To Configure a New tmp Directory

  1. Log in to the server at the CLI as root, either via SSH or from the terminal

  2. Create the new tmp folder in the desired location. This example creates a new directory named /home/tmp

    mkdir /home/tmp
    
  3. Edit the directory’s permissions to match that of /tmp

    chmod 1777 /home/tmp
    

To Define the tmp Directory for InterWorx

  1. Log in to the server at the CLI as root, either via SSH or from the terminal

  2. In a text editor, open /home/interworx/iworx.ini. The below example uses the vim text editor

    vim /home/interworx/iworx.ini
    
  3. Search the file for the section labled [dir]

    [dir]
    cron="/var/spool/cron"
    domainkeys="/etc/domainkeys"
    log="/var/log"
    mysql_base="/var/lib/mysql"
    service="/service"
    skel="/etc/skel"
    sysconf="/etc"
    tmp="/tmp"
    
  4. Edit the tmp="/tmp" line to reference the custom tmp directory. For example, if the new temporary folder is /home/tmp, edit the line to read:

    tmp="/home/tmp"
    
  5. Save and exit the file