diff --git a/backup.sh b/backup.sh index a3849b754202df22dc633816ca5fae691b5586ea..536d690dec54f917d5fbdaf1a9ec35d0749759b3 100755 --- a/backup.sh +++ b/backup.sh @@ -105,7 +105,7 @@ sed -i 's/protected $useExtendedInserts = true;/protected $useExtendedInserts = #Generate the internal backup cd $snipeitDirectory php artisan backup:run -backupFile=$(ls -lt $backupDirectory | head -3 | tail -1 | awk '{print $9}') +backupFile=$(ls -lt $backupDirectory | head -2 | tail -1 | awk '{print $9}') extractDir=$(echo $backupFile | cut -f 1 -d '.') echo "Current backup: $extractDir"