Full System Backup Trouble

CCSI

Verified User
Joined
Nov 7, 2003
Messages
53
I used ProWebUK (Chris') "How To" on the DA backup.

The how to was well written and covered all topics. My problem is probably due to operator error. Everything seems to work great except for backing up Apache.

I was wondering if I could get a little guidance on what to do next.

This is what I get after running
/usr/local/sbin/sysbk -s

Performing sanity checks: [ COMPLETED ]
Checking load average: [ COMPLETED ]
Checking free disk space: [ COMPLETED ]
Performing Custom backup
Archiving /etc/exim.conf: [ COMPLETED ]
Archiving /etc/exim.pl: [ COMPLETED ]
Archiving /etc/system_filter.exim: [ COMPLETED ]
Archiving /etc/exim.crt: [ COMPLETED ]
Archiving /etc/exim.key: [ COMPLETED ]
Archiving /etc/proftpd.conf: [ COMPLETED ]
Archiving /etc/proftpd.vhosts.conf: [ COMPLETED ]
Archiving /etc/proftpd.passwd: [ COMPLETED ]
Archiving /etc/hosts: [ COMPLETED ]
Archiving /etc/resolve.conf: [ COMPLETED ]
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
Archiving /etc/httpd/: [ FAILED ]
Could not perform md5 checksum, aborting...
Performing cleanup operations: [ COMPLETED ]

Thanks in advance for the help.

David

If I may also ask... Assuming that I will be able to fix this issue... Chris, can you also write a "How TO" on how to restore if there is an instance where we will need to obtain a file or two, or perhaps even an entire system rebuild.

Thanks again,

David
 
ok simple mistake.. added a directory thats included with the main part of sysbk in the custom area

remove:

/etc/httpd/

from custom.dirs

then open conf.sysbk in your fav text editor and chnage:

HTTP_BK="0" # Enable/Disable apache backup operations [1=on,0=off]
HTTP_PATH="/etc/httpd" # Path to apache base directory [no trailing slash]

to:

HTTP_BK="1" # Enable/Disable apache backup operations [1=on,0=off]
HTTP_PATH="/etc/httpd" # Path to apache base directory [no trailing slash]

I will get a howto for restoring soon or update the current how-to :)

Chris
 
Moved the thread to system level technical discussion also :)

Chris
 
Chris,

I found the /etc/httpd/ in the custom.files, rather than custom.dirs and removed it none the less.

Ran again (after I removed the /backup/todaysdate subdirectory)

Same results.

Any other thoughts?

Oh... thanks for pointing my posts in the right area!!!!!

David
 
Have you removed all and any instances of /etc/httpd from *both* your custom.dirs and custom.files files now?

Chris
 
Looked at the error again!

custom.files

Modify line:

/etc/resolve.conf

with:


/etc/resolv.conf

Typo there.....

Chris
 
UltimeWWW said:
We had the same problem this morning.

SysBCK doesn't like the "directories"...

I'm fairly sure it is one of the two suggestions listed above, looking at the error:

CCSI said:
Archiving /etc/resolve.conf: [ COMPLETED ]
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
Archiving /etc/httpd/: [ FAILED ]
Could not perform md5 checksum, aborting...

The actiosn performed before and after the error would be the 2 fixes.... meaning the problem occured sometime between:

/etc/resolve.conf

and

/etc/httpd

The first file didnt exist (which is more than likely the grep error) and the /etc/httpd backup is done by the main script... but not sure why its failing.

If it still fails after trying them 2 fixes turn all other backups off in conf.sysbk leaving ONLY the httpd back up on.... HTTP_BK="1"

Run the script again from here......if you continue to get an error theres a problem there..... if that works there is something wrong with the custom.dirs or .files......

Any more problems or news on the current feel free to post here or in the main thread :)

Chris
 
Chris,

Here is what I did...

I marked a 0 for everything except for apache

it worked! I marked a 1 for apache, dns, and mysql

It too worked! I added custom and it stopped working.

Left custom.files alone, but remarked out custom.dirs, and it sort of worked... mean that i didn't get an error that time, but it seemed to hang. I hit Ctrl C and it said Performing Cleanup Operations [complete]

Can't think of what it might be other than it just doesn't like da directories.

Is it working on your systems? Can you suggest any alternatives?

