SFTP
Request SFTP access
Requesting access
SSH File Transfer Protocol (SFTP) is not enabled by default in Totara Cloud, so you will need to request access in order to use it on your site. To request access, open a support ticket or contact your Totara Cloud Partner with the following information:
The name/URL of your site
Explain that you wish to upload HR import files via SFTP
Provide an SSH public key that will be used to grant access
You can generate an SSH public key and private key if you do not already have them. Ensure that you keep the private key safe and do not share it with us or anyone else. You can find information on which key types are supported and how to generate an SSH key pair in AWS's documentation.
For information on how to use your SSH key to authenticate, refer to your FTP software documentation.
Receiving access
Once we have processed your request and enabled access we will share with you the following information:
An SFTP hostname (URL)
Your organisation's SFTP username (one username per organisation, typically matching your site's name)
You can then use this information along with your SSH key to connect to our SFTP server and upload files and folders using any SFTP client.
Set up SFTP for HR import
Configure HR import to use CSV files from the file system
Before you can set up SSH File Transfer Protocol (SFTP) for HR import you will need to ensure that you have access (see above), as it is not enabled by default.
Follow these steps to set up SFTP for HR import:
Navigate to the HR import default settings via Quick-access menu > HR import.
Set the File access setting to Directory check and set Files directory to '/totara/data/sftp' (without the quotes). When first configuring SFTP for HR import it makes sense to trigger the sync manually, but once you are happy with the behaviour you may want to enable the Scheduled HR importing setting to automatically check for new files and run the import.
Go to Manage elements and enable any elements you wish to import. Each element can control its own File access and Schedule settings, but will use the default setting if not otherwise specified. Also ensure the source is set to CSVÂ here.
The Source contains all records is a critical setting. If set to No (the default) it will create and update records in the file. If you set it to Yes then it expects the file to be a complete list of all users and will delete any users not found in the file. If unsure, leave it set to No.
Go to the Sources section and view the CSV page for each element you have enabled. Here you can see the expected location for the files as well as the file format. You can remap column headings to match your file's structure here, but the content role is expected to conform to the required structure. See HR import CSV file available fields for more information on the required structure.
Import a test file
We recommend creating a small import file with one or two test users and testing your import before trying with your real data. Follow these steps to import a test file:
Create a file with the name given on the Sources CSV page. For example, this would be 'user.csv' for users or 'pos.csv' for positions.
The file is expected to be located in a subdirectory called 'csv/ready' below the root of your SFTP directory, so after logging in via SFTP make sure to create those folders and put the file with the correct name inside. The full path to the file will be something like 'csv/ready/user.csv'.
Once you have uploaded a suitably formatted file to the correct location, go to the Run HR import page (Quick-access menu > HR import > Run HR import) and check for errors. If everything has been set up correctly, click Run HR import.
Once the import is complete you should be able to see a record of what was done on the HR import log page. If your file contained any formatting issues you will see these detailed here. If required, correct the errors and upload the file again.
After a successful HR import run, HR import will delete the file from the SFTP directory. Upload it again to repeat the process. Once you are satisfied that the process is working as expected you may want to enable automated scheduling.
Automating HR import via SFTP
Once your imports are working and HR import is scheduled, enable any automation on your side to automatically upload new HR import files to the correct folder via SFTP, so that the files are available when the HR import schedule is expecting them.