Backup and Restore

Hello Again,

As Iā€™ve been using suitecrm for a couple of days, I have been adding new fields, and increasing my knowledge a lot, thatā€™s brought me one concern

Iā€™ve seen the backup option under the Admin menu, however the restore option is not thereā€¦in fact I would like to know some information about it.

Backup

When I backup the application, what is inside of the backup ?? Files ? application ? database ? To do a FULL backup of the system, how should I proceed ?

Restore

Same thinking, to restore the full application in case of a disaster, how should I proceed as well ?

THank you all, and once again, suitecrm is a majestic application

Hi there,

As standard, the SuiteCRM backup simply backs up files. You would need to do a separate database backup.

Also, there is no ā€˜restoreā€™ option as standard. You would simply restore the database with your database tool/commands and then point the restored CRM files/config to the restored db.

Kind Regards,

Will.

2 Likes

Will, Thank you for your answer

Well,

Iā€™ve done one backup okay, but now when I set the location and file name, the system shows that the backup was created but with 0Bytes

location: ./var/www/suitecrm/backup/
name: backuptest

The directory is writeable,

do you know what might be this issue ?? if this is an issue, of course.

Thank you any way

the message is

Backup successfully stored as ./arquivos/database_backup//backup ( bytes)

Hey Guys, I`m trying to figure this issue out, but I have no logs to check it, and not backup file created until nowā€¦

I have indeed after installing it, made a test and the system had created one fileā€¦but after all my changes, I can`t make it workā€¦

I have attached my steps and the end result.

hope somebody can help me, Will thank you so farā€¦

Here is a script I use to back up our instances. It doesnā€™t log anything, overwrites after a week, but gets the job done nightly to an external source. Expects you to have your mysql my.cnf local user conf file for authentication set.

#!/bin/sh
####################################
#
# Backup CRM.
# Written by Me
#
####################################

# What to backup. 
backup_files="/var/www/WEBROOT/ /tmp/crmbackup.sql"

# Where to backup to.
dest="/root/backup"

# Staging directory.
stage="/tmp"

# Create archive filename.
day=$(date +%A)
hostname=$(hostname -s)
archive_file="$hostname-$day.tgz"

# Print start status message.
echo "Backing up CRM............................"
date
echo

# Print start MySQL Dump  message.
echo "Dumping MySQL to $stage................................................"
date
echo

# Dump MySQL
mysqldump --databases YOURDB > /tmp/crmbackup.sql

# Print start Compression message.
echo "Compressing to $dest/$archive_file........................."
date
echo

# Backup the files using tar.
tar czPf $dest/$archive_file $backup_files

# Print end status message.
echo "Backup Complete......................................................"
date
echo

# Print end Cleanup message.
echo "Removing Temp Files.................................................."
date
echo

# Clear Staging files
rm /tmp/crmbackup.sql

# Print Final size and location.
echo "Final backup Size and Location......................................."
date
echo

# Long listing of files in $dest to check file sizes.
ls -lh $dest
echo
# Print Start FTP.
echo "Execute FTP Transfer................................................."
date
echo

# FTP backup remote
ftp='IPADDRESS'
user='FTPUSER'
passwd='PASSWORD'
ftp -inv << EOF
open $ftp
user $user $passwd
lcd $dest
mput $archive_file
EOF

echo
# Print FTP end status message.
echo "FTP Transfer  Complete..............................................."
date
echo
3 Likes

Hey nbouwsma, that`s a lot better to do the backup, just one question

when you need to restoreā€¦how or what needs to be done ? I am willing to use or script, but I just curious about the restore procedureā€¦ copy all the files backup and restore database and done it ?

thanks for you time

Yep, restore DB and copy the webroot back into place. Make sure ownership and permission are set correctly. There used to be a pretty good article on SugarCRMs site but it seems to have been (re)moved. This one is helpful. http://www.siteground.com/tutorials/sugarcrm/sugarcrm-backup.htm

Make sure to set the script to run via cron, forgot to mention that and apologize if that was obvious to you.

1 Like

nbouwsma, not need to apologize at all, none of you are talking is obvious to me, I barely access linux system and I am recording system analyst, so I am just trying to make suitecrm work here in my company because I really want to have a pretty good system around here, which Iā€™ve found Suite CRM a very good oneā€¦

so, Only I got is to thank youā€¦as at this moment I donā€™t want to change or do any test on the real enviornment, I would like ask you a ā€œstep by stepā€ thing to make a test first in my virtual machine

Backup

1 - copy the suitecrm root folder from /var/www/
(if I try to copy it now, I have some folders without permition, I am using the root user, so I was wondering, if I change these folderā€™s permition to 666 or 777 , would this cause any damage to the system ? Cause Iā€™ve tried to copy but I have no permition

2 - the database backup was done okay and I have the *.sql file with me

3 - restore the database in my server (virtual)

4 - restore the files

5 - check if everything is up and running

6 - implement your script with cron and see the backup worksā€¦

I know that is a lot of work, but I prefer to change and do maitenance on the virtual server first, cause if anything goes wrong on the actual server, all my changes so far are going to be lostā€¦

could you help with the permition thing ?

For Backup and Restore , please find this plug-in.

  1. Everything is managed from UI
  2. One click backup and restoration
  3. Skip trackers or any backup tables.
  4. Automatically remove old backups after rentention period

Many more other features.

https://store.outrightcrm.com/product/suitecrm-backup-restore-manager/

Here is a tutorial for restoring that may help you:

www.fastcomet.com/tutorials/sugarcrm/restore-backup

Just launched a biggest and stable version of this productā€¦

https://store.outrightcrm.com/product/suitecrm-record-restore-manager/