If John and Mark are reading, I would like to request that you add a script to DA for doing this. I have read all over the forum for people requesting this feature, and your response of after Free BSD version. Not having a proper backup is really SCARRY!!!!!!!! Your promptness on this feature would be greatly appreciated by me and I am sure by most of the DA custmers.


In the mean time, Chris... thanks for all your attempts to correct this!!!!!!!!!!!!!

David
 
Could you paste the conetent of your custom.dirs and custom.files files :)

Chris
 
custom.dirs

/home/
/usr/local/directadmin/
/usr/local/frontpage/
/var/spool/virtual/
/var/spool/mail/
/var/www/
/var/log
/etc/virtual/

custom.files

/etc/exim.conf
/etc/exim.pl
/etc/system_filter.exim
/etc/exim.crt
/etc/exim.key
/etc/proftpd.conf
/etc/proftpd.vhosts.conf
/etc/proftpd.passwd
/etc/hosts
/etc/resolv.conf

Thanks Chris

David
 
Chris,

If this helps, it is the entire contents of conf.sysbk



# SySBK 1.0 [[email protected]]
#
# NOTE: This file should be edited with word/line wrapping off,
# if your using pico please start it with the -w switch.
# (e.g: pico -w filename)
#
# [ Main Config ]
#
INSPATH="/usr/local/sysbk" # Installation path of SySBK
MODPATH="$INSPATH/mod" # Module path for sysbk backup modules
CNF_INT="$INSPATH/internals/conf.internals" # Path to internals config
#
MOUNT_POINT="/" # Mount point backups are stored on
#
BACKUP_PATH="/root/backup" # Backup path relative to mount point [e.g: /home/backups]
# If this directory does not exist it will be created
#
MIN_DISK="4096" # Min. amount of availible disk space required to perform backups
#
MAX_LOAD="2" # Max load level that the system must be below to perform backups
# No fractional values (e.g: 2.5)
#
ARC_PRI="/bin/tar -cpzf" # Primary compression utility (typicaly tar) - include arguments!!
ARC_PRI_EXT=".tar.gz" # File extention for the primary compression utility
ARC_SEC="" # Secondary compression utility (typicaly bzip2) - include arguments$
# If no value set, will only archive with Primary compression utility
#
ARC_SEC_EXT="" # File extention for the secondary compression utility
#
PRI="16" # Priority to run backups as. 21 = lowest priority, -19 = highest
#
MD5="/usr/bin/md5sum" # Path to md5sum binary
NICE="/bin/nice" # Path to 'nice' binary
DU="/usr/bin/du" # Path to 'du' binary
GUNZIP="/bin/gunzip" # Path to 'gunzip' binary

# [ Transfer Module Config ]
#
USE_RTRANS="0" # Enable remote transfer of backup data [1=on,0=off]
RTRANS_METHOD="ftp" # Transport method for remote transfer [valid methods: ftp, scp]
#
DEL_AFTERTRANS="0" # Delete the local date specific backup path after remote transfer
# of backup. (e.g: /home/backup/12-24-02) [1=on,0=off]
#
FBF_RTRANS="0" # File by file backup (incramental). Archives backups one at a time,
# transfers remote, then deletes local.
#
NCFTP_PUT="/usr/bin/ncftpput" # Path to 'ncftpput' binary
FTP_HOST="backup.yourhost.com" # The host/ip of desired ftp site
FTP_USER="backup" # Username for ftp transfer of backups [remote user]
FTP_PASS="yourpass" # Password for above user...
FTP_RPATH="/home/backup/$(hostname -s)" # Remote path to store data, relative to remote user permissions
SCP="/usr/bin/scp" # Path to 'scp' binary
SCP_HOST="backup.yourhost.com" # The host/ip of desired scp site
SCP_USER="backup" # Username for scp transfer of backups [remote user]
SCP_RPATH="/home/backup/$(hostname -s)" # Remote path to store data, relative to remote user permissions
PRVID_FILE="" # Private key file for public/private key identification
# (e.g: /root/.ssh/id_dsa)

# [ Backup Module Config ]
#
# HTTP
#
HTTP_BK="1" # Enable/Disable apache backup operations [1=on,0=off]
HTTP_PATH="/etc/httpd" # Path to apache base directory [no trailing slash]

