Unable to restore configuration in cnMaestro 2.2.1

When I try to restore 4 days old configuration (backup made with the same version of cnMaestro) I get stuck on 25% with message "Failed to import data". I've tried to make a backup and import it back immediately with the same result.

This is the part of operations.log, where the error appears:

2019-07-28 19:37:05,591 - cns.redis - INFO - Redis Connected
2019-07-28 19:37:05,961 - cns.migration - ERROR - Error in extract tar file /srv/storage/tmp/migration/uploads/cnmaestro-import.tar.gz to destination dir /srv/storage/tmp/migration/dumps
2019-07-28 19:37:05,961 - cns.migration - INFO - Cleaning restore files and directories!
2019-07-28 19:37:05,961 - cns.migration - ERROR - Failed restore!
2019-07-28 19:37:05,962 - cns.migration - ERROR - Command 'tar -xvf "/srv/storage/tmp/migration/uploads/cnmaestro-import.tar.gz" -C "/srv/storage/tmp/migration"' returned non-zero exit status 2
2019-07-28 19:37:05,962 - cns.migration - INFO - Publishing json data {'status': 'ERROR', 'account': 'cnmaestro', 'cause': 'Failed to import data!', 'action': 'restore', 'code': 'RESTORE_FAILED'}
2019-07-28 19:37:05,963 - cns.migration - ERROR - Error json data {'status': 'ERROR', 'account': 'cnmaestro', 'cause': 'Failed to import data!', 'action': 'restore', 'code': 'RESTORE_FAILED'} for account cnmaestro
2019-07-28 19:37:05,963 - cns.redis - INFO - Flushing redis db 4 ...
2019-07-28 19:37:05,968 - cns.redis - INFO - Redis Connected
2019-07-28 19:37:05,970 - cns.migration - ERROR - Command 'tar -xvf "/srv/storage/tmp/migration/uploads/cnmaestro-import.tar.gz" -C "/srv/storage/tmp/migration"' returned non-zero exit status 2

1 Like

@Ales Nechvatal 

Could you please try the below steps by ssh to the server/controller? 

  1. copy backup .tar.gz file to test cnmaestro 2.2 server
  2. ungzip backup file > gzip -d <file_name>
  3. Run import command >  sudo cnmaestro-import <file_name.tar after unzipping>
  4. Wait for progress
  5. Wait for the reboot and check the outcome. 

The import was succesful. Good to know, that the exported data didn't get broken during exporting (done using web interface in Firefox).

Is there a problem with uploading the backup with Firefox? Will that be fixed? (it's not very important issue, as there is the command line solution or the use of another browser)