diff --git a/admin/settings/courses.php b/admin/settings/courses.php
index b68a10a..3da4a84 100644
--- a/admin/settings/courses.php
+++ b/admin/settings/courses.php
@@ -169,7 +169,12 @@ if ($hassiteconfig
         400 => '400',
         500 => '500');
     $temp->add(new admin_setting_configselect('backup/backup_auto_keep', new lang_string('keep'), new lang_string('backupkeephelp'), 1, $keepoptoins));
-    $temp->add(new admin_setting_configcheckbox('backup/backup_shortname', new lang_string('backup_shortname', 'admin'), new lang_string('backup_shortnamehelp', 'admin'), 0));
+    $courseNameOptions = array(
+        0 => 'Id',
+        1 => new lang_string('shortname'),
+        2 => new lang_string('fullname'),
+    );
+    $temp->add(new admin_setting_configselect('backup/backup_filename', new lang_string('backup_filename', 'admin'), new lang_string('backup_filenamehelp', 'admin'), 0, $courseNameOptions));
     $temp->add(new admin_setting_configcheckbox('backup/backup_auto_skip_hidden', new lang_string('skiphidden', 'backup'), new lang_string('skiphiddenhelp', 'backup'), 1));
     $temp->add(new admin_setting_configselect('backup/backup_auto_skip_modif_days', new lang_string('skipmodifdays', 'backup'), new lang_string('skipmodifdayshelp', 'backup'), 30, array(
         0 => new lang_string('never'),
diff --git a/backup/util/dbops/backup_plan_dbops.class.php b/backup/util/dbops/backup_plan_dbops.class.php
index 2e2faae..bac9f8d 100644
--- a/backup/util/dbops/backup_plan_dbops.class.php
+++ b/backup/util/dbops/backup_plan_dbops.class.php
@@ -197,10 +197,10 @@ abstract class backup_plan_dbops extends backup_dbops {
     * @param int $courseid/$sectionid/$cmid
     * @param bool $users Should be true is users were included in the backup
     * @param bool $anonymised Should be true is user information was anonymized.
-    * @param bool $useidonly only use the ID in the file name
+    * @param int $filename Options: 0) only use the ID in the file name, 1) use course shortname, 2) use course fullname.
     * @return string The filename to use
     */
-    public static function get_default_backup_filename($format, $type, $id, $users, $anonymised, $useidonly = false) {
+    public static function get_default_backup_filename($format, $type, $id, $users, $anonymised, $filename = 0) {
         global $DB;
 
         // Calculate backup word
@@ -209,11 +209,13 @@ abstract class backup_plan_dbops extends backup_dbops {
 
         // Not $useidonly, lets fetch the name
         $shortname = '';
-        if (!$useidonly) {
+        $usingcoursename = $filename == 1 || $filename == 2;
+        if ($usingcoursename) {
             // Calculate proper name element (based on type)
             switch ($type) {
                 case backup::TYPE_1COURSE:
-                    $shortname = $DB->get_field('course', 'shortname', array('id' => $id));
+                    $fieldname = ($filename == 1) ? 'shortname' : 'fullname';
+                    $shortname = $DB->get_field('course', $fieldname, array('id' => $id));
                     $context = context_course::instance($id);
                     $shortname = format_string($shortname, true, array('context' => $context));
                     break;
@@ -233,7 +235,7 @@ abstract class backup_plan_dbops extends backup_dbops {
 
         // The name will always contain the ID, but we append the course short name if requested.
         $name = $id;
-        if (!$useidonly && $shortname != '') {
+        if ($usingcoursename && $shortname != '') {
             $name .= '-' . $shortname;
         }
 
diff --git a/backup/util/helper/backup_cron_helper.class.php b/backup/util/helper/backup_cron_helper.class.php
index d01833e..8283c64 100644
--- a/backup/util/helper/backup_cron_helper.class.php
+++ b/backup/util/helper/backup_cron_helper.class.php
@@ -428,7 +428,7 @@ abstract class backup_cron_automated_helper {
             // Copy file only if there was no error.
             if ($file && !empty($dir) && $storage !== 0 && $outcome != self::BACKUP_STATUS_ERROR) {
                 $filename = backup_plan_dbops::get_default_backup_filename($format, $type, $course->id, $users, $anonymised,
-                        !$config->backup_shortname);
+                        $config->backup_filename);
                 if (!$file->copy_content_to($dir.'/'.$filename)) {
                     $outcome = self::BACKUP_STATUS_ERROR;
                 }
diff --git a/backup/util/helper/backup_helper.class.php b/backup/util/helper/backup_helper.class.php
index efc0c49..b9f5d7f 100644
--- a/backup/util/helper/backup_helper.class.php
+++ b/backup/util/helper/backup_helper.class.php
@@ -254,7 +254,7 @@ abstract class backup_helper {
             $config = get_config('backup');
             $dir = $config->backup_auto_destination;
             if ($config->backup_auto_storage == 1 and $dir and is_dir($dir) and is_writable($dir)) {
-                $filedest = $dir.'/'.backup_plan_dbops::get_default_backup_filename($format, $backuptype, $courseid, $hasusers, $isannon, !$config->backup_shortname);
+                $filedest = $dir.'/'.backup_plan_dbops::get_default_backup_filename($format, $backuptype, $courseid, $hasusers, $isannon, $config->backup_filename);
                 // first try to move the file, if it is not possible copy and delete instead
                 if (@rename($filepath, $filedest)) {
                     return null;
diff --git a/lang/en/admin.php b/lang/en/admin.php
index 8c615b2..66765ae 100644
--- a/lang/en/admin.php
+++ b/lang/en/admin.php
@@ -68,8 +68,8 @@ $string['availableto'] = 'Available to';
 $string['availablelicenses'] = 'Available licences';
 $string['backgroundcolour'] = 'Transparent colour';
 $string['backups'] = 'Backups';
-$string['backup_shortname'] = 'Use course name in backup filename';
-$string['backup_shortnamehelp'] = 'Use the course name as part of the backup filename.';
+$string['backup_filename'] = 'Use course field in backup filename';
+$string['backup_filenamehelp'] = 'Use the course field as part of the backup filename.';
 $string['badwordsconfig'] = 'Enter your list of bad words separated by commas.';
 $string['badwordsdefault'] = 'If the custom list is empty, a default list from the language pack will be used.';
 $string['badwordslist'] = 'Custom bad words list';
diff --git a/lib/upgradelib.php b/lib/upgradelib.php
index c9c2870..10c7ce7 100644
--- a/lib/upgradelib.php
+++ b/lib/upgradelib.php
@@ -1922,7 +1922,7 @@ function upgrade_save_orphaned_questions() {
 function upgrade_rename_old_backup_files_using_shortname() {
     global $CFG;
     $dir = get_config('backup', 'backup_auto_destination');
-    $useshortname = get_config('backup', 'backup_shortname');
+    $useshortname = get_config('backup', 'backup_filename');
     if (empty($dir) || !is_dir($dir) || !is_writable($dir)) {
         return;
     }
@@ -1978,8 +1978,10 @@ function upgrade_rename_old_backup_files_using_shortname() {
         // Generating the file name manually. We do not use backup_plan_dbops::get_default_backup_filename() because
         // it will query the database to get some course information, and the course could not exist any more.
         $newname = $filename . $bcinfo->original_course_id . '-';
-        if ($useshortname) {
-            $shortname = str_replace(' ', '_', $bcinfo->original_course_shortname);
+        $usingcoursename = $usesshortname == 1 || $useshortname == 2;
+        if ($usingcoursename) {
+            $fieldname = ($usesshortname == 1) ? 'original_course_shortname' : 'original_course_fullname';
+            $shortname = str_replace(' ', '_', $bcinfo->$fieldname);
             $shortname = textlib::strtolower(trim(clean_filename($shortname), '_'));
             $newname .= $shortname . '-';
         }
