Skip to content

Restore function not working #38

@0raculo

Description

@0raculo

On the latest v2 branch the restore function within backup module is not working.
By default it simply refuses to upload the file. I figured we were missing php.ini upload limits.

Within php subfolder where yoy have the Dockerfile, i created the config/php.ini file

php/Dockerfile has to add the COPY routine:
`COPY ./config/php.ini /usr/local/etc/php/

then
docker-compose build

After uploading the archive

Warning: move_uploaded_file(BACKUP_LOCATION/uploads/emoncms-backup-2020-10-05.tar.gz): failed to open stream: No such file or directory in /opt/emoncms/backup/backup-module/backup_controller.php on line 120

Warning: move_uploaded_file(): Unable to move '/tmp/phpdWe3ZM' to 'BACKUP_LOCATION/uploads/emoncms-backup-2020-10-05.tar.gz' in /opt/emoncms/backup/backup-module/backup_controller.php on line 120

Script emoncms-import.sh also doesn't appear to be configured/docker ready.

root@fb01b90d0e64:/opt/emoncms/backup# ./emoncms-import.sh 
=== Emoncms import start ===
2020-10-05-10:10:31
Backup module version:
cat: ./backup/module.json: No such file or directory
EUID: 0
Reading ./config.cfg....
Location of data databases: DATABASE_PATH
Location of emonhub.conf: EMONHUB_CONFIG_PATH
Location of Emoncms: EMONCMS_LOCATION
Backup destination: BACKUP_LOCATION
Backup source path: BACKUP_SOURCE_PATH
Starting import from BACKUP_SOURCE_PATH to BACKUP_LOCATION...
./emoncms-import.sh: line 26: systemctl: command not found
./emoncms-import.sh: line 27: systemctl: command not found
./emoncms-import.sh: line 28: systemctl: command not found
./emoncms-import.sh: line 29: systemctl: command not found
old image
Error: BACKUP_SOURCE_PATH does not exist, nothing to import

How can we import backups for using docker containers?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions