Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15198884
D19536.id46712.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D19536.id46712.diff
View Options
diff --git a/src/applications/files/management/PhabricatorFilesManagementMigrateWorkflow.php b/src/applications/files/management/PhabricatorFilesManagementMigrateWorkflow.php
--- a/src/applications/files/management/PhabricatorFilesManagementMigrateWorkflow.php
+++ b/src/applications/files/management/PhabricatorFilesManagementMigrateWorkflow.php
@@ -85,6 +85,32 @@
foreach ($iterator as $file) {
$monogram = $file->getMonogram();
+ // See T7148. When we export data for an instance, we copy all the data
+ // for Files from S3 into the database dump so that the database dump is
+ // a complete, standalone archive of all the data. In the general case,
+ // installs may have a similar process using "--copy" to create a more
+ // complete backup.
+
+ // When doing this, we may run into temporary files which have been
+ // deleted between the time we took the original dump and the current
+ // timestamp. These files can't be copied since the data no longer
+ // exists: the daemons on the live install already deleted it.
+
+ // Simply avoid this whole mess by declining to migrate expired temporary
+ // files. They're as good as dead anyway.
+
+ $ttl = $file->getTTL();
+ if ($ttl) {
+ if ($ttl < PhabricatorTime::getNow()) {
+ echo tsprintf(
+ "%s\n",
+ pht(
+ '%s: Skipping expired temporary file.',
+ $monogram));
+ continue;
+ }
+ }
+
$engine_key = $file->getStorageEngine();
$engine = idx($engines, $engine_key);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Feb 24, 5:32 AM (11 h, 16 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7188934
Default Alt Text
D19536.id46712.diff (1 KB)
Attached To
Mode
D19536: When migrating files between storage engines with "bin/files migrate ...", skip expired temporary files
Attached
Detach File
Event Timeline
Log In to Comment