- Community Home
- >
- Software
- >
- HPE OneView
- >
- Re: upload previously backed up file
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2023 04:38 AM - last edited on 10-30-2023 06:15 AM by support_s
10-30-2023 04:38 AM - last edited on 10-30-2023 06:15 AM by support_s
I can't quite figure out the curl syntax to upload a previously downloaded offline backup. So, I broke down and got python-oneview installed. In the examples, it says to upload a backup file with:
backup_details = oneview_client.backups.upload(filename)
I tried replacing filename with '/path/to/backup-file.bkp' but that did not work. Does anyone know how I am supposed to format the filename?
Solved! Go to Solution.
- Tags:
- OneView
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2023 05:39 AM
10-30-2023 05:39 AM
SolutionI figured it out. I ran:
import hpeOneView
from hpeOneView.oneview_client import OneViewClient
from pprint import pprint
from hpeOneView.exceptions import HPEOneViewException
oneview_client = OneViewClient.from_json_file('/root/.oneview/config.json')
backup_details = oneview_client.backups.upload('/data/oneview-backup/oneview_backup_2023-10-27_0923.bkp')
pprint(backup_details)
restores = oneview.client.restores
uri_of_backup_to_restore = backup_details['uri']
options = { "uriOfBackupToRestore": uri_of_backup_to_restore }
restore = resotres.restore(options)
pprint(restore.data)
and it is progressing through the restore!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2023 06:12 AM
10-30-2023 06:12 AM
Re: upload previously backed up file
Hello @bradawk1,
That's excellent!
We are extremely glad to know you were able to figure it out. We appreciate you for keeping us posted.