Quantcast
Channel: 7zbackup - PowerShell Script to Backup Files with 7zip
Viewing all 48 articles
Browse latest View live

Released: 7zbackup v. 2.0.3 Stable (Aug 19, 2016)

$
0
0

Donationware development

Do you like this piece of software ? It took some time and effort to develop.
Please consider supporting the development with a donation by clicking here

This is the NEED 4 SPEED release

Roughly all the code has been refactored to achieve better performance during the scan process. Usage of Out-File has been completely removed in favour of System.IO.StreamWriter. No more illogical waits for the scanning process to take almost longer than the archiving process itself. Speed gains while scanning are now from 5x (minum) up to 20x

You also have now the opportunity to invoke pre and post actions: for example you might want to dump a sqlexpress database before the scanning begins (pre) and then upload the generated archive to an ftp server (post) (see 7zbackup-vars.ps1 for examples)

Change Log since (2.0.2)

  • Code : Reimplemented Set-Alias for Junction.exe binary
  • Code : Parsing of directives from selection file now takes precedence over switches and parameters
  • Bug : Extra "}" removed

Created Release: 7zbackup v. 2.0.3 Stable (ago 19, 2016)

$
0
0

Donationware development

Do you like this piece of software ? It took some time and effort to develop.
Please consider supporting the development with a donation by clicking here

This is the NEED 4 SPEED release

Roughly all the code has been refactored to achieve better performance during the scan process. Usage of Out-File has been completely removed in favour of System.IO.StreamWriter. No more illogical waits for the scanning process to take almost longer than the archiving process itself. Speed gains while scanning are now from 5x (minum) up to 20x

You also have now the opportunity to invoke pre and post actions: for example you might want to dump a sqlexpress database before the scanning begins (pre) and then upload the generated archive to an ftp server (post) (see 7zbackup-vars.ps1 for examples)

Change Log since (2.0.2)

  • Code : Reimplemented Set-Alias for Junction.exe binary
  • Code : Parsing of directives from selection file now takes precedence over switches and parameters
  • Bug : Extra "}" removed

New Post: empty dirs

$
0
0
Hi Allan,
I try to backup with 7backup script but the empty dirs are not saved.
What can i do?
best regards

savino

New Post: empty dirs

$
0
0
Hi savino and thank you for your feed back.

By default empty dirs are not saved. To force the save of empty dirs you must execute
7zBackup.ps1 [...] --emptydirs True

New Post: empty dirs

$
0
0
Hy Anlan,
thank you for your quick response, but i execute the command .\7zBackup.ps1 --type full --selection selection.txt --destpath C:\backup --emptydirs True and an error " Err : Unknown argument True" occured. Without true it shows no errors but not results as well.
What can i try?
kind regards

New Post: empty dirs

$
0
0
Hy Anlan
i think you are very busy, i've tested old release and i can say that the releases > of 7zBackup v. 1.10.3 Stable produce no results with the option --emptydirs
kind regards

New Post: empty dirs

$
0
0
Hello uLinux, Anlan,

I have the same issue using the latest release v2.03 stable version. The empty folders are not archived even with the switch "--emptydirs" added to the 7zBackup,ps1 command. Also uLinux is correct, the "--emptydirs True" is not a valid switch syntax. It has to be "--emptydirs" by itself.

I spent some time reading the source code of the v2.03 7zBackup.ps1 file and I made the following changes to make the empty folders appear in the archive.

the original code starting at line 913
    # If it is an empty directory
If($scanThisPathForRecursion -and (!$childFiles.Count) -and ($BkKeepEmptyDirs -eq $True) -and !($childItemsScanErrors)) {

    # Older versions of 7zip require at least one file to save a folder
    # Newer versions will simply create the folder
    If ([int]$MyContext.SevenZBinVersionInfo.Major -le 9) { 
        # Try to drop a placeholder file and reload child items
        $childFile = New-Item (Join-Path -Path $thisFolder.RelativeName -ChildPath $MyContext.DummyFile) -type File
        If($?) { 
            $Counters.PlaceHolders += $childFile
            $SWriters.Inclusions.WriteLine([string](Join-Path -Path $thisFolder.RelativeName -ChildPath $childFile.Name))
        }
        Return
    } Else {
        $SWriters.Inclusions.WriteLine([string]$thisFolder.RelativeName)
        Return
    }

} 
modified code starting at line 913
    # If it is an empty directory
