Skip to content
This repository has been archived by the owner on Feb 20, 2024. It is now read-only.

Errors on Windows 8 #129

Open
micayael opened this issue Apr 26, 2017 · 4 comments
Open

Errors on Windows 8 #129

micayael opened this issue Apr 26, 2017 · 4 comments

Comments

@micayael
Copy link

Hi.

I am using this bundle on unix and it's great! Now I want to use it on windows and I have two errors:

  1. It says that "export" is a not found command. I am debugging and I see this command:
export PGPASSWORD="postgres" && pg_dump --username "postgres" --host 127.0.0.1 --port 5432 --format plain --encoding UTF8 "prest" > "file.sql"

I understand that windows does't use export. Is there a way to use it in windows.

I found this line at Dizda\CloudBackupBundle\Database\BaseDatabase

$process = new Process($command, null, null, null, $this->timeout);

The environment variables shoudn't be at the third argumen for compatibility as an array?

  1. It says that pg_dump is not found and I already added the "POSTGRES\bin" directory on $PATH

Is there a way to help me?

This is my config

dizda_cloud_backup:
    output_file_prefix: localhost
    timeout: 300
    restore: true
    processor:
        type: zip
        options:
            compression_ratio: 6
            password: "%secret%"
            split:
                enable: false
                split_size: 1000
                storages: [Dropbox]
    folders: []
    cloud_storages:
        dropbox_sdk:
            remote_path: /backups
            access_token: "%token%"
    databases:
        postgresql:
            database: "%database_name%"
            db_host: "%database_host%"
            db_port: "%database_port%"
            db_user: "%database_user%"
            db_password: "%database_password%"
@micayael
Copy link
Author

I do some hot fix here for the fist problem

@micayael
Copy link
Author

ping @dizda

@micayael
Copy link
Author

micayael commented May 3, 2017

Hi @dizda, thanks for reply. I know that I can use those options for setting an environment variable. The problem is that the command generated for the bundle is this:

export PGPASSWORD="postgres" && pg_dump --username "postgres" --host 127.0.0.1 --port 5432 --format plain --encoding UTF8 "prest" > "file.sql"

It begins with export so windows throws an error.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants