# Folder Auto Snapshot

File & Folder Snapshots feature allows Team Computers to automatically create periodic, timestamped snapshots of the `/Outputs` folder on the desktop. Snapshots are taken every **30 minutes**, preserving a recoverable history of your work while keeping storage usage efficient.

### How It Works

When this feature is enabled, the system creates an `/Outputs` folder on the desktop of the team computer. For files in this folder, the system creates a timestamped folder inside `Vagon Files/Outputs/` for each snapshot cycle and records the folder state.

* **Full files** are saved when a file is new or has been modified since the last snapshot (detected via modified date).
* **File references** are recorded in `Files.txt` for files that have not changed, avoiding redundant copies of unchanged data.

A `Files.txt` file is included in **every** snapshot folder, listing all file names present in `Desktop/Outputs` at the time of the snapshot — regardless of whether each file was modified or not. This gives you a complete inventory of your working directory at every point in time.

If `Desktop/Outputs` is empty, `Files.txt` will contain the following line:

`[INFO] No files to backup - source folder is empty`

> Snapshots are created separately for each session. The system checks the initial folder state when the computer starts, then creates snapshot folders by comparing against the previous snapshot state of the `/Outputs` folder. Because of this, if a file already exists in `/Outputs` from a previous session, it is treated as a new file in the next session's snapshots.

#### Snapshot Cycle

```
Desktop/Outputs/          →   Vagon Files/Outputs/
                                ├── t/           (session start)
                                ├── t+30/        (30 min later)
                                ├── t+60/        (60 min later)
                                └── ...
```

### Example

Assume your `Desktop/Outputs` folder contains the following files at the start of a session:

| File                    | Description             | Modified Since Previous Snapshot |
| ----------------------- | ----------------------- | -------------------------------- |
| `quarterly_report.docx` | Word Document           | `true`                           |
| `financials.pptx`       | Financials Presentation | `false`                          |
| `sales_data.csv`        | Data Export             | `false`                          |

#### **Snapshot at `t` (session start)**

All files are new to this session, so all are copied in full:

```
Vagon Files/Outputs/t/
├── quarterly_report.docx
├── financials.pptx
├── sales_data.csv
└── Files.txt         ← lists quarterly_report.docx, financials.pptx, sales_data.csv
```

#### **Snapshot at `t+30` (user saved changes to `quarterly_report.docx`)**

Only the modified file is copied. The unchanged files are referenced in `Files.txt`:

```
Vagon Files/Outputs/t+30/
├── quarterly_report.docx  ← updated version
└── Files.txt              ← lists quarterly_report.docx, financials.pptx, sales_data.csv
```

#### **Snapshot at `t+60` (no files saved between snapshots)**

No modified files, so only the inventory file is created:

```
Vagon Files/Outputs/t+60/
└── Files.txt              ← lists quarterly_report.docx, financials.pptx, sales_data.csv
```

### Storage Efficiency

This incremental approach is intentional. Copying every file in full at every cycle would rapidly consume available disk space — especially with large project files. By storing only changed files and referencing unchanged ones in `Files.txt`, the system keeps your snapshot history complete without unnecessary duplication.

This feature is available upon request. Please contact the Vagon team to enable it.