# DNS
#
BIND_BK="1" # Enable/Disable bind backup operations [1=on,0=off]
BIND_PATH="/var/named" # Path to your bind zone files [no trailing slash]
BIND_CNF="/etc/named.conf" # Location of named.conf

MYSQL_MYICHK="/usr/bin/myisamchk" # Path to the 'myisamchk' binary
MYSQL_ROOTPW="" # MySQL Root password

# Cpanel
#
CPANEL_BK="0" # Enable/Disable cpanel specific backup operations [1=on,0=off]
CPANEL_FILES="$MODPATH/cpanel.files" # File list for cpanel backup operations
CPANEL_DIRS="$MODPATH/cpanel.dirs" # Directory list for cpanel backup operations
CPANEL_LAST="$MODPATH/.cpanel.last" # Backup tracker for cpanel module, if backup is interupted this file
# marks the last backup operation, and continues from that point.
# Ensim
#
ENSIMVH_BK="0" # Enable/Disable Ensim virtual host backup [1=on,0=off]
ENSIMVH_PATH="/home/virtual" # Path to the Ensim virtual folder
ENSIMVH_SL="/usr/local/bin/sitelookup" # Path to the Ensim 'sitelookup' binary
ENSIMVH_VHBK="/usr/lib/opcenter/vhbackup/vhbackup" # Path to the Ensim 'vhbackup' script
ENSIMVH_PICKLE="$INSPATH/internals/pickle.py" # Path to python pickle dictionary for vhbackup

# Custom
#
CUSTOM_BK="1" # Enable/Disable custom backup operations [1=on,0=off]
CUSTOM_FILES="$MODPATH/custom.files" # Fule list for custom backup operations
CUSTOM_DIRS="$MODPATH/custom.dirs" # Directory list for cpanel backup operations
 
Ok since you said it worked without custom.files see if you can get custom.files to work with the following only

/etc/exim.conf
/etc/exim.pl
/etc/system_filter.exim
/etc/exim.crt
/etc/exim.key
/etc/proftpd.conf
/etc/proftpd.vhosts.conf
/etc/proftpd.passwd


That is all directadmin specific and nothing standard with the server so should go.... if that fails you could try going through custom.files adding 1 line at a time to see which file it doesnt like... or its all of them even.

If you dont get any different errors at all at that point I would advise you to contact [email protected] (or possibly try the forums)

Keep us updated with progress on the custom.files :)

Chris
 
Chris,

I'll be happy to try your suggestions, but before I do, I wanted to correct an error.

I found it to work without custom.dirs.

custom.files seems to have had no troubles.

Dave
 
Originally posted by CCSI # DNS
#
BIND_BK="1" # Enable/Disable bind backup operations [1=on,0=off]
BIND_PATH="/var/named" # Path to your bind zone files [no trailing slash]
BIND_CNF="/etc/named.conf" # Location of named.conf

MYSQL_MYICHK="/usr/bin/myisamchk" # Path to the 'myisamchk' binary
MYSQL_ROOTPW="" # MySQL Root password


# Cpanel
#
CPANEL_BK="0" # Enable/Disable cpanel specific backup operations [1=on,0=off]
CPANEL_FILES="$MODPATH/cpanel.files" # File list for cpanel backup operations
CPANEL_DIRS="$MODPATH/cpanel.dirs" # Directory list for cpanel backup operations
CPANEL_LAST="$MODPATH/.cpanel.last" # Backup tracker for cpanel module, if backup is interupted this file
# marks the last backup operation, and continues from that point.
# Ensim
#
ENSIMVH_BK="0" # Enable/Disable Ensim virtual host backup [1=on,0=off]
ENSIMVH_PATH="/home/virtual" # Path to the Ensim virtual folder
ENSIMVH_SL="/usr/local/bin/sitelookup" # Path to the Ensim 'sitelookup' binary
ENSIMVH_VHBK="/usr/lib/opcenter/vhbackup/vhbackup" # Path to the Ensim 'vhbackup' script
ENSIMVH_PICKLE="$INSPATH/internals/pickle.py" # Path to python pickle dictionary for vhbackup

# Custom
#
CUSTOM_BK="1" # Enable/Disable custom backup operations [1=on,0=off]
CUSTOM_FILES="$MODPATH/custom.files" # Fule list for custom backup operations
CUSTOM_DIRS="$MODPATH/custom.dirs" # Directory list for cpanel backup operations

