-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSCENARIOS.txt
More file actions
332 lines (238 loc) · 10.5 KB
/
SCENARIOS.txt
File metadata and controls
332 lines (238 loc) · 10.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
================================================================================
COMFYUI BACKUP - USAGE SCENARIOS
================================================================================
This guide shows common scenarios and exactly what to do for each.
================================================================================
SCENARIO 1: First Time Setup
================================================================================
You just downloaded this script and want to set everything up.
STEPS:
1. Double-click: RunBackup.bat
2. Choose option 5 (Install/Setup)
3. Choose backup type:
- Type 1 for Git (recommended if you have Git installed)
- Type 2 for Archive (simpler, no dependencies)
4. Enter time for daily backup (e.g., 02:00)
5. Done! Script will:
- Create scheduled task
- Create Start Menu shortcut
- Perform first backup
RESULT: Automatic daily backups are now active!
================================================================================
SCENARIO 2: Before Installing a New Plugin
================================================================================
You want to try a new ComfyUI plugin but want a backup first.
STEPS:
1. Double-click: RunBackup.bat
2. Choose option 1 (Git) or 2 (Archive)
3. Wait for "Backup completed" message
4. Install your plugin
5. If something breaks → See SCENARIO 5 (Rollback)
COMMAND LINE:
.\ComfyUI-Backup.ps1 -Mode Backup -BackupType Git
================================================================================
SCENARIO 3: Before a ComfyUI Update
================================================================================
ComfyUI Electron has an update and you want to back up first.
STEPS:
1. Double-click: RunBackup.bat
2. Choose option 1 (Git) or 2 (Archive)
3. Wait for completion
4. Run the ComfyUI update
5. If update breaks things → See SCENARIO 5 (Rollback)
ALTERNATIVE: Schedule this automatically
RunBackup.bat → Option 5 → Setup daily backup at convenient time
================================================================================
SCENARIO 4: Something Broke - Need to View Backup History
================================================================================
ComfyUI isn't working and you want to see what backups you have.
STEPS:
1. Double-click: RunBackup.bat
2. Choose option 3 (List Available Backups)
3. You'll see:
- Git: List of commits with dates
- Archive: List of ZIP files with dates and sizes
4. Note the commit hash or filename you want
5. See SCENARIO 6 for restore steps
COMMAND LINE:
.\ComfyUI-Backup.ps1 -Mode ListBackups
================================================================================
SCENARIO 5: Something Broke - Quick Rollback
================================================================================
You just made a change and it broke everything. You want to undo to the last
working backup (most common scenario).
STEPS:
1. Double-click: QuickRestore.bat
2. Choose option 3 (Quick Rollback)
3. Type G (Git) or A (Archive)
4. Type "yes" to confirm
5. Done! Your ComfyUI is restored to previous backup
ALTERNATIVE:
1. Double-click: RunBackup.bat
2. Choose option 4 (Rollback to Previous)
COMMAND LINE:
.\ComfyUI-Backup.ps1 -Mode Rollback -BackupType Git
WHAT HAPPENS:
- Your current installation is backed up to %TEMP% first (safety)
- Previous backup is restored
- If you change your mind, the safety backup is in your Temp folder
================================================================================
SCENARIO 6: Restore from Specific Backup
================================================================================
You know exactly which backup you want (e.g., from 3 days ago).
STEPS:
1. Double-click: QuickRestore.bat
2. Choose option 1 (Git) or 2 (Archive)
3. Enter the commit hash or filename shown in backup list
4. Type "yes" to confirm
5. Done!
EXAMPLE - GIT:
After listing backups, you see:
a1b2c3d - 3 days ago - Backup 2025-11-29 02:00:00
Enter: a1b2c3d
EXAMPLE - ARCHIVE:
After listing backups, you see:
ComfyUI-Backup_2025-11-29_020015.zip
Enter: ComfyUI-Backup_2025-11-29_020015.zip
COMMAND LINE:
.\ComfyUI-Backup.ps1 -Mode Restore -BackupType Git -RestorePoint a1b2c3d
.\ComfyUI-Backup.ps1 -Mode Restore -BackupType Archive -RestorePoint "ComfyUI-Backup_2025-11-29_020015.zip"
================================================================================
SCENARIO 7: Manual Backup Before Risky Operation
================================================================================
You're about to do something experimental and want a backup NOW.
STEPS:
1. Double-click: RunBackup.bat
2. Choose option 1 (Git) or 2 (Archive)
3. Wait for "Backup completed"
4. Do your experimental work
5. If it fails → SCENARIO 5 (Rollback)
COMMAND LINE (faster for advanced users):
.\ComfyUI-Backup.ps1 -Mode Backup -BackupType Git
================================================================================
SCENARIO 8: Setting Up Automatic Daily Backups
================================================================================
You want ComfyUI to back up automatically every night.
STEPS:
1. Double-click: RunBackup.bat
2. Choose option 5 (Install/Setup)
OR
Right-click PowerShell → Run as Administrator
Run: .\ComfyUI-Backup.ps1 -Mode CreateSchedule -BackupType Git -ScheduleTime "02:00"
3. Choose your backup time (e.g., 02:00 for 2 AM)
4. Done!
VERIFY:
1. Press Win+R
2. Type: taskschd.msc
3. Look for: ComfyUI-DailyBackup
WHAT HAPPENS:
- Every day at your chosen time, a backup runs automatically
- No user interaction needed
- Works even if you're away from computer (runs when you return)
================================================================================
SCENARIO 9: Checking If Backups Are Working
================================================================================
You set up automatic backups and want to verify they're running.
STEPS:
1. Check for new backups:
- Double-click: RunBackup.bat → Option 3
- Look for recent dates
2. Check logs:
- Open folder: .\Logs\
- Open latest: ComfyUI-Backup_YYYY-MM.log
- Look for "Backup completed successfully"
3. Check scheduled task:
- Win+R → taskschd.msc
- Find: ComfyUI-DailyBackup
- Check "Last Run Time" and "Last Run Result"
================================================================================
SCENARIO 10: Moving to a New Computer
================================================================================
You're setting up ComfyUI on a new computer and want your latest backup.
OPTION A: Using Git Backup
1. Copy entire "Backups\GitRepo" folder to new computer
2. Copy this script to new computer
3. Run: .\ComfyUI-Backup.ps1 -Mode Restore -BackupType Git -RestorePoint HEAD
OPTION B: Using Archive Backup
1. Find latest ZIP in "Backups\Archives\"
2. Copy to new computer
3. Extract to: %LOCALAPPDATA%\Programs\@comfyorgcomfyui-electron
================================================================================
SCENARIO 11: Cleaning Up Old Backups Manually
================================================================================
You want to free up disk space by removing old backups.
GIT BACKUPS:
- Already automatically pruned (keeps last 30 commits)
- To start fresh: Delete .\Backups\GitRepo folder
- Next backup will recreate it
ARCHIVE BACKUPS:
- Already automatically cleaned (keeps last 14 days)
- To remove more: Delete old ZIP files from .\Backups\Archives\
- Safe to delete manually - they're just ZIP files
================================================================================
SCENARIO 12: I Restored But Want to Go Back
================================================================================
You restored an old backup but realize you want the newer version.
STEPS:
1. Check your Temp folder for safety backup:
- Press Win+R
- Type: %TEMP%
- Look for folder: ComfyUI-PreRestore_YYYYMMDD_HHMMSS
- Copy that folder to: %LOCALAPPDATA%\Programs\@comfyorgcomfyui-electron
2. Or restore from a later backup:
- List backups (SCENARIO 4)
- Restore from newer date (SCENARIO 6)
================================================================================
SCENARIO 13: Testing the Restore Process
================================================================================
You want to make sure restore works before you need it.
STEPS:
1. Make a test backup: RunBackup.bat → Option 1
2. Change something small in ComfyUI (note what you changed)
3. Make another backup: RunBackup.bat → Option 1
4. List backups: RunBackup.bat → Option 3
5. Restore first backup: QuickRestore.bat
6. Verify your change is gone
7. Restore second backup: QuickRestore.bat
8. Verify your change is back
================================================================================
SCENARIO 14: Backup Failed - Troubleshooting
================================================================================
The backup script ran but failed.
STEPS:
1. Check the log file:
- Open: .\Logs\ComfyUI-Backup_YYYY-MM.log
- Look for [Error] entries
2. Common issues:
ERROR: "Git not found"
→ Install Git for Windows OR use -BackupType Archive
ERROR: "Source path does not exist"
→ Verify ComfyUI is installed at:
%LOCALAPPDATA%\Programs\@comfyorgcomfyui-electron
ERROR: "Access denied"
→ Run PowerShell as Administrator
ERROR: "Execution of scripts is disabled"
→ Open PowerShell as Admin, run:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
3. Try manual backup with verbose output:
.\ComfyUI-Backup.ps1 -Mode Backup -BackupType Archive -Verbose
================================================================================
QUICK DECISION TREE
================================================================================
Need to back up NOW?
└─→ RunBackup.bat → Option 1 or 2
Something broke, need to undo?
└─→ QuickRestore.bat → Option 3 (Quick Rollback)
Want automatic daily backups?
└─→ RunBackup.bat → Option 5 (Install)
Want to see backup history?
└─→ RunBackup.bat → Option 3 (List Backups)
Want to restore specific old backup?
└─→ QuickRestore.bat → Option 1 or 2 → Enter backup ID
First time using script?
└─→ RunBackup.bat → Option 5 (Install)
Want Start Menu shortcut?
└─→ RunBackup.bat → Option 5 (Install)
Need to verify backups are working?
└─→ Check .\Logs\ folder OR RunBackup.bat → Option 3
================================================================================