If($scanThisPathForRecursion -and ($childItems.Count -eq 0) -and ($BkKeepEmptyDirs -eq $True) -and !($childItemsScanErrors)) {

    # Older versions of 7zip require at least one file to save a folder
    # Newer versions will simply create the folder
    If ([int]$MyContext.SevenZBinVersionInfo.Major -le 9) { 
        # Try to drop a placeholder file and reload child items
        $childFile = New-Item (Join-Path -Path $thisFolder.RelativeName -ChildPath $MyContext.DummyFile) -type File
        If($?) { 
            $Counters.PlaceHolders += $childFile
            $SWriters.Inclusions.WriteLine([string](Join-Path -Path $thisFolder.RelativeName -ChildPath $childFile.Name))
        }
        Return
    } Else {
        $SWriters.Inclusions.WriteLine([string]$thisFolder.RelativeName)
        Return
    }

}
The only changes I made are the 2nd condition changed from (!$childFiles.Count) to ($childItems.Count -eq 0)

Please verify if this is one of the viable solutions.

Best regards

New Post: empty dirs

$
0
0
Yep ... shame on me.
hvdz890 is right ... will correct.

Released: 7zBackup v. 2.0.4 Stable (Nov 12, 2016)

$
0
0

Donationware development

Do you like this piece of software ? It took some time and effort to develop.
Please consider supporting the development with a donation by clicking here

This is the NEED 4 SPEED release

Roughly all the code has been refactored to achieve better performance during the scan process. Usage of Out-File has been completely removed in favour of System.IO.StreamWriter. No more illogical waits for the scanning process to take almost longer than the archiving process itself. Speed gains while scanning are now from 5x (minum) up to 20x

You also have now the opportunity to invoke pre and post actions: for example you might want to dump a sqlexpress database before the scanning begins (pre) and then upload the generated archive to an ftp server (post) (see 7zbackup-vars.ps1 for examples)

Change Log since (2.0.3)

  • Code : Minor Code Fixes
  • Feat : Added support for volumized archives by --volumes switch. Volumes are also taken into account in the rotation strategy.

Created Release: 7zBackup v. 2.0.4 Stable (nov 12, 2016)

$
0
0

Donationware development

Do you like this piece of software ? It took some time and effort to develop.
Please consider supporting the development with a donation by clicking here

This is the NEED 4 SPEED release

Roughly all the code has been refactored to achieve better performance during the scan process. Usage of Out-File has been completely removed in favour of System.IO.StreamWriter. No more illogical waits for the scanning process to take almost longer than the archiving process itself. Speed gains while scanning are now from 5x (minum) up to 20x

You also have now the opportunity to invoke pre and post actions: for example you might want to dump a sqlexpress database before the scanning begins (pre) and then upload the generated archive to an ftp server (post) (see 7zbackup-vars.ps1 for examples)

Change Log since (2.0.3)

  • Code : Minor Code Fixes
  • Feat : Added support for volumized archives by --volumes switch. Volumes are also taken into account in the rotation strategy.

New Post: empty dirs

New Post: It hangs at the stage of creating an archive

$
0
0
Hi Allan,

I am trying to configure Group Policy (Computer configuration - Policy - Windows configuration - Scripts (Startup / Shutdown)), using 7zBackup.ps1.

When you run the script, use the account SYSTEM, it hangs at the stage of creating an archive. The error occurs at the stage of copying the files to the newly created file size of 36 bytes.
If the script is run locally on the account SYSTEM - the script is executed fully.

Is it possible to use 7zBackup.ps1 using Group Policy?

New Post: It hangs at the stage of creating an archive

$
0
0
Hi crofforc

are you invoking the script during a startup or a shutdown ?
Which is the version of Windows you're running the script on ?

New Post: It hangs at the stage of creating an archive

