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

Feature: Add multiple pxar-name - backupdir tuples in a single job #22

Open
creanet-64 opened this issue Mar 16, 2024 · 4 comments
Open
Assignees

Comments

@creanet-64
Copy link

Hello,

Thank you for this superb initiative which fills a serious gap when you want to harmonise the backups of windows servers with those of vms.

I want to back up two directories on a Windows server, so I've created a batch file with two identical lines except for the backupdir.

My problem is that the name of the pxar is identical between the two jobs:

  • the first job runs and generates a backup.pxar.didx entry on the PBS
  • the second job runs after the first job has finished and generates a second backup.pxar.didx entry in a second instance on my datastore.

When the prune job runs on the PBS server, it systematically deletes one of the two entries, almost certainly thinking that they are the same as they are launched on the same day (it actually does what I told him as I only want to keep one daily).

Would it be possible to define the name of the pxar during the job?
Is it possible to specify several directories for the "backupdir" argument?

Thanks again for any help you can provide.

@nbahbnco
Copy link

It seems that the PXAR name is hardcoded here,in main.go :

archive := &PXARArchive{}
archive.archivename = "backup.pxar.didx"

previousDidx := client.DownloadPreviousToBytes(archive.archivename)

Would patches to specify the pxar name through argument or environment be welcomed?

In the meanwhile, I would advise you use different namespaces per computer.

@creanet-64
Copy link
Author

Hi, thanks for your rapid answer.

The problem is that there are two different directories to be backed up on the same single machine.
I can certainly create a namespace for each directory, but the ideal would be to have a syntax similar to that of the official Linux client, allowing the name of the pxar file to be positioned directly in the backupdir syntax:

-backupdir rep1.pxar: "c:\rep1"

So, launching twice the backup script on two different pxar/directories should be ok and the prune job won't delete one of them randomly.

@nbahbnco
Copy link

Just to be clear, I am not a developer of this project, just someone tracking this out of interest. I think this change should be easy to implement.

@tizbac
Copy link
Owner

tizbac commented Nov 21, 2024

Hi, i'll tackle that issue soon, allowing multiple backups on same machine per job, i have to clean up code a bit first

@tizbac tizbac changed the title Issues and requests Feature: Add multiple pxar-name - backupdir tuples in a single job Nov 21, 2024
@tizbac tizbac self-assigned this 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