Restoring the backup


I have taken backup using following command.
bench --site [sitename] backup

When i have restored that backup file then whatever customization i have did on Opportunity doctype it havent reflected. Is there any way to get complete everything whatever u have done so far after restoring?

Not knowing what triggered your restoring:

If the database connected to the site you created in the bench is still fine, you should be able to find the missing documents (database records) in the tables of it.

You can try to find it using:

bench --site <your site's name> mariadb

and there you have access to all the tables. Try for instance:

show tables like "tabOpport%";

You may need to locate linked records in other tables because Info that appears in one doctype’s form can be fragmented (= in different locations) in the database.

Good luck!

Try using this method.


bench --site [sitename] backup --with-files


bench --site [sitename] --force restore [path sql database which file name] --with-private-files[filename] --with-public-files[filename]

and then

bench migrate **or** bench --site [sitename] migrate

What is your solution doing to documents entered after the last backup?

Are they kept in the database, or deleted from the last point of their existence, from which they might have been recoverable?

That’s a real question, I just don’t know.

It would be interesting to have a tool which scraps all docs created or modified after the last backup from a database, if still possible.

Have you tried the backup and restore commands I mentioned above?

This command not only backs up the database, it also backs up all files and custom doctypes that you did on the previous system