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

Error namespace and backup-id #35

Closed
Gaetann18 opened this issue Aug 6, 2024 · 2 comments
Closed

Error namespace and backup-id #35

Gaetann18 opened this issue Aug 6, 2024 · 2 comments

Comments

@Gaetann18
Copy link

hello, I am pushing your script a little to save folders individually in snapshoot. Each employee having their own file, I want to be able to save each file independently under the same host.

For example :
WS1/Gaetan
WS1/Arthur
...

This works a priori but as soon as I want to name the files using namespace or backup-id an error occurs, do you have any idea?

Thanks in advance !

image

Currently my script only works as the name is not set correctly. And using your arguments it unfortunately doesn't work


I am attaching my script which works perfectly when you do not add backup-id / namespace

My Script :

REM Dossiers à sauvegarder
set DIRS_TO_BACKUP=C:\Partages\gaetan C:\Partages\arthur

REM Paramètres communs de la commande de sauvegarde
set BASEURL=HIDE
set CERTFINGERPRINT=HIDE
set AUTHID=HIDE
set SECRET=HIDE
set DATASTORE=HIDE


REM Fichier de log
set LOGFILE=C:\save_bps_script\backup_log.txt

REM Nettoyer le fichier de log existant
if exist "%LOGFILE%" del "%LOGFILE%"

REM Boucle à travers les dossiers et exécuter la commande de sauvegarde
for %%D in (%DIRS_TO_BACKUP%) do (
    REM Extraire le nom du dossier pour le namespace
    set "DIRNAME=%%~nD"
    echo Sauvegarde de %%D avec namespace !DIRNAME!
    C:\save_bps_script\proxmoxbackupclient_go.exe -baseurl "%BASEURL%" -certfingerprint %CERTFINGERPRINT% -authid "%AUTHID%" -secret "%SECRET%" -backupdir "%%D" -datastore "%DATASTORE%"
    if errorlevel 1 (
        echo Erreur lors de la sauvegarde de %%D. Consultez le log pour plus de details. 
    )
    echo ---------------------------------------------------------------------- 
)

REM Attendre une interaction de l'utilisateur avant de fermer
echo Sauvegarde terminee. Appuyez sur une touche pour fermer ce script.
pause >nul

endlocal 

  • If y try to use namespace string in command : C:\save_bps_script\proxmoxbackupclient_go.exe -baseurl "%BASEURL%" -certfingerprint %CERTFINGERPRINT% -authid "%AUTHID%" -secret "%SECRET%" -backupdir "%%D" -datastore "%DATASTORE%" -namespace "testnamespace"
Creating VSS Snapshot...Snapshot created: {5260A765-C426-4FF4-9E10-4B1997D3EF20}
Symlink from:  \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy31\  to:  C:\Users\Administrateur\AppData\Roaming\PBSBackupGO\VSS\{5260A765-C426-4FF4-9E10-4B1997D3EF20}
Reading response to upgrade...
Unexpected response code: 404 Not Found
Error making request: Get "HIDE/previous?archive-name=backup.pxar.didx": Authentication error
Found leftover snapshot, deleting it...
panic: Get "HIDE/previous?archive-name=backup.pxar.didx": Authentication error

goroutine 1 [running, locked to thread]:
main.(*PBSClient).DownloadPreviousToBytes(0xc000130580, {0x7ff7a0ba14d9, 0x10})
        /home/runner/work/proxmoxbackupclient_go/proxmoxbackupclient_go/pbsapi.go:432 +0x525
main.main()
        /home/runner/work/proxmoxbackupclient_go/proxmoxbackupclient_go/main.go:119 +0x616
Erreur lors de la sauvegarde de C:\Partages\Eleves. Consultez le log pour plus de details.
----------------------------------------------------------------------

C:\save_bps_script>REM Attendre une interaction de l'utilisateur avant de fermer

If y try to use Backup-id string in command : C:\save_bps_script\proxmoxbackupclient_go.exe -baseurl "%BASEURL%" -certfingerprint %CERTFINGERPRINT% -authid "%AUTHID%" -secret "%SECRET%" -backupdir "%%D" -datastore "%DATASTORE%" -backup-id "testbackupid"

 flag provided but not defined: -backup-id
Usage of C:\save_bps_script\proxmoxbackupclient_go.exe:
  -authid string
        Authentication ID (PBS Api token)
  -backupdir string
        Backup source directory, must not be symlink
  -baseurl string
        Base URL for the proxmox backup server, example: https://192.168.1.10:8007
  -certfingerprint string
        Certificate fingerprint for SSL connection, example: ea:7d:06:f9...
  -datastore string
        Datastore name
  -namespace string
        Namespace (optional)
  -pxarout string
        Output PXAR archive for debug purposes (optional)
  -secret string
        Secret for authentication

@jochumdev
Copy link
Contributor

Hey @Gaetann18

"backup-id" is not yet released, you have to build the binary on you'r own for that.

I recommend you to wait for patch #27 to be merged and use that for you'r use case.

@tizbac
Copy link
Owner

tizbac commented Nov 21, 2024

Duplicate of #22

@tizbac tizbac marked this as a duplicate of #22 Nov 21, 2024
@tizbac tizbac closed this as completed Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants