ddenev Posted May 16, 2008 Share Posted May 16, 2008 I have a problem with uuencode. The script freezes at uuencoding. I tried to manually run 'uuencode file.tar.gz > file.tar.gz.uu' and it just freezes. If I try 'uuencode file.tar.gz' then it successfully dumps to stdout. What could be the problem? Thank you. 0 Quote Link to comment Share on other sites More sharing options...
pooprscooper Posted May 21, 2008 Share Posted May 21, 2008 Is there a way to modify the script use use the exim/sendmail binary instead? I have blocked all outgoing smtp from anyone else. Thank you. 0 Quote Link to comment Share on other sites More sharing options...
minadreapta Posted May 21, 2008 Share Posted May 21, 2008 anyone has succeeded to have this sending email with the db dump? Bear, can you help me please? i only get the a corrupted file by email, something like: -home-cpanelusername-mydbs-3-dbname.sql.gz it has 64 bytes. 0 Quote Link to comment Share on other sites More sharing options...
apexhost Posted July 3, 2008 Share Posted July 3, 2008 Here is how to run mysqldump on Windows. I got this little script from somewhere on the net and modified it to run on windows. All you need to do is download the free exe gzip.exe (A search on google will find that) Set your paths/user/passwords. Save the following script as say backup.bat and use windows scheduler to run it daily hourly or whatever you want. Please note: While this works fine for us and has been for years it may not be for every one. Usual disclaimer: Its here for you to use as IS. //--- Begin Batch File ---//@echo off :: Set some variables set bkupdir=c:\foldername or \\servername\sharename set mysqldir=c:\mysql set datadir=c:\mysql\data set logdir=c:\mysql\logs set dbuser=dbusername set dbpass=dbpassword set zip=c:\GZip\gzip.exe set endtime=0 :GETTIME :: get the date and then parse it into variables for /F "tokens=2-4 delims=/ " %%i in ('date /t') do ( set mm=%%i set dd=%%j set yy=%%k ) :: get the time and then parse it into variables for /F "tokens=5-8 delims=:. " %%i in ('echo.^| time ^| find "current" ') do ( set hh=%%i set ii=%%j set ss=%%k ) :: If this is the second time through then go to the end of the file if "%endtime%"=="1" goto END :: Create the filename suffix set fn=_%yy%%mm%%dd%_%hh%%mm%%ss% :: Switch to the data directory to enumerate the folders pushd %datadir% :: Write to the log file echo Beginning MySQLDump Process > %logdir%\LOG%fn%.txt echo Start Time = %yy%-%mm%-%dd% %hh%:%ii%:%ss% >> %logdir%\LOG%fn%.txt echo --------------------------- >> %logdir%\LOG%fn%.txt echo. >> %logdir%\LOG%fn%.txt :: Loop through the data structure in the data dir to get the database names for /d %%f in (*) do ( :: Create the backup sub-directory is it does not exist if not exist %bkupdir%\%%f\ ( echo Making Directory %%f echo Making Directory %%f >> %logdir%\LOG%fn%.txt mkdir %bkupdir%\%%f ) else ( echo Directory %%f Exists echo Directory %%f Exists >> %logdir%\LOG%fn%.txt ) :: Run mysqldump on each database and compress the data by piping through gZip echo Backing up database %%f%fn%.sql.gz echo Backing up database %%f%fn%.sql.gz >> %logdir%\LOG%fn%.txt %mysqldir%\bin\mysqldump --user=%dbuser% --password=%dbpass% --databases %%f --opt --quote-names --allow-keywords --complete-insert | %zip% > %bkupdir%\%%f\%%f%fn%.sql.gz echo Done... echo Done... >> %logdir%\LOG%fn%.txt ) :: Go back and get the end time for the script set endtime=1 goto :GETTIME :END :: Write to the log file echo. >> %logdir%\LOG%fn%.txt echo --------------------------- >> %logdir%\LOG%fn%.txt echo MySQLDump Process Finished >> %logdir%\LOG%fn%.txt echo End Time = %yy%-%mm%-%dd% %hh%:%ii%:%ss% >> %logdir%\LOG%fn%.txt echo. >> %logdir%\LOG%fn%.txt :: Return to the scripts dir popd :: Send the log file in an e-mail REM c:\commail\commail -host=smtp.yourcompany.com -from="server <server@yourcompany.com>" -to=serveradmins@yourcompany.com -subject="MySQL Backup" -msg=%logdir%\LOG%fn%.txt //--- End Batch File ---// NOTE: Don't use the email send section unless you know how to, I was never able to get this to work. Script will create a separate folder for each DB on the server for each backup. Regards Dave 0 Quote Link to comment Share on other sites More sharing options...
LemonBarley Posted August 30, 2008 Share Posted August 30, 2008 when sent to a yahoo email, i receive only a text: "begin 644 /home/username/mydbs/22-username_db.sql.gz ` end" the same email sent to the server's email address has a .gz archive attached which seems to be corrupt, i can;t manage to open it. same problem here. can someone pelase help? the FTP is fine. but the Email seems to be stuck. 0 Quote Link to comment Share on other sites More sharing options...
LemonBarley Posted September 9, 2008 Share Posted September 9, 2008 anyone able to help this to send by email? paging for Bear 0 Quote Link to comment Share on other sites More sharing options...
minadreapta Posted September 9, 2008 Share Posted September 9, 2008 why don;t you upgrade to 3.6.2, the feature is aready within the WHMCS. 0 Quote Link to comment Share on other sites More sharing options...
LemonBarley Posted September 9, 2008 Share Posted September 9, 2008 oh!? i did not know. i am using 3.6.2. where can i find the option? 0 Quote Link to comment Share on other sites More sharing options...
LemonBarley Posted September 9, 2008 Share Posted September 9, 2008 found it! As for record function: The database is where all your WHMCS data is stored and so is very important. It is therefore recomended that you take regular backups of it. There are 2 built in solutions for automated backing up the database using the daily cron - one is email and the other is an FTP backup to a remote server. These can be configured in Configuration > Database Backups. You can also download a one off backup with the steps below. 1. Go to Utilities > Database Status 2. Click the Download Full Database Backup button at the top of the page 3. You should be prompted for a file to download. Save the file to your computer. Depending on the database size, this may take a few moments. 4. Once the download is complete you have now backed up your database. 0 Quote Link to comment Share on other sites More sharing options...
axxs Posted September 16, 2008 Share Posted September 16, 2008 ummm having this script as 755 means it is rwxr-xr-x .. meaning other users on the system can read it and get the db username and password? Is that safe for a database that holds private user information and accounts, allowing others to change it? or am I missing something here .. 0 Quote Link to comment Share on other sites More sharing options...
bear Posted September 16, 2008 Author Share Posted September 16, 2008 ummm having this script as 755 means it is rwxr-xr-x .. meaning other users on the system can read it and get the db username and password? Is that safe for a database that holds private user information and accounts, allowing others to change it? or am I missing something here .. If you mean the script I posted, you don't place it within the publicly accesible areas of your hosting account. That, in combination with not allowing cross account directory browsing, you should be fine. 0 Quote Link to comment Share on other sites More sharing options...
lanquest Posted May 14, 2011 Share Posted May 14, 2011 Has this feature been implemented yet? 0 Quote Link to comment Share on other sites More sharing options...
EasyWHMCS Posted May 14, 2011 Share Posted May 14, 2011 Yes a long time ago, Go to setup > database backups 0 Quote Link to comment Share on other sites More sharing options...
lanquest Posted June 28, 2011 Share Posted June 28, 2011 Even though I have put my email there and run the cron without any errors the DB backup does not coming to my email. Any ideas? I have the very same problem. I've re-installed and cannot work out why I'm not getting the backups via email. Any suggestions welcome.. 0 Quote Link to comment Share on other sites More sharing options...
lanquest Posted September 2, 2011 Share Posted September 2, 2011 Database Backups According to the instructions. There are 2 built in solutions for backing up the database using the daily cron - one is email and the other is an FTP backup to a remote server. I want to use the email option. Daily Email Backups Then you enter your email address and select "Save Changes" Nothing arrives. Where is the daily cron located? 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Support Manager WHMCS John Posted September 2, 2011 WHMCS Support Manager Share Posted September 2, 2011 You should have created the daily cron when WHMCS was installed. Review Utilities > Activity Log for any entries beginning "Cron Job". 0 Quote Link to comment Share on other sites More sharing options...
lanquest Posted September 2, 2011 Share Posted September 2, 2011 You should have created the daily cron when WHMCS was installed. Review Utilities > Activity Log for any entries beginning "Cron Job". Thanks for your reply. I have checked that area and there's no mention of an MySQL Backup Cron Job being performed at all. There is also a cron job setup in our CPanel and running every night which calls the admin/cron.php. 0 Quote Link to comment Share on other sites More sharing options...
lanquest Posted September 2, 2011 Share Posted September 2, 2011 Thanks for your reply. I have checked that area and there's no mention of an MySQL Backup Cron Job being performed at all. There is also a cron job setup in our CPanel and running every night which calls the admin/cron.php. I can't belive it. For some reason I have now got my first WHMCS database backup in a very long while. I have not changed anything since my last couple of posts. Some thing must have changed thou.. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.