Page 1 of 1
Backup Vesta to Backblaze B2
Posted: Tue Dec 22, 2020 9:57 pm
by webxtek
Before starting check if you got Python installed, i did this with PIP3
1st:
Install B2_Command_Line_Tool
https://github.com/Backblaze/B2_Command_Line_Tool
2nd:
Update Vesta config $VESTA/conf/vesta.conf BACKUP_SYSTEM (local,b2 or only b2)
3nd:
Create $VESTA/conf/b2.backup.conf contains
BUCKET=<bucket_name>
B2_KEYID=<Application_Key_ID>
B2_KEY=<key>
- Desktop_screenshot.png (257.26 KiB)
4rd:
Edit your CLI files as the follow :
https://github.com/sexymeow/vesta/pull/1/files
Files to edit:
-v-restore-user
-v-delete-user-backup
-v-backup-user
In case Backblaze B2 Application Keys fail to authorize, heres what i did:
Code: Select all
curl https://api.backblazeb2.com/b2api/v2/b2_authorize_account -u "APPLICATION_KEY_ID:APPLICATION_KEY"
Example:
curl
https://api.backblazeb2.com/b2api/v2/b2 ... ze_account -u "0345234234280000000012:K003234234234234234234czzzz1A"
I followed this instructions:
https://github.com/duplicati/duplicati/issues/3366
it should work, if anyone needs help let me know
Re: Backup Vesta to Backblaze B2
Posted: Tue Dec 22, 2020 11:36 pm
by webxtek
Let's say you want to have daily backups, or weekly, and monthly. You can backup to 2 different buckets, making a CRON task for each one!
You can do as following,
1st
Create a
secondary .conf file for example: b2.backupmonthly.conf
2nd
Create
new bucket and keys for that .conf
BUCKET=<bucket_name>
B2_KEYID=<Application_Key_ID>
B2_KEY=<key>
3nd
Create monthly CLI's (just
duplicate the Clis, rename them, and edit the code for the new .conf file)
- clis example (1).png (2.42 KiB)
Now
you can create a CRON 1 to backup for 1 bucket, and CRON 2 to backup to 2 bucket, you can make one backup every 3 days, and other backup monthly for example...
Inside backblaze panel, you can select buckets and edit "Lifecycle Settings", that way it gets deleted every X days.
For example i will keep:
-every 3 days backups for 1 month (cron1);
-every month backups for 6 months (cron2);
Re: Backup Vesta to Backblaze B2
Posted: Tue Dec 22, 2020 11:48 pm
by webxtek
and thats it, any help you need let me know
Re: Backup Vesta to Backblaze B2
Posted: Wed Dec 23, 2020 1:31 am
by webxtek
@dpeca i need your advice, how can i make those Cli customizations not get deleted with updates? thanks
Re: Backup Vesta to Backblaze B2
Posted: Wed Dec 23, 2020 9:25 am
by myVesta
https://github.com/myvesta/vesta/blob/m ... tinst#L223
Code: Select all
# Run custom triggers
if [ -x "/root/vesta-patch.sh" ]; then
/root/vesta-patch.sh
fi
that script (if exist) will be executed after EVERY update, so you can put there 'patching script' that will apply your modifications after every update.
Re: Backup Vesta to Backblaze B2
Posted: Wed Dec 23, 2020 4:34 pm
by webxtek
are new bin files deleted on update?
If not i could just create new bin files for daily backups, like i did to monthly backups, and keep the original bin files without no customization
what you think?
Re: Backup Vesta to Backblaze B2
Posted: Wed Dec 23, 2020 4:40 pm
by myVesta
Nothing deleted, update will just overwrite existent myVesta files.
Re: Backup Vesta to Backblaze B2
Posted: Wed Dec 23, 2020 4:44 pm
by webxtek
Cool dpeca.
I just created new BIN files, way easier
thank you!
Re: Backup Vesta to Backblaze B2
Posted: Fri Sep 23, 2022 8:39 pm
by webxtek
UPDATED
Re: Backup Vesta to Backblaze B2
Posted: Wed Sep 28, 2022 1:18 pm
by webxtek
this week while migrating one MYVESTACP to another MYVESTACP, i found that while running
Code: Select all
v-restore-user userpanelname userpanelname.2022-09-25_01-00-50.tar
it was giving me a error telling me that i didn't had the permissions, after reading around i found that some people were having troubles restoring backups even on VESTACP with similar issues.
The solution is quite simple, the backup file name has the name of the USER, the DATE, and HOUR & MINUTE, the backup were done, you only need to delete from that the HOUR & MINUTE, and the file will restore without any issues.
IF YOUR FILE NAME LOOKS LIKE THIS:
- 1.jpg (7.08 KiB)
YOU NEED TO CHANGE TO THIS:
- 2.jpg (6.71 KiB)
The bin code would look like this:
Code: Select all
v-restore-user userpanelname userpanelname.2022-09-25.tar