The MYSQL are should be:

# MySQL
#
MYSQL_BK="0" # Enable/Disable mysql backup operations [1=on,0=off]
MYSQL_PATH="/var/lib/mysql" # Installed location of mysql [no trailing slash]
MYSQL_INIT="/etc/init.d/mysqld" # Locationof MySQL INIT script
MYSQL_PID="/var/run/mysqld/mysqld.pid" # Location of MySQL PID file
MYSQL_DUMP="/usr/bin/mysqldump" # Path to the 'mysqldump' binary
MYSQL_MYICHK="/usr/bin/myisamchk" # Path to the 'myisamchk' binary
MYSQL_ROOTPW="" # MySQL Root password


and not sure why you have a cpanel description on the custom area..... is this your paste that has the problems or do you have a weird config file :D

Chris
 
CCSI said:
Chris,

I'll be happy to try your suggestions, but before I do, I wanted to correct an error.

I found it to work without custom.dirs.

custom.files seems to have had no troubles.

Dave

Try adding the lines to custom.dirs line by line until the problem occurs.... you could try removing /home from there also.

This is the easiest way to troubleshoot and with only a few directories to do its probably worth it :)

Chris
 
I looked again... and sure enough... that is what it says... out of the box (so to speak).... it is just a discription, but that is kinda weird.

I will make the change not to backup MySQL. Does this mean that in the custom.files or dirs that it will get backed up there and therefore not require this to be set to "1"?

Thanks again... I'll post what I get.

Thanks

Dave
 
CCSI said:
I looked again... and sure enough... that is what it says... out of the box (so to speak).... it is just a discription, but that is kinda weird.

If the config you pasted was what is actually there...... there is a certainly a problem.... it may be worth removing the /usr/local/sysbk area or even temporarily rename its directory then reinstalling to check if that makes any difference.

Looks like you have had a bad install or its been modified quite badly since installed.

Chris
 
Chris,

Ok... I started all over again. I deleted everything that I had originally done.

Once the ./install.sh was completed, I pico 'ed the conf.sysbk file, and went directly to the bottom.

It again showed the remarks of the cpanel stuff from before.


I went on to do as the directions showed.

I got the same responses.

I have found that if I leave out the custom.dirs, the program works fine. With them included, it gives me the grep errors.

I also removed one directory at at time from the custom.dirs to see if it was a problem with one of the dirctories. I still kept getting grep errors.

I am a bit confussed as to why it wouldn't work. With my limited knowledge of linux and DA, I still believe that it should work based off of other scripts and commands that I have used manually in the past.

Anyway,

You have spent enough time on my troubles...

Perhaps someone else out there has had this issue and is willing to post what has fixed the errors.

Writing Ryan @ [email protected] may be the only choice we have at this point, but I wonder if he will be reluctant to assist because the script was not written for DA.

Thanks

Dave
 
CCSI said:
Chris,

Ok... I started all over again. I deleted everything that I had originally done.

Once the ./install.sh was completed, I pico 'ed the conf.sysbk file, and went directly to the bottom.

It again showed the remarks of the cpanel stuff from before.


I went on to do as the directions showed.

I got the same responses.

I have found that if I leave out the custom.dirs, the program works fine. With them included, it gives me the grep errors.

I also removed one directory at at time from the custom.dirs to see if it was a problem with one of the dirctories. I still kept getting grep errors.

I am a bit confussed as to why it wouldn't work. With my limited knowledge of linux and DA, I still believe that it should work based off of other scripts and commands that I have used manually in the past.

Anyway,

You have spent enough time on my troubles...

Perhaps someone else out there has had this issue and is willing to post what has fixed the errors.

Writing Ryan @ [email protected] may be the only choice we have at this point, but I wonder if he will be reluctant to assist because the script was not written for DA.

Thanks

Dave

If you want me to look into it get a fresh config etc send me over an email.

alternatively you could try

# cd /usr/local/sysbk
# rm -f conf.sysbk
# wget prowebuk.com/TEMP/DOWNLOADS/sysbk/sysbk.conf.txt
# mv sysbk.conf.txt conf.sysbk

Chris
 
Back
Top