Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

confused about TempZipFileDir #5

Closed
Zixim opened this issue Feb 23, 2019 · 8 comments
Closed

confused about TempZipFileDir #5

Zixim opened this issue Feb 23, 2019 · 8 comments
Assignees
Labels
question Further information is requested

Comments

@Zixim
Copy link

Zixim commented Feb 23, 2019

If this is in the config file ( PlexBackup.ps1.json ) :

    "TempZipFileDir": {
        "hasValue": true,
        "value": null

then does the compression staging happen in windows TEMP folder ?

@alekdavis
Copy link
Owner

alekdavis commented Feb 23, 2019

No, this means: do not use the staging folder and compress directly in the backup directory. To compress using the staging TEMP folder, remove the hasVaue attribute.

@alekdavis
Copy link
Owner

Does this make sense?

@Zixim
Copy link
Author

Zixim commented Feb 24, 2019

I don't want to have a temp file during the compression.
So the default setting in the configuration file is what i want :

Compress directly to BackupRootDir :

"TempZipFileDir": {
        "hasValue": true,
        "value": null
},

For posterity :
In case some one wants to use a temporary compression file in Windows temp, what would the config look like ?
What about if the staging needs to happen in D:\some_temp_folder\ ?

@alekdavis
Copy link
Owner

alekdavis commented Feb 24, 2019

If you want to stage compression to the temp directory, use:

'TempZipFileDir' : { 'value' : null }

If staging needs to happen in some temp folder, use:

'TempZipFileDir' : { 'value' : 'D:\\some_temp_folder\\'}

@Zixim
Copy link
Author

Zixim commented Feb 24, 2019

erm...back to confused...

use windows temp : 'TempZipFileDir' : { 'value' : null }
use specific folder : 'TempZipFileDir' : { 'value' : 'D:\\some_temp_folder\\'}
don't use any staging : ???

@alekdavis
Copy link
Owner

alekdavis commented Feb 24, 2019

You just posted the example of not using staging above and it is absolutely correct:

"TempZipFileDir": {
        "hasValue": true,
        "value": null
}

@Zixim
Copy link
Author

Zixim commented Feb 24, 2019

whats the difference between
'TempZipFileDir' : { 'value' : null }
and

"TempZipFileDir": {
        "hasValue": true,
        "value": null
}

@alekdavis
Copy link
Owner

alekdavis commented Feb 24, 2019

By default, if the value of a property in the config file is null/empty string/false/0 (i. e. if it is evaluated to $false by PowerShell, sure as if (!$value)), the script will not use if (it will assume that the value is not specified), so the default value or the value specified via command line will be used. But if you set the hasValue property to true, the script will use it even if it evaluated to $false. Makes sense?

@alekdavis alekdavis self-assigned this Feb 26, 2019
@alekdavis alekdavis added the question Further information is requested label Mar 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants