Openbravo Issue Tracking System - Openbravo Deployment Options
View Issue Details
0039638Openbravo Deployment OptionsOpenbravo Appliance 18.04public2018-11-15 16:212018-11-20 18:25
shuehner 
priyam 
urgentcriticalhave not tried
closedfixed 
5
 
 
shuehner
0039638: backup system: sync-method sync-s3 fails if one of /backups/auto or /backups/manual is missing
When one of the folders:
/backups/auto
or
/backups/manual

is missing and upload to S3 is configure. Then the upload fails completely.

That is regression introduced in recent commit 2cff68d101e6

That situation is very common as the folders are created only when needed.
2 ways:
common preparation:
  - activate backups + synchronization to S3
  http://wiki.openbravo.com/wiki/Installation/Appliance/Config#Amazon_S3_sync_plugin [^]
Make sure to not run any backups (neither auto nor manual)

a.)
- keep automatic backups disabled
  run openbravo-backup
  # That will create manual folder but auto is still missing
  Notice error in running S3 upload because of missing /backups/auto

- Without running manual backup ever
  Configure to run automatic backup
  # That will auto-create auto folder but manual will be still missing
  Notice error in /var/log/openbravo/openbravo-backup.log about missing manual folder
Check if same or similar bug happens in sync-label method changed in same commit above.

Either:
a.) Create both folders more eagerly to ensure their existence
b.) Rewrite above commit to not manually upload /backups/auto /backup/manual
But instead upload (as before) all of /backups + add --exclude option
To skip uploading 'tmp' which was the goal of the commit above.
No tags attached.
Issue History
2018-11-15 16:21shuehnerNew Issue
2018-11-15 16:21shuehnerAssigned To => staffrm
2018-11-20 18:20shuehnerStatusnew => scheduled
2018-11-20 18:20shuehnerAssigned Tostaffrm => shuehner
2018-11-20 18:23shuehnerNote Added: 0108017
2018-11-20 18:23shuehnerStatusscheduled => resolved
2018-11-20 18:23shuehnerResolutionopen => fixed
2018-11-20 18:23shuehnerAssigned Toshuehner => priyam
2018-11-20 18:25shuehnerReview Assigned To => shuehner
2018-11-20 18:25shuehnerNote Added: 0108018
2018-11-20 18:25shuehnerStatusresolved => closed

Notes
(0108017)
shuehner   
2018-11-20 18:23   
Fixed in openbravo.deb version 306
That update will be installed same as any other system (ubuntu) updates.

Current version in an appliance can be with with
dpkg -l | grep openbravo

Fix of the issue applies idea a.) of the proposed solution.
Garantee existance of the 2 expected folders /backups/auto & /backups/manual by always creating them when running any backup (either automatic or manual).

Changelog of openbravo.deb version 306 is as follows for reference:
  * Fix regression in last 305 version which sync-s3 & sync-label failing
    always if not both folders /backups/auto & /backups/manual existed.
    - That was very typical situation as those folders are only creatd on demand
      when running each of auto-backup and manual backup.
    - Avoid this by creating both manual & auto folders always eagerly now in
      all backups.
(0108018)
shuehner   
2018-11-20 18:25   
Reviewed and tested using latest Q4 packages AMI + manually installing openbravo.deb 306 version.
Re-tested testcase are per appliance testplan:
https://docs.google.com/spreadsheets/d/1MKJyws3JFeBb2fTvpDTe1k-zc5zR-fkCKOAMbGCtOBg/edit#gid=1119497945 [^] (column G)