Should I delete TEMP folder when publishing Umbraco?
Asked Answered
A

4

13

When I publish content to my server should I publish `AppData\Temp' folder as well?

Logic is not to do that but cannot find information online about it.

Albanian answered 8/5, 2013 at 10:33 Comment(0)
F
30

When deploying your application, you should follow these guidelines for your App_Data folder.

App_Data

Permissions = Read, Write

Required folders

The following folders are required for Umbraco to serve.
As long as these folder exist (they can be empty) Umbraco 4/6 will be happy.

  1. App_Data\
  2. App_Data\TEMP\ExamineIndexes
  3. App_Data\Logs
  4. App_Data\preview

Not required / Ignore

Cache (e.g. locally created files)

App_Data/TEMP/ExamineIndexes/*  
App_Data/umbraco.config  
App_Browsers/*
App_Data/Cache/*
App_Data/TEMP/*  
App_Data/TEMP/ClientDependency/*  
App_Data/courier/cache/*  
App_Data/courier/revisions/*  
App_Data/justDelete_*  
App_Data/Preview/*  
App_Data/_systemUmbracoIndexDontDelete/*  

Log files

App_Data/Logs/*  
App_Data/courier/logs/*  
App_Data/Elmah Logs/*  
App_Data/umbraco.licensing.log.txt  

Deployment

If you follow the above rules, your deployment should only contain the files and folder required for Umbraco to serve. You can safely overwrite (not delete) the App_Data folder on each deployment.

Notes in some older versions of Umbraco it gets a little upset if the installedPackages.config and createdPackages.config files are missing. However, in recent versions Umbraco will just automatically recreate these files. I tend not to include these files, but it's personally preference really.

Finial answered 4/12, 2013 at 11:45 Comment(1)
NOTE TO OTHERS: This is the actual full answer.Inflated
R
7

The folder should exist and be writable as it is where things like your Examine search indexes will be published as well as ClientDepenency cache if you are using it.

Ryannryazan answered 8/5, 2013 at 12:1 Comment(5)
Does umbraco re-create TEMP files if I do not publish it, and is my local TEMP data compatible with server's in case I decide to push all I have to server?Albanian
To clarify I am ok with copying folder, but should I copy content?Albanian
You don't need to publish the TEMP folder, Umbraco will recreate everything that needs to be in thereLanie
As @MartijnvanderPut says, if you don't create the folder it will be created as long as your permissions are correct on the App_Data folder . If you do upload your local folder contents you may encounter some peculiarities due to your Examine index being out of sync with your remote site and possibly the same for your ClientDependency cache.Ryannryazan
Thank you, that makes sense to me, I was being persuaded that I should publish/keep TEMP folder but just did not have sense to me :)Albanian
C
4

In general, if publishing from one server to another, I would avoid publishing the contents of /App_Data/Temp/. Some of the files that are contained in those folders have machine specific file paths in that may not work on the new server if the website's file path is different.

The entire contents of the folder should be recreated when the website spins up if the folder is empty.

Commix answered 21/5, 2013 at 14:52 Comment(2)
I would second this approach. I have had a site transferred from one server to another stop working until the ExamineIndexes and ClientDepency folders were deleted. When the application restarts, these folders are rebuilt and include some info that is tied to the machine.Careaga
Note that - when copying site A to site B on the same server (i.e. to replicate the original site A) - publishing site B will result in updates being made to site A, based on the contents of those files in App_Data/ClientDependency. It's a very nasty surprise.Raddatz
K
0

I've done both, and both times I've had peculiarities, but republishing all nodes/re-indexing sorts it out, and I do either depending on what's gone before as a matter of course now.

Kyanite answered 8/5, 2013 at 23:11 Comment(1)
It's also worth noting the index's get cached in memory, so once you rebuild the index, you also need to recycle the application.Finial

© 2022 - 2024 — McMap. All rights reserved.