Introduction to ChatGPT-Backup Project
The ChatGPT-Backup project is designed to allow users to create a backup of their entire conversation history on chat.openai.com. By using a simple client-side script, users can save their conversation history as a single JSON file. This project is particularly useful for those who want to keep a record of their interactions for offline access.
Previewing Your Backups
Users have the ability to preview their backups by opening an index.html
file locally on their computers. Here's how it works:
- Clone the repository from GitHub using the command:
git clone https://github.com/abacaj/chatgpt-backup.git
. - Open the
index.html
file in a web browser. - Load the backup file from the top-left corner of the interface to view your conversation history.
How to Use the Script
To back up your ChatGPT conversations, follow these steps:
-
Navigate to chat.openai.com and ensure you are logged in.
-
Open the console in your web browser (press F12 on the keyboard).
-
Locate the "Console" tab.
-
Copy the entire script from the
backup.js
file and paste it into the console input field. -
Press enter to start the script, which will log its progress in the console.
If the script encounters a failure, you can check the console logs to see where it failed and adjust the script's offsets to resume from a specific point.
const START_OFFSET = 0;
const STOP_OFFSET = -1;
Understanding the Script's Functionality
The script operates by using the same frontend API as the ChatGPT client browser. This ensures that users are interacting directly with the API in a straightforward manner.
Benefits of ChatGPT-Backup
The ChatGPT-Backup project offers several advantages:
- The script requires no downloading or installation.
- It is tested and works on both Chrome and Firefox browsers.
- The entire process is client-side. Users only need to copy and paste the script to initiate the backup.
- It respects rate limits to prevent excessive requests.
- The script can be adjusted for different starting and stopping points.
- The code is fully auditable in the
backup.js
file with no involvement from third parties.
Potential Use Cases
Some of the practical uses for this script include:
- Keeping an offline backup of your conversations.
- Maintaining access to your conversation content even during service downtime.
- Serves as a read-only backup, as the conversation IDs are not stored.
Additional Information
- The script has been tested with over 700 conversations.
- The current backup rate is approximately 60 conversations per minute.
- Backing up 600 conversations takes about 10 minutes, while 6,000 conversations take about an hour.
- It is important to keep the browser tab open, though it does not need to be the active tab.
- In some cases, Chrome may prompt you to download the file upon completion.
- On Firefox, you must type
allow pasting
before pasting the script.
Contributors
The preview backups feature of this project was contributed by @FredySandoval.
By using the ChatGPT-Backup project, users can ensure they have a secure and accessible record of their ChatGPT conversations, safeguarding their data against potential service interruptions or data loss.