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

Restore function not working #38

Open
0raculo opened this issue Oct 5, 2020 · 0 comments
Open

Restore function not working #38

0raculo opened this issue Oct 5, 2020 · 0 comments

Comments

@0raculo
Copy link

0raculo commented Oct 5, 2020

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

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

1 participant