Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Artificial Intelligence
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Property Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    • Referral Program
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
Help

Open Upgrade: Attachments (Invoice PDF's) lost when upgrading Odoo 16 to Odoo 17.

Subscribe

Get notified when there's activity on this post

This question has been flagged
restore
2 Replies
1653 Views
Avatar
Santiago Carbonell Forment
I'm trying to migrate a Odoo16 to Odoo17 database using OpenUpgrade and its working fine, but the attached pdf in invoice sales are lost. I though that when you migrate, you always lose that attached file and if you delete from the invoice sales and recreate a new one and it's working but I've realized that the problem is with the restored database:

When I backup my database from Odoo16 from the UI using the complete zip is 317Mb. Then, I restore that database and migrate using OpenUpgrade and if then try to rebackup from Odoo17 from the UI using the same complete zip is 71Mb, so where is the space?

I think the problem is when I try to restore the backup from Odoo16 in Odoo17. If I check the space of database filestore and I see that Odoo17 is smallest than the Odoo16 in /home/odoo/.local/share/Odoo/filestore, so something I'm doing wrong in backup and restore using the UI. All both OS has enought space in the disk

I understand, I cannot restore the database in Odoo17 and then copy/paste the same filestore from Odoo16 to Odoo17 and that is a bad practice

What is the right way of restoring an Odoo database? or Why the UI is not restoring in the right way the filestore of the database? Can you help me?

In case it helps, when I restore my client's database from their Odoo16 to my Odoo16, initially from the UI, the whole process is correct and the space in the filestore matches the backup zip file 317Mb.

Thanks

0
Avatar
Discard
Avatar
CandidRoot Solutions
Best Answer

Hello Santiago,

I hope you are doing great.

You have correctly identified that the Filestore (PDFs and attachments) is missing, which explains why the backup size dropped from 317Mb to 71Mb.

The Root Cause: The issue is in this step: "I restore that database [Odoo 16] using the Odoo 17 UI." The "Restore" button in Odoo 17 is designed to accept Odoo 17 backups. When you force an Odoo 16 backup into it, the system often accepts the data (SQL) but fails to correctly unpack the filestore (attachments) because the version signature doesn't match, resulting in data loss.

Clarification on "Bad Practice": You mentioned that "copy/pasting the filestore is bad practice." Actually, for OpenUpgrade migration, manually moving the filestore is the correct and required procedure. The migration script only updates the database structure; it assumes the files are already sitting in the correct folder.

The Correct Steps to Fix This:

  1. Do not use the Odoo 17 UI to restore.

  2. Extract your Odoo 16 Zip file manually on your computer. You will see a filestore folder and a dump.sql file.

  3. Restore the SQL: Load the dump.sql into the database using the command line.

  4. Move the Files: Copy the extracted filestore folder into your Odoo 17 filestore location manually.

  5. Run OpenUpgrade: Now run the migration script.

Since the files (PDFs) are physically there before the migration starts, Odoo 17 will successfully link to them, and your invoices will be perfect.

Thanks & Regards 

CandidRoot Solutions Pvt. Ltd.
Mobile: (+91) 8849036209
Whatapp: (+91) 8849036209

Email: info@candidroot.com
Web: https://www.candidroot.com

2
Avatar
Discard
Avatar
Cybrosys Techno Solutions Pvt.Ltd
Best Answer
Hi,

In Odoo, invoice PDFs are stored in the filestore, not in PostgreSQL, and the database only contains references to those files (ir_attachment).
Restoring an Odoo 16 backup directly into Odoo 17 using the UI is not safe; the UI restore process is only reliable when restoring into the same major version, which is why the filestore ends up much smaller.
OpenUpgrade does not delete or drop attachments; it reuses the existing filestore during the migration.
The missing PDFs appear because the filestore was never fully restored, not because the migration removed them; recreating invoices works because new PDFs are generated.
Manually copying the filestore from Odoo 16 to Odoo 17 after restoring the database is bad practice and can break attachment references.
The correct approach is to restore the backup in Odoo 16 first (verifying the filestore size matches the backup) and only then run OpenUpgrade to migrate the database to Odoo 17.

Hope it helps.

0
Avatar
Discard
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Sign up
Related Posts Replies Views Activity
The following modules are needed by other modules but have not been defined,
restore
Avatar
1
Feb 25
88
Accident how to restore remove from view
restore
Avatar
Avatar
1
Nov 24
3453
Restore database from flat files only
restore
Avatar
Avatar
1
Apr 24
3392
Howto fully restore a database? (odoo.sh v13) Solved
restore
Avatar
1
Aug 20
9751
How to Restore and override the same database from its own backup file
restore
Avatar
Avatar
Avatar
Avatar
4
Feb 18
11120
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk Slovenščina Español (América Latina) Español Svenska ภาษาไทย Türkçe українська Tiếng Việt

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now