[SOLVED] Run Backup Daily
Moderator: crythias
-
- Znuny newbie
- Posts: 23
- Joined: 29 May 2015, 10:59
- Znuny Version: 4.0.7
- Real Name: RCS
[SOLVED] Run Backup Daily
Just want to know if this are the correct way to backup the whole system?
Say, if the server crashed, will I be able to restore it completely with all these backups?
- Application.tar.gz
- Config.tar.gz
- Database Backup.sql.gz
Also, how to run backup daily?
Thank you so much
Say, if the server crashed, will I be able to restore it completely with all these backups?
- Application.tar.gz
- Config.tar.gz
- Database Backup.sql.gz
Also, how to run backup daily?
Thank you so much
Last edited by rcsdownload on 26 Jun 2015, 11:14, edited 1 time in total.
-
- Znuny guru
- Posts: 2210
- Joined: 13 Mar 2014, 09:16
- Znuny Version: 6.0.14
- Real Name: Rolf Straub
Re: Run Backup Daily
Depends how you define it.
With those files you will be able to restore all data and configuration - yes.
But it will not take care of a broken server, e.g. modules are missing or perl isn't installed.
Daily backup is best run via the backup script and a cron job.
With those files you will be able to restore all data and configuration - yes.
But it will not take care of a broken server, e.g. modules are missing or perl isn't installed.
Daily backup is best run via the backup script and a cron job.
Currently using: OTRS 6.0.14 -- MariaDB -- Ubuntu 16 LTS
-
- Znuny newbie
- Posts: 23
- Joined: 29 May 2015, 10:59
- Znuny Version: 4.0.7
- Real Name: RCS
Re: Run Backup Daily
Thank you for your reply.
Can help me how to do it via cron?
Can help me how to do it via cron?
-
- Znuny guru
- Posts: 2210
- Joined: 13 Mar 2014, 09:16
- Znuny Version: 6.0.14
- Real Name: Rolf Straub
Re: Run Backup Daily
Assuming you run it as otrs user and the $HOME is set (else use absolute path), the cron entry could look like this:
(Backup will be valid for 30 days and then deleted)
(Backup will be valid for 30 days and then deleted)
Code: Select all
# Create a internal backup of the system every day at 5:05 am
05 05 * * * $HOME/scripts/backup.pl -d /opt/otrs-backup/ -c gzip -r 30 -f fullbackup
Currently using: OTRS 6.0.14 -- MariaDB -- Ubuntu 16 LTS
-
- Znuny newbie
- Posts: 23
- Joined: 29 May 2015, 10:59
- Znuny Version: 4.0.7
- Real Name: RCS
Re: Run Backup Daily
Thank you.
I'm actually running it on CentOS and using a docker container
my orig backup files are in /opt/otrs/scripts/backup.pl
and the backup I created (tar.gz files) are inside /opt/backup/
Will the command be:
05 05 * * * $opt/otrs/scripts/backup.pl -d /opt/backup/ -c gzip -r 30 -f fullbackup
Thank you.
I'm actually running it on CentOS and using a docker container
my orig backup files are in /opt/otrs/scripts/backup.pl
and the backup I created (tar.gz files) are inside /opt/backup/
Will the command be:
05 05 * * * $opt/otrs/scripts/backup.pl -d /opt/backup/ -c gzip -r 30 -f fullbackup
Thank you.
Last edited by rcsdownload on 26 Jun 2015, 10:01, edited 1 time in total.
Re: Run Backup Daily
man crontab and man 5 crontab should help. Also your Lunux Admin should be able to consult you on this question
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master
Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
"Testing": ((OTRS Community Edition)) and git Master
Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
-
- Znuny newbie
- Posts: 23
- Joined: 29 May 2015, 10:59
- Znuny Version: 4.0.7
- Real Name: RCS
Re: Run Backup Daily
Thank you RStraub!
-
- Znuny guru
- Posts: 2210
- Joined: 13 Mar 2014, 09:16
- Znuny Version: 6.0.14
- Real Name: Rolf Straub
Re: Run Backup Daily
This will not work, replace the $ infront of opt with a slash.rcsdownload wrote: Will the command be:
05 05 * * * $opt/otrs/scripts/backup.pl -d /opt/backup/ -c gzip -r 30 -f fullbackup
Currently using: OTRS 6.0.14 -- MariaDB -- Ubuntu 16 LTS
-
- Znuny newbie
- Posts: 23
- Joined: 29 May 2015, 10:59
- Znuny Version: 4.0.7
- Real Name: RCS
Re: Run Backup Daily
Ah yes did that!
Thank you so much RStraub!
It's now OK.
Thank you
Thank you so much RStraub!
It's now OK.
Thank you