L
LLLOS.ai
Career
L
◆ AI Learning · Hard rule

How can a developer make sure files are safe before making changes?

A developer must always create a backup before making any changes to a file. This rule has no exceptions. Backups protect against data loss from errors or system failures.

By Pawan Nayar · from the LLOS AI Learning record

The rule

A developer must always create a backup before making any changes to a file.

This rule has no exceptions. Backups protect against data loss from errors or system failures.

Before a developer makes the first edit in any work session, a backup copy of the file must be made. The backup file name should include the date. A developer must check disk space before creating a backup. If there is not enough space, the developer must free up space. A developer should use a three-tier backup system. This includes rolling backups, which keep the last two versions. It also includes milestone backups, which are made once a day. A developer should keep a maximum of three milestone backups. When backing up, a developer must save both the server and client files at the same time. Saving only one part is not a complete backup. Server changes are as important as client changes and can be lost forever without a backup. Before a developer undoes any changes, a list of all changed files must be made. The developer must confirm that a backup exists for each file. This prevents losing work if a revert goes wrong. If a developer runs a new script, the developer must read its save logic first. This means understanding how the script writes or replaces files. Some scripts overwrite files even in test mode. A developer should always test with a small amount of data first. The developer must check the output file to make sure no data was lost. Then, the developer can run the script on more data.

A developer is working on a new feature for an AI model. The developer makes changes to the server code and the user interface code. The developer only backs up the user interface code. Later, the developer needs to revert changes. The user interface code is restored, but the server code changes are lost because there was no backup. Hours of work are destroyed.

Words you'll need

Resolved from this lesson's own record — real definitions, not invented for this page.

Fault Tolerance

System keeps working even when parts break

System Resilience

AI keeps working when things break or change

Data Protection

Keeping personal information safe and private

Configuration Management

Keeping track of what settings AI is using

Questions people ask

More from the same record, pulled by shared topic — not written new for this page.

How often should a developer create a backup of a file?

A developer must create a new backup right before editing a file. An old backup, even from the same day, can lead to lost work.

How should a developer manage file backups and changes to prevent data loss or errors?

A developer must classify each change as cosmetic, functional, or departure. A developer must take specific backups for each change type.

When should an AI model show the full paths of files it has changed?

An AI model must show full file paths after every major update. A major update is any change that modifies one or more files.

Where should a developer save backup copies of Markdown files?

A developer should put all Markdown backup copies in the `llos/tools/` folder. This folder is a single, expected place for these files.

What to remember

A developer must always create a backup before making any changes to a file. This rule has no exceptions. Backups protect against data loss from errors or system failures.