Automated Hoteldruid Backups?
Moderator: marco
Automated Hoteldruid Backups?
Marco, I've installed this wonderful system you've developed and I thank you. Do you know of a way to run backups in an automated way? In the web interface I can obviously push the "Create a New Backup File" button and get a valid backup file. I have done so and have been able to successfully restore the data to a backup server. I would like to be able to script the backup in such a way that it happens without user interaction and on a schedule.
Thanks again!
Thanks again!
Re: Automated Hoteldruid Backups?
It depends on your system which tools you can use to periodically call an URL (cron job with wget, etc.) and there other forums over the Internet where it's more appropriate to discuss this. For what concerns hoteldruid the URLs that must be called to create and download the backup are:
http://yourdomain.com/hoteldruid_path/c ... _backup=SI
http://yourdomain.com/hoteldruid_path/c ... _backup=SI
where you must replace $USER and $PASS whit the username and password of an hoteldruid user that is able to create backups and $YEAR with current hoteldruid year.
Regards,
Marco
http://yourdomain.com/hoteldruid_path/c ... _backup=SI
http://yourdomain.com/hoteldruid_path/c ... _backup=SI
where you must replace $USER and $PASS whit the username and password of an hoteldruid user that is able to create backups and $YEAR with current hoteldruid year.
Regards,
Marco
Problems installing, configuring, upgrading?
Try the easiest way to use HotelDruid:
https://www.digitaldruid.net/hosted/index.php
Try the easiest way to use HotelDruid:
https://www.digitaldruid.net/hosted/index.php
-
- Posts: 15
- Joined: Mon Jan 28, 2013 9:02 pm
- Location: Lehighton, PA, USA
Re: Automated Hoteldruid Backups?
Hi Marco,
Should this approach to automated backups still work with version 2.1.4? I tried a couple of wget calls in a bash script substituting real values for the variables as such:
The wget calls download files called: crea_backup.php?nome_utente_phpr=backup, crea_backup.php?nome_utente_phpr=backup.1, crea_backup.php?nome_utente_phpr=backup.2... But never cause a hoteld_backup.php file to be created. I do see a hoteld_backup.php.lock file if that is useful info.
Where should I start to investigate what is going wrong?
Thanks for any help you can offer!
Mark Clayton
Should this approach to automated backups still work with version 2.1.4? I tried a couple of wget calls in a bash script substituting real values for the variables as such:
Code: Select all
#! /bin/bash
USER=backup
PASS=secrets
YEAR=2017
wget http://lizzy.local./hoteldruid/crea_backup.php?nome_utente_phpr=$USER&password_phpr=$PASS&anno=$YEAR&crea_backup=SI
wget http://lizzy.local./hoteldruid/crea_backup.php?nome_utente_phpr=$USER&password_phpr=$PASS&anno=$YEAR&mostra_header=NO&salva_backup=SI
Where should I start to investigate what is going wrong?
Thanks for any help you can offer!
Mark Clayton
--
http://www.LizardCreekPA.com
http://www.LizardCreekPA.com
Re: Automated Hoteldruid Backups?
Hi clayton256,
I wrote this script for my backups, it use mysqldump for the database, tar for the file and then this script https://github.com/andreafabrizi/Dropbox-Uploader to upload all in dropbox. The backups will be organized in folder like HD-YEAR-MONTH and inside the backups of each days (you can use a cronjob each night). When the space is full you can easily delete from dropbox entire month with just 1 click.
Hope it can help you.
I wrote this script for my backups, it use mysqldump for the database, tar for the file and then this script https://github.com/andreafabrizi/Dropbox-Uploader to upload all in dropbox. The backups will be organized in folder like HD-YEAR-MONTH and inside the backups of each days (you can use a cronjob each night). When the space is full you can easily delete from dropbox entire month with just 1 click.
Hope it can help you.
Code: Select all
#!/bin/bash
td=tmpbackup
giorno=$(date +%d)
file=hd-$(date +%Y_%m_%d-%H_%M)
cart=$(date +%Y_%m)
/usr/bin/mysqldump -u USER -pPASSWD NAME_DB > $td/$file.sql
tar czfP $td/$file.tgz domains/yoursite.com/public_html/hoteldruid $td/$file.sql
./dropbox_uploader.sh upload $td/$file.tgz /hd-$cart/$giorno/$file.tgz
rm $td/$file.tgz
rm $td/$file.sql
-
- Posts: 15
- Joined: Mon Jan 28, 2013 9:02 pm
- Location: Lehighton, PA, USA
Re: Automated Hoteldruid Backups?
Hi Matteo46,
Thanks for your reply. Sorry I didn't see your reply until now. I thought I would get an notification on this thread but I didn't.
I went down this same path before I heard about the builtin backup/restore feature. Ultimately, I'm trying to build a link
between two installs to push changes instead of the builtin's pull mechanism.
Thanks again,
Mark
Thanks for your reply. Sorry I didn't see your reply until now. I thought I would get an notification on this thread but I didn't.
I went down this same path before I heard about the builtin backup/restore feature. Ultimately, I'm trying to build a link
between two installs to push changes instead of the builtin's pull mechanism.
Thanks again,
Mark
Matteo46 wrote:Hi clayton256,
I wrote this script for my backups, it use mysqldump for the database, tar for the file and then this script https://github.com/andreafabrizi/Dropbox-Uploader to upload all in dropbox. The backups will be organized in folder like HD-YEAR-MONTH and inside the backups of each days (you can use a cronjob each night). When the space is full you can easily delete from dropbox entire month with just 1 click.
Hope it can help you.
Code: Select all
#!/bin/bash td=tmpbackup giorno=$(date +%d) file=hd-$(date +%Y_%m_%d-%H_%M) cart=$(date +%Y_%m) /usr/bin/mysqldump -u USER -pPASSWD NAME_DB > $td/$file.sql tar czfP $td/$file.tgz domains/yoursite.com/public_html/hoteldruid $td/$file.sql ./dropbox_uploader.sh upload $td/$file.tgz /hd-$cart/$giorno/$file.tgz rm $td/$file.tgz rm $td/$file.sql
--
http://www.LizardCreekPA.com
http://www.LizardCreekPA.com
Re: Automated Hoteldruid Backups?
Two backups are better than one 

