I've inserted a button that successfully performs the procedure of back-up of the database.
Two questions:
1) is it possible to assign for other users the backup procedure in "access level"?! (and avoid "Access Denied"?!)
2) would it be possible to download the gzip backup file instead of keeping it on the server!?
Thanks ...
Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
Backup Procedure
-
- nuBuilder Team
- Posts: 4297
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 444 times
- Contact:
Re: Backup Procedure
Hi,
Create a new Procedure that will run nuBuilder's backup procedure and assign access levels.
The variable $dump_file contains the path to the file. Use readfile() to download it to the browser.
Create a new Procedure that will run nuBuilder's backup procedure and assign access levels.
Code: Select all
$p = nuProcedure('nubackup');
eval($p);
-
- Posts: 41
- Joined: Thu Sep 30, 2021 10:32 am
Re: Backup Procedure
I created the procedure with your code, tested.... works, assigned to userA, login with the userA, click on the button and ... Access To Procedure Denied... (nubackup)
it's seems only for the administrator....
it's seems only for the administrator....
-
- nuBuilder Team
- Posts: 4297
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 444 times
- Contact:
Re: Backup Procedure
What code does the button run?
It's supposed to run
It's supposed to run
Code: Select all
nuRunPHPHidden('create_backup',0)
-
- Posts: 41
- Joined: Thu Sep 30, 2021 10:32 am
Re: Backup Procedure
Hello,
I tried to use the var $dump_file to get the filename but it seems this is not working for me.
Here's the value of "$dump_file" after creating a dump file (the file was created on the server):
Any idea what I'm doing wrong here?
Thanks in advance,
Oli
I tried to use the var $dump_file to get the filename but it seems this is not working for me.
Here's the value of "$dump_file" after creating a dump file (the file was created on the server):
Code: Select all
L21udC93ZWIxMDMvZDAvODIvNTcwMDg4Mi9odGRvY3Mvd2ViYXBwL2NvcmUvbGlicy9teXNxbGR1bXAvZHVtcHMvMTEtMjYtMjAyMV8wODozMjo0Ml9udUJ1aWxkZXJfYmFja3VwLnNxbC5nemlw
Thanks in advance,
Oli
-
- nuBuilder Team
- Posts: 4297
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 444 times
- Contact:
Re: Backup Procedure
It's base 64 encoded, try decoding it:
Code: Select all
base64_decode($dump_file);
Re: Backup Procedure
Thanks a lot kev!n !
kev1n wrote:It's base 64 encoded, try decoding it:
Code: Select all
base64_decode($dump_file);