This article only applies to Audacity versions up to 2.4.2.
If Audacity crashes or the computer loses power, Audacity should normally recover the projects automatically when you restart. The steps on this page describe how to recover audio from the project's _data folder or Audacity's temporary folder if:
Automatic Crash Recovery does not work correctly
You saved a project without apparent crash, but Audacity was shut down before the AUP project file was written or you do not have a usable AUP file.
The steps on this page will only recover unedited recordings (and stereo recordings may be recovered with sections of left and right channel in the wrong channel).
Do not close or save the project if the automatic crash recovery fails to properly recover your project.
If you need to shut down the computer before manually fixing an incorrect Automatic Crash Recovery, force quit Audacity in the system task manager. This will preserve the temporary data for next launch of Audacity.
If you had successfully saved the project just before the crash, it may be simpler to discard the unsaved project in the Automatic Crash Recovery dialog then open the saved AUP file.
If you saved an AUP project file, the _data folder you need to recover from will be in the directory to which you originally saved the AUP file.
If you never saved an AUP project file, you need to recover from Audacity's temporary folder. You can see the exact location in Directories Preferences, otherwise you can see the location in the "TempDir" line in the audacity.cfg settings file. By default the Audacity temporary folder should be as follows.
Windows: C:\Users\<your username>\AppData\Local\Audacity\SessionData
Mac: /Users/<your username>/Library/Application Support/audacity/SessionData
GNU/Linux: /var/tmp/audacity-<your username>
If you are upgrading from previous Audacity, that version's temporary directory may be changed to the relevant safe location above if the previous location was known to be prone to deletion by cleanup applications or system restart.
Tip: In order to see the default location of the Audacity temp folder on Windows or Mac you need to show hidden files and folders or type the folder location into your file manager's address bar.
In the tree on the left of Explorer, double-click "Users" then double-click your username, then on the right, open the AppData or Application Data folder, then the "Local" or "Locale Settings" folder and finally the "Temp" folder.
If you cannot see those folders, you can type %localappdata% into the Explorer address bar then look for the "Temp" folder. Otherwise, see how to show hidden files and folders.
Open Finder, use the "Go" menu, choose "Go to Folder" and type the required path.
If that does not work, try to make the Finder show its hidden files and folders by entering the following commands in the terminal:
If you only have a few AU files to recover, use the "Import Audio" command to open all the .au files from the Audacity temporary folder or project _data folder. Use shift-click or control-click to select multiple files. The files will be in approximately 6-second chunks and will be on separate tracks in the Audacity screen. Files from stereo tracks will alternate between left and right channels.
Click in the Track Control Panel (by the Mute/Solo buttons) of the topmost track.
Shortcut Z
or Select > Region > Ends to Zero Crossings.
Edit > Remove Special > Trim.
Click in the Track Control Panel of the first track you want to join to the topmost track.
Shortcut Z or Edit > Find Zero Crossings.
Shortcut Z or Select > Region > Ends to Zero Crossings.
Click after the end of the topmost track.
Press End on the keyboard.
Click Edit > Paste and the cut track will attach to the end of the topmost track.
Repeat as necessary to join all the tracks onto the topmost track.
Play the result.
Cut and paste as needed if any files are found to be in the wrong order or the wrong channel.
Tools written for legacy Audacity 1.2 can automate data recovery.
All these utilities require the .au files to be input in consecutive alphanumerical order. Audacity names files randomly so files will need to renamed.
Open Audacity's temporary or project _data folder in your system file manager. Sort the files by timestamp order (earliest first), then rename them using a consecutive alphanumerical sequence, lowest number first. An arrangement looking something like this should work:
b001.au 15:56:02 b002.au 15:56:02 b003.au 15:56:10 b004.au 15:56:10
On Windows, Explorer cannot rename to a sequence acceptable to the recovery tools. You can use instead the Mass Rename tool in the 21-day trial Professional or Ultimate versions of xplorer2. These versions will let you recover an unedited stereo recording with exact allocation of left and right channels, if Windows is running the NTFS file system. The free version of xplorer2 cannot guarantee correct channel allocation.
(only in the Professional and Ultimate versions) Click View > Raw Contents to enable maximum date resolution.
Open the required folder in xplorer2 and sort the .au files by time modified as above.
Ctrl + A to select all the files.
File > Mass Rename.
In the "Mass Rename Wizard", click in "Target name template" and type the letter e with a $ after the letter. For example, e$0001.au will rename the files to e0001.au, e0002.au and so on. Use enough zeros in the file name so that all the .au files will have the same number of digits.
Press "Preview", and if the preview looks correct, hit "Rename"
On Mac, try Applications > Automator.
On Linux, try the file manager Thunar included in the xfce desktop See here for help running Thunar on the Ubuntu desktop.
Open a terminal then "cd" into the directory that contains the .AU files.
Type the following command in a terminal to sort and rename the files into numerical timestamp order:
mkdir "renamed" | find -type f -name "*.au" -printf "cp %h/%f renamed/%h/%TY%Tm%Td-%TH%TM%TS_%f\n"|sh
The file names produced in the "renamed" folder are not in a consecutive sequence suitable for the Audacity recovery utilities. Instead, use the Nyquist plugin Append Import to import the files end-to-end into Audacity automatically in file name order.
There is a 2 GB maximum size for any WAV file created from the reconstructed temporary files. This implies no more than 2000 .au files can be recovered. Sometimes (probably due to bugs in the utilities) there can be errors when recovering only 1000 or so files. In that case you would need to split the .au files in the temporary or_data folder into two or more folders, each containing consecutively numbered files, and recover a separate WAV file from each folder.
Recovery of unedited mono recordings should be correct in most cases.
Recovery of unedited stereo recordings may recover with transposed left/right channels in places. Channel allocation will only be correct if you are using the NTFS (Windows) or ext 4 (Linux) file system and if your file manager supports sufficiently fine date resolution (see the Windows example above). This is because the files for each channel may have timestamps that are too close together to be correctly distinguished by other file systems.
If any of the project data has been edited, it is unlikely to recover correctly.
There is no implication that these tools will necessarily do what you want, nor have they necessarily been tested by Audacity Team.
audacity_rescue.sh
This shell script can reassemble a few thousand .au files. It may be simpler to apply (at a bash terminal) than some of the solutions mentioned on this page, particularly for mono recordings.
Using SoX, make a copy of the temp directory and its files from a mono recording:
cp -r /tmp/audacity1.2-jbn ~/rescue
Convert the AU files into raw (headerless) files. The files must already be time-sorted and numbered with leading zeroes:
for f in *.au ; do sox ${f} -t raw ${f}.raw ; done
Concatenate the raw files together to make one long raw file. Concatenating the AU files together (each with its own header) would produce noise at the joins between each AU file.
cat *.raw > bigfile.raw
Finally, import the raw file into Audacity specifying the appropriate encoding, endianness, channels and sample rate.
Using the Audacity Project Tools to recover corrupted projects
This article addresses the following error codes in Audacity:
Error code 11
Error code 13
Error code 101
"Audacity failed to read a file in C:" (or D:, E:, ...)
Make sure you use the latest version of Audacity. See Downloading & installing Audacity for more information.
Sometimes, just opening the file in the latest version automatically recovers the project. If not, proceed with the following steps:
First, download the latest version of the Audacity Project Tools:
After downloading, follow the instructions relevant to your system. Note: macOS is not supported yet.
Caution: Make sure you have plenty of space left on your computer. You will need roughly 4 times the size of your .aup3 for a successful recovery. If you have a 10GB file, you should have at least 40GB available.
In your Downloads folder, create a new sub-folder "AudRepair".
Unzip the audacity-project-tools zip which you downloaded
Move the two .exe files from the unzipped folder into AudRepair.
Copy your defective .aup3 project file into the AudRepair folder.
Rename the file to broken.aup3
.
Press Windows-key + R
, and type cmd
. A (black) cmd screen will appear.
Navigate to your AudRepair folder by typing cd Downloads\AudRepair
and pressing Enter
.
Type dir
and press Enter
. The following three files should be listed: audacity-project-tools.exe
, broken.aup3
, and sqlite3.exe
Type audacity-project-tools -drop_autosave broken.aup3
and press Enter
.
The message "Project requires Audacity 3.0.0" will appear.
When the command prompt (C:\Users\(yourname)\Downloads\AudRepair\>
) reappears, type dir
again.
If a broken.recovered.aup3
file appears, open it in Audacity.
If that file works as expected, go to File -> Save As... and save it to your usual location. The recovery process is now over, you can continue working as normal.
If that file does not appear, or is still broken, continue with the following steps:
Type audacity-project-tools -recover_db -recover_project broken.aup3
and press Enter
.
The messages "Project requires Audacity 3.0.0
", and "Using 'sqlite3.exe' for recovery
" will appear. Later the message "Executing query #xxxx....
" will appear as the rescued file is being recreated.
Note: This process can take quite a while depending on your specific machine. There is no status (or % completion) indicator, so you just have to be patient.
You should plan 15-30 minutes per GB, though it may be faster if you have a fast PC.
Keep an eye on available disk space.
Due to a glitch, sometimes a single character can appear when the program is done, eg "z
". If this happens, simply press Backspace.
When the process completes, your should be able to open the "broken.recovered.aup3" in Audacity. The message "File not saved properly" will appear the first time you open the recovered project. This is normal and you can ignore this message.
If the messages "Invalid block xxxx: Block not found
", check to see if some audio was silenced - typically near your most recent edits. Usually these messages are spurious.
In your downloads folder, create a new sub-folder called "AudRepair".
Unzip the audacity-project-tools ZIP file that you downloaded
Move the unzipped files into AudRepair
Copy your defective .aup3 project file into AudRepair
Rename the .aup3 file to broken.aup3
Open the Terminal or Konsole program.
Navigate to the AudRepair folder by typing cd ~/Downloads/AudRepair
and pressing Enter
Type ls
and press Enter
. **** The following three files should be listed: audacity-project-tools
, broken.aup3
and sqlite3
Make the audacity project tools and sqlite3 executable by typing chmod +x audacity-project-tools sqlite3
and pressing Enter
.
Type ./audacity-project-tools -drop_autosave broken.aup3
and press Enter
.
The message "Project requires Audacity 3.0.0" will appear.
When the command prompt (you@pc:~/Downloads/AudRepair$
) reappears, type ls again.
If a broken.recovered.aup3
file appears, open it in Audacity.
If that file works as expected, go to File -> Save As... and save it to your usual location. The recovery process is now over, you can continue working as normal.
If that file does not appear, or is still broken, continue with the following steps:
Type ./audacity-project-tools -recover_db -recover_project broken.aup3
and press Enter
.
The messages "Project requires Audacity 3.0.0
", and "Using 'sqlite3' for recovery
" will appear. Later the message "Executing query #xxxx....
" will appear as the rescued file is being recreated.
Note: This process can take quite a while depending on your specific machine. There is no status (or % completion) indicator, so you just have to be patient.
You should plan 15-30 minutes per GB, though it may be faster if you have a fast PC.
Keep an eye on available disk space.
Due to a glitch, sometimes a single character can appear when the program is done, eg "z
". If this happens, simply press Backspace.
When the process completes, your should be able to open the "broken.recovered.aup3" in Audacity. The message "File not saved properly" will appear the first time you open the recovered project. This is normal and you can ignore this message.
If the messages "Invalid block xxxx: Block not found
", check to see if some audio was silenced - typically near your most recent edits. Usually these messages are spurious.
Note:
There is no guarantee that all content will be able to be restored, or any at all.
Some additional commands for the Audacity Project Tools can be found on Github.
If a section of audio is missing, you may need to manually re-record it. See Re-recording a section for more information.