$
0
0
Anlan wrote:
are you invoking the script during a startup or a shutdown ?
I tried to call the script and during a startup and than a shutdown.
Anlan wrote:
Which is the version of Windows you're running the script on ?
Group Policy distributed from the Windows Server 2008 R2
I'm on Windows 7 Professional 64 bits
7zbackup v. 2.0.3 Stable and then 7zBackup v. 2.0.4 Stable
7-Zip [64] 9.20 and then 7-Zip [64] 16.04
$PSVersionTable

Name                           Value
----                           -----
CLRVersion                     2.0.50727.5485
BuildVersion                   6.1.7601.17514
PSVersion                      2.0
WSManStackVersion              2.0
PSCompatibleVersions           {1.0, 2.0}
SerializationVersion           1.1.0.1
PSRemotingProtocolVersion      2.1
and then
$PSVersionTable

Name                           Value
----                           -----
PSVersion                      4.0
WSManStackVersion              3.0
SerializationVersion           1.1.0.1
CLRVersion                     4.0.30319.42000
BuildVersion                   6.3.9600.16406
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0}
PSRemotingProtocolVersion      2.2

New Post: 7zBackup v. 2.0.4 Stable.zip

$
0
0
7zBackup v. 2.0.4 Stable.zip is broken. Can you reupload it? Google Chrome sees it as dangerous file, but even if i keep it - scripts are broken inside of archive.
Thank you

New Post: Archive Attrs is not cleared

$
0
0
Hi,
i have the same issue with v2.0.4.

I found the reason.
If in the file names are special characters like
'ä', 'ö' or 'ü', etc..
the archive bits are not cleared then.

Regards...

New Post: Archive Attrs is not cleared

$
0
0
Hello,

I have the same issue with several files too.
To rename them is no solution for me. I found out that in the compress-detail.txt the files with umlaut (ÄÖÜ etc.) are already saved wrong. (the have "??" in their name)
i experimented with the encoding and instead of ?? i now have ++. ^^
so no solution. is there any help for that problem?

regards

New Post: After upgrade to 2.0.4 does not create archive

$
0
0
Hi,

After upgraded 7zBackup from 1.10.3 to 2.0.4 it does not create the 7z archive file although it seems that scanning for files to be included works fine. If I rollback to version 1.10.3 everything works Ok.
PS C:\7zBackup> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.14409.1005
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.14409.1005
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
Although I'm calling 7zBackup.ps1 with --logfile parameter, nothing is written in the logfile.

Thx in advance

New Post: Don't compress files (just copy them) that are known to be badly compressible

$
0
0
Hi everybody.

File types that are already compressed (zip, zipx, rar, bz2, cab, gz, gze, lha, lzh, docx, odg, odp, ods, odt, pdf, ott, pptx, xlsx, avi, mkv, mpg, mpg, mp4, gif, png, jpeg, ogg, aac, flac, mp3, wma, etc...) should not be compressed again but instead just copied.

It would be VERY useful (and way faster compressed backup archives creation) don't compress these files (but still add them to compressed backup archive).

It would be possible (or is it a 7zip limitation? With some zip/gzip based backup programs is possible)?


Many thanks

Created Unassigned: Encoding error: cyrilic file names, cant remove archive bit [22541]

$
0
0
If use hardcoded args for 7-zip stdout to encode in UTF-8, then file names stored in Compress-Detail.txt can't be readed later, when used __Join-Path__ on Russian Windows :
```
$item = Get-Item -LiteralPath (Join-Path $BkRootDir $BkCompressDetailItems[$i].File)
```
Example Compress-Detail.txt:
```
Creating archive C:\backup\automatic\bcp\Bcp-full-20170619-211400.7z
Compressing Catalog-Include.txt
Compressing Catalog-Exclude.csv
Compressing bcp\╤Б╤Д╨Б╨║╨╗╤Л.txt
Everything is Ok
```


Normal output must be:
```
PS C:\_bcp> ls
------ 23.03.2017 10:07 24576 КУРЬЕРЫ ТЕЛЕФОНЫ.doc
------ 19.06.2017 21:02 808 сфЁклы.txt

```
Changing args param from UTF-8
```
$Bk7ZipArgs += "-sccUTF-8"
```
to
```
$Bk7ZipArgs += "-sccWIN"
```
fix this problem..
Viewing all 48 articles
Browse latest View live