[#wallet-RestoreWallet] = xref:wallet.adoc[wallet]::RestoreWallet :relfileprefix: ../ :mrdocs: Restore a wallet from a backup file. == Synopsis Declared in `<wallet/wallet.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- std::shared_ptr<CWallet> RestoreWallet( xref:wallet/WalletContext.adoc[WalletContext]& context, xref:fs/path.adoc[fs::path] const& backup_file, std::string const& wallet_name, std::optional<bool> load_on_start, xref:wallet/DatabaseStatus.adoc[DatabaseStatus]& status, xref:bilingual_str.adoc[bilingual_str]& error, std::vector<bilingual_str>& warnings, bool load_after_restore = true, bool allow_unnamed = false); ---- == Return Value The restored wallet, or nullptr on failure. == Parameters [cols="1,4"] |=== | Name| Description | *context* | The wallet context to restore into. | *backup_file* | Path to the backup file to restore from. | *wallet_name* | The name to give the restored wallet. | *load_on_start* | Optionally set whether the wallet loads on startup. | *status* | Set to the database status. | *error* | Set to an error message on failure. | *warnings* | Warnings produced while restoring. | *load_after_restore* | Whether to load the wallet after restoring. | *allow_unnamed* | Whether an empty wallet name is allowed. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#