Re: Automated Hoteldruid Backups?
Hello Mark,
try to use quotes around wget urls. Also the urls are a little wierd (maybe you want to replace "lizzy.local." with "localhost"?).
Regards,
Marco
try to use quotes around wget urls. Also the urls are a little wierd (maybe you want to replace "lizzy.local." with "localhost"?).
can you check what these files contain?clayton256 wrote: The wget calls download files called: crea_backup.php?nome_utente_phpr=backup, crea_backup.php?nome_utente_phpr=backup.1, crea_backup.php?nome_utente_phpr=backup.2... But never cause a hoteld_backup.php file to be created. I do see a hoteld_backup.php.lock file if that is useful info.
Regards,
Marco
Problems installing, configuring, upgrading?
Try the easiest way to use HotelDruid:
https://www.digitaldruid.net/hosted/index.php
Try the easiest way to use HotelDruid:
https://www.digitaldruid.net/hosted/index.php
Re: Automated Hoteldruid Backups?
Hi,
the URI's youve posted bring you to the backup interface of hoteldruid but they dont start the download.
Is there any URL parameter to immediatly start the download? Otherwise its not usuable via cron/wget.
cheers,
Arnd
the URI's youve posted bring you to the backup interface of hoteldruid but they dont start the download.
Is there any URL parameter to immediatly start the download? Otherwise its not usuable via cron/wget.
cheers,
Arnd
Re: Automated Hoteldruid Backups?
Hello Arnd,
that's why there are 2 URLs in my original post, one to create the backup and the other to download it.
Regards,
Marco
that's why there are 2 URLs in my original post, one to create the backup and the other to download it.
Regards,
Marco
Problems installing, configuring, upgrading?
Try the easiest way to use HotelDruid:
https://www.digitaldruid.net/hosted/index.php
Try the easiest way to use HotelDruid:
https://www.digitaldruid.net/hosted/index.php