DocCyblade / tkl-odoo

Turnkey Linux - Odoo v8 (Published v14.2)
https://www.turnkeylinux.org/odoo
GNU General Public License v3.0
21 stars 24 forks source link

Optimised TKLBAM profile #69

Open JedMeister opened 8 years ago

JedMeister commented 8 years ago

The current TKLBAM profile is blank. That's ok but ideally it should have caching and/or temp locations excluded in that at some point in the future.... It will reduce the size of the backups (as the backup will include all the Odoo code).

DocCyblade commented 8 years ago

Are these requirements for release?

JedMeister commented 8 years ago

Oops missed this... No this is fine as it; but would be a great improvement for users.

l-arnold commented 8 years ago

I am not aware of any Cache files. If the Log Files are rolling over they won't expand indefinitely. Not sure if they do.

JedMeister commented 8 years ago

The log files should probably be handled by logrotate. E.g. http://www.thegeekstuff.com/2010/07/logrotate-examples/

And I can't be 100% sure, but I'd be very surprised if Odoo wasn't caching files somewhere.

Also being a python based application then I imagine that there would be .pyc (compiled python) files wherever the .py files are. These files are auto generated when python scripts are first executed. When a python script is executed python checks for a .pyc file first. If one exists it then checks against the relevant .py script. If the .py file is newer (i.e. the python script has changed since last time it was run) or a .pyc doesn't exist at all then it will (re)compile the python code on the fly to create a new .pyc. This makes running python code on subsequent occasions faster but the performance hit is not that great so removing them for the backup is no real issue. OTTOH I don't think that any of the other profiles exclude them so this is definitely not necessary.

DocCyblade commented 8 years ago

@l-arnold since you run Odoo your self, what "data" should TKLBAM backup. I know Odoo has a backup feature but let's assume we want TKL to do it for us. We don't need the program files just the data correct? @JedMeister right on that?

JedMeister commented 8 years ago

TBH my inclination would be to exclude what you don't need (i.e. cache, temp, etc). Some apps do DB caching too.

As it is, the backup should be working ok for Odoo (although TBH I haven't tested). The way TKLBAM is designed is that if it's not optimised it will just include some junk it doesn't really need (which is better than not including stuff that it does need).

Hopefully Odoo document where the cahce and temp files go; so in theory it should be fairly straight forward. Testing to make sure it all still works will be the really important part...

If an instance of Odoo running on AWS that you can both have access to would help please let me know and I'll set one up.

DocCyblade commented 8 years ago

@JedMeister sounds good! What testing should be done? I am thinking

BACKUP SOURCE / TARGET RESTORE ISO / ISO ISO / AWS ISO / LXC AWS / ISO AWS / AWS AWS / LXC LXC / LXC LXC / ISO LXC / AWS

Also, how would I go about testing or creating template. You can explain or point me to the docs :-)

JedMeister commented 8 years ago

TKLBAM profile info is touched on here: https://www.turnkeylinux.org/faq/how-does-tklbam-know-what-backup-my-system

Full info in the repo here: https://github.com/turnkeylinux/tklbam-profiles/blob/master/README.rst

For the purposes of testing I suggest just using the overrides: https://www.turnkeylinux.org/docs/tklbam/man/tklbam-backup

As for your source/target testing, that wouldn't hurt although testing that exhaustively probably isn't required. The parts of the filesystem that are being backed up should be consistent across build types. However for completeness (considering the SystemD vs SysVInit differences) it's probably a good idea to check LXC separately.

However it would be good to check restoring to a clean/new system as well as restoring back to the same system...

DocCyblade commented 8 years ago

Roger that. I'll do some reading tonight. Getting ready to leave work now. Another 13 hour day! Thanks for the info

JedMeister commented 8 years ago

Wow big day! I suggest that you lay back and put your feet up with a cold beverage (or maybe a warm one is better this time of year for you?) when you do your reading! :smile:

l-arnold commented 8 years ago

I am not aware of any Cache type files etc that build up in Odoo (as they do in Magento)(.

It seems TKLBAM works ok, but will give it a spin this week. Have not had a lot of desk time recently but need to zero in the next few days.