-
- Veeam Vanguard
- Posts: 701
- Liked: 138 times
- Joined: Jan 24, 2014 4:10 pm
- Full Name: Geoff Burke
- Contact:
Automated Restore
Hi Folks,
Has anybody setup an automated daily restore (script). I want to have a folder containing certain files to be restored every day to another test Linux server that I have. So the idea would be nightly automated file level backup direct to cloud connect of the folder on one server. Then the next morning automated restore from cloud connect to there other server.
cheers
Has anybody setup an automated daily restore (script). I want to have a folder containing certain files to be restored every day to another test Linux server that I have. So the idea would be nightly automated file level backup direct to cloud connect of the folder on one server. Then the next morning automated restore from cloud connect to there other server.
cheers
Geoff Burke
VMCA2022, VMCE2023, CKA, CKAD
Veeam Vanguard, Veeam Legend
VMCA2022, VMCE2023, CKA, CKAD
Veeam Vanguard, Veeam Legend
-
- Product Manager
- Posts: 5796
- Liked: 1215 times
- Joined: Jul 15, 2013 11:09 am
- Full Name: Niels Engelen
- Contact:
Re: Automated Restore
I’m sure this can be scripted via bash by leveraging veeamconfig. Quickly thinking about it the workflow would be:
- list/get latest restore point
- mount it to a folder
- perform the copy to the original folder / other server (use rsync/scp)
- unmount the backup
- optional: send a mail?
Put this in a crontab and you should be good to go.
- list/get latest restore point
- mount it to a folder
- perform the copy to the original folder / other server (use rsync/scp)
- unmount the backup
- optional: send a mail?
Put this in a crontab and you should be good to go.
Personal blog: https://foonet.be
GitHub: https://github.com/nielsengelen
GitHub: https://github.com/nielsengelen
-
- Veeam Vanguard
- Posts: 701
- Liked: 138 times
- Joined: Jan 24, 2014 4:10 pm
- Full Name: Geoff Burke
- Contact:
Re: Automated Restore
Thanks Niels
That was very helpful. I will give it a try and send feedback if I see anything interesting.
The stuff you can do with Veeam!!!
cheers
That was very helpful. I will give it a try and send feedback if I see anything interesting.
The stuff you can do with Veeam!!!
cheers
Geoff Burke
VMCA2022, VMCE2023, CKA, CKAD
Veeam Vanguard, Veeam Legend
VMCA2022, VMCE2023, CKA, CKAD
Veeam Vanguard, Veeam Legend
-
- Veeam Vanguard
- Posts: 701
- Liked: 138 times
- Joined: Jan 24, 2014 4:10 pm
- Full Name: Geoff Burke
- Contact:
Re: Automated Restore
Hi Niels,
I am working on this but am stuck. Is there a way use veeamconfig to simply restore the latest available backup on a new server? Or is there a way to query the backup id in order to then pipe into a restore command?
I might have this wrong but it seems that to do a restore in a script or command line using veeamconfig you have to know the backup id but I could not find any way of getting that apart from running veeam (i.e. going through the UI) to list the ID's?
cheers
I am working on this but am stuck. Is there a way use veeamconfig to simply restore the latest available backup on a new server? Or is there a way to query the backup id in order to then pipe into a restore command?
I might have this wrong but it seems that to do a restore in a script or command line using veeamconfig you have to know the backup id but I could not find any way of getting that apart from running veeam (i.e. going through the UI) to list the ID's?
cheers
Geoff Burke
VMCA2022, VMCE2023, CKA, CKAD
Veeam Vanguard, Veeam Legend
VMCA2022, VMCE2023, CKA, CKAD
Veeam Vanguard, Veeam Legend
-
- Product Manager
- Posts: 6551
- Liked: 765 times
- Joined: May 19, 2015 1:46 pm
- Contact:
Re: Automated Restore
Right, to restore disks to the most recent state you need to use
If you just want to mount the backup in order to work with the files use
To get backup ids you should use
It will give you something similar to this:
After that you awk/sed/grep things out of it and pipe them to the script.
Thanks!
Code: Select all
veeamconfig backup restore --id <value> --targetDev <value> --backupDev <value>
Code: Select all
veeamconfig backup mount --id <value> --mountDir <value>
Code: Select all
veeamconfig backup list
Code: Select all
node1 FLB3_folder_imported {e7e9acd2-6940-438a-8d74-cfe59290f38c} 2019-05-20 20:31
node1 FLB3_test {9b01faed-1a67-4a45-b201-89b28a8f2e86} Repository_1 2019-05-20 20:28
node1 FLB3_PoC {1fcab1f5-44a0-4fb9-b4d1-c82b55836cda} [Win2016] ReFS 2019-05-20 2019-05-20 20:39
Thanks!
-
- Veeam Vanguard
- Posts: 701
- Liked: 138 times
- Joined: Jan 24, 2014 4:10 pm
- Full Name: Geoff Burke
- Contact:
Re: Automated Restore
Hi PTyde,
I tried those but it does not show anything. This is on the other server. My setup is that I want to test setting up automatic restores on the "DR" Server. In case the original server is no longer available we can always use the UI of course to get the backup ID's but I was trying to automate this a bit.
When I run veeamconfig backup list on the new server it does not show any backups, even though I have just gone into the UI and seen them.
cheers
I tried those but it does not show anything. This is on the other server. My setup is that I want to test setting up automatic restores on the "DR" Server. In case the original server is no longer available we can always use the UI of course to get the backup ID's but I was trying to automate this a bit.
When I run veeamconfig backup list on the new server it does not show any backups, even though I have just gone into the UI and seen them.
cheers
Geoff Burke
VMCA2022, VMCE2023, CKA, CKAD
Veeam Vanguard, Veeam Legend
VMCA2022, VMCE2023, CKA, CKAD
Veeam Vanguard, Veeam Legend
-
- Product Manager
- Posts: 6551
- Liked: 765 times
- Joined: May 19, 2015 1:46 pm
- Contact:
Re: Automated Restore
Did you add the "DR" server and performed rescan of the repos after that?
Thanks!
Code: Select all
veeamconfig vbrserver add --name <name> --address <address> --login
Code: Select all
veeamconfig repository rescan --all
-
- Veeam Vanguard
- Posts: 701
- Liked: 138 times
- Joined: Jan 24, 2014 4:10 pm
- Full Name: Geoff Burke
- Contact:
Re: Automated Restore
Hi P.Tide,
This is a linux agent direct to cloud and a linux agent retrieving direct from the cloud. I added the service provider.
So no local vbr server is present.
cheers
This is a linux agent direct to cloud and a linux agent retrieving direct from the cloud. I added the service provider.
So no local vbr server is present.
cheers
Geoff Burke
VMCA2022, VMCE2023, CKA, CKAD
Veeam Vanguard, Veeam Legend
VMCA2022, VMCE2023, CKA, CKAD
Veeam Vanguard, Veeam Legend
-
- Veeam Vanguard
- Posts: 701
- Liked: 138 times
- Joined: Jan 24, 2014 4:10 pm
- Full Name: Geoff Burke
- Contact:
Re: Automated Restore
Hi Folks,
I have put in a case about this since I can't figure this out Case # 03609534
Will update once done.
cheers
I have put in a case about this since I can't figure this out Case # 03609534
Will update once done.
cheers
Geoff Burke
VMCA2022, VMCE2023, CKA, CKAD
Veeam Vanguard, Veeam Legend
VMCA2022, VMCE2023, CKA, CKAD
Veeam Vanguard, Veeam Legend
-
- Veeam Vanguard
- Posts: 701
- Liked: 138 times
- Joined: Jan 24, 2014 4:10 pm
- Full Name: Geoff Burke
- Contact:
Re: Automated Restore
Support is saying that you need to import the vbm from the other machine but what if this is a disaster and the other machine is no longer. I will make this a feature request, i.e. the ability to import the backups from the cloud using veeamconfig in order to automate restore.
cheers
cheers
Geoff Burke
VMCA2022, VMCE2023, CKA, CKAD
Veeam Vanguard, Veeam Legend
VMCA2022, VMCE2023, CKA, CKAD
Veeam Vanguard, Veeam Legend
-
- Product Manager
- Posts: 6551
- Liked: 765 times
- Joined: May 19, 2015 1:46 pm
- Contact:
Re: Automated Restore
Ok, makes sense. We'll add a more straightforward way of importing backups into VAL via CLI.
Thank you!
P.S. You can also do the following
That's for FLR. A similar approach can be used for device restore as well (veeamconfig backup restore --id <backup id> --targetDev <enum> --backupDev <enum>).
Please note, that although cloud repo will show up after you add cloud server, backup list won't show you backups stored in CC. That is, you have to know backup id from other sources (e.g. the other machine)
Thank you!
P.S. You can also do the following
Code: Select all
veeamconfig cloud add --address <IP> --login <tenant>
<at this point it will prompt you for tenant's password>
veeamconfig cloud resync
veeamconfig backup mount --id <backup id>
Please note, that although cloud repo will show up after you add cloud server, backup list won't show you backups stored in CC. That is, you have to know backup id from other sources (e.g. the other machine)
-
- Veeam Vanguard
- Posts: 701
- Liked: 138 times
- Joined: Jan 24, 2014 4:10 pm
- Full Name: Geoff Burke
- Contact:
Re: Automated Restore
Hi Ptide,
Ok thanks I will give that a try. In fact right now I need to restore a folder so that should work.
cheers
Ok thanks I will give that a try. In fact right now I need to restore a folder so that should work.
cheers
Geoff Burke
VMCA2022, VMCE2023, CKA, CKAD
Veeam Vanguard, Veeam Legend
VMCA2022, VMCE2023, CKA, CKAD
Veeam Vanguard, Veeam Legend
-
- Product Manager
- Posts: 6551
- Liked: 765 times
- Joined: May 19, 2015 1:46 pm
- Contact:
Re: Automated Restore
So, how is it going? Btw, is the other server operating in a standalone mode, or in managed mode?
Thanks!
Thanks!
-
- Veeam Vanguard
- Posts: 701
- Liked: 138 times
- Joined: Jan 24, 2014 4:10 pm
- Full Name: Geoff Burke
- Contact:
Re: Automated Restore
Hi P.Tide,
It is in standalone mode. Right now got busy with some S3 stuff for tiering but will be going back to this project soon. My thought was to have a script grab the vbm from the cloud repository and download to the local new server, then import that so that the backup id's are present then restore. If I have these in managedmode maybe this will be easier?
cheers
It is in standalone mode. Right now got busy with some S3 stuff for tiering but will be going back to this project soon. My thought was to have a script grab the vbm from the cloud repository and download to the local new server, then import that so that the backup id's are present then restore. If I have these in managedmode maybe this will be easier?
cheers
Geoff Burke
VMCA2022, VMCE2023, CKA, CKAD
Veeam Vanguard, Veeam Legend
VMCA2022, VMCE2023, CKA, CKAD
Veeam Vanguard, Veeam Legend
-
- Veeam Vanguard
- Posts: 701
- Liked: 138 times
- Joined: Jan 24, 2014 4:10 pm
- Full Name: Geoff Burke
- Contact:
Re: Automated Restore
Also forgot to mention this is for a cloud direct linux agent. I don't believe you can manage a linux agent from the VAC.
cheers
cheers
Geoff Burke
VMCA2022, VMCE2023, CKA, CKAD
Veeam Vanguard, Veeam Legend
VMCA2022, VMCE2023, CKA, CKAD
Veeam Vanguard, Veeam Legend
-
- Product Manager
- Posts: 6551
- Liked: 765 times
- Joined: May 19, 2015 1:46 pm
- Contact:
Re: Automated Restore
Right, that feature is not available yet.I don't believe you can manage a linux agent from the VAC.
Not really, since managed mode does not allow users to perform restores in CLI.If I have these in managed mode maybe this will be easier?
Thanks!
Who is online
Users browsing this forum: No registered users and 2 guests