Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - FreshLondon

Pages: [1] 2 3 4
1
Backup / Re: Custom Backup
« on: April 17, 2023, 02:29:22 AM »
I want to use some alternative as CWP team can take ages to fix the issues in backup.

Try this post, used these backups for a couple of years and restored from them on occasion - worked well enough for me!
https://forum.centos-webpanel.com/index.php?topic=11268.msg38452#msg38452

2
Backup / Re: Backup CWP to an Amazon S3 bucket
« on: April 17, 2023, 02:27:35 AM »
Please can you help in which folder/server should I put the backups-s3.sh file?

Anywhere, as long as the cron task is set to run the script with the correct file location for where it resides.
(for example, put the .sh script in root (/) and run it from there if it's easiest.

The rest of commands should be executed on the server too ?

Yes, add and run this script on the same server that you are backing up.

The backups apparently works fine, but it only do 2 sites and then it stop, and ends.
Never i can do the entire backup of all sites/users.

Could be the second site is too big (more of 5GB) and the tar.gz never finish the job?
Not sure, did you run out of disk space? One of the common issues when running any backup is the size of the zip file before it is sent and deleted. The above script splits files/database/vmail separately, which helps a bit ..but to play it safe keep at least the size (of your largest user account) spare on top of your current remaining disk quota. Minimum.

Sorry for the late responses, I now use AAPanel as I no longer host vmail for clients. Completely ditched the idea and went for just barebones control panel without all of the crazy CWP config pages and bugs.
I love CWP, it's just not developed and tested enough for long term production use as it could be - albeit a wonderful solution  :)

3
CentOS-WebPanel Bugs / Strange .bak folders
« on: November 19, 2021, 03:10:58 AM »
Hey chaps!

Around 50MB of files seem to be added daily in /usr/local/cwpsrv/var/services/, it's slowly eating through my drive space.
Could anyone please share some information on what the use of these _____.bak folders are?


If they are useful for the system, is there any way of limiting them to ..maybe two days history?
If they are not useful to the system, is there any way of disabling generating them?

Thanks in advance!

4
Backup / Re: No way a user can restore backup in User Panel
« on: October 14, 2021, 05:22:29 PM »
Any update on this?  :)

5
Backup / Re: A couple of issues with New Backup (beta)
« on: September 08, 2021, 05:50:46 AM »
I wouldn't use the FTP backup, it overwrites the daily backup every day (not storing in dated folders).

See here, I made a different backup solution yesterday (storage on Amazon S3 buckets is $0.025/GB/month):
https://forum.centos-webpanel.com/index.php?topic=11268.0

6
Backup / Backup CWP to an Amazon S3 bucket
« on: September 07, 2021, 06:23:45 PM »
Hey folks, sharing this here if anyone needs it!

I host CWP on Amazon EC2, needed a better backup solution because:
  • standard EC2 volumes are expensive.
  • cheaper (per GB) volumes for backups are minimum 500GB, so end up expensive anyway.
  • CWP native backups suck.
  • CWP backups to FTP have extreme versioning issues, the daly backup simply overwrites the previous day.

To do this, you'll need to create Amazon security credentials here: https://console.aws.amazon.com/iam/home?#/security_credentials
Go to the section titled "Access keys (access key ID and secret access key)".
Create yourself an 'access key'.

Install Amazon client on your CWP server:
Code: [Select]
# sudo yum install -y python-pip
Code: [Select]
# sudo pip install awscli
Code: [Select]
# sudo pip install futures
Code: [Select]
# pip uninstall rsa
Code: [Select]
# pip install -v rsa==4.0

Set up the Amazon connection to S3 and create a bucket
Code: [Select]
# aws configure
In here, add your access keys and AWS region like so:
Code: [Select]
AWS Access Key ID [None]: ACCESSKEYID
AWS Secret Access Key [None]: ACCESSKEY
Default region name [None]: us-west-2
Default output format [None]: json

Once set up, create your S3 bucket (replace 'servername_backups' with the name of your desired S3 bucket):
Code: [Select]
# aws s3 mb s3://servername_backups
Create a backup script (if you don't have nano, use vi instead or install nano with 'yum install nano'):
Code: [Select]
# nano backups-s3.sh
Add the backup script content, sample of mine here:
https://gist.github.com/FreshLondon/0e2bd776ba69ab542b1afef0ecdd0db9
Don't forget to add your S3 bucket name at the top of your file, and choose your /home/ directory path if it isn't standard..

Save the file, then make that script executable:
Code: [Select]
# chmod +x backups-s3.sh
Run the script:
Code: [Select]
# ./backups-s3.sh
Add a cron job for the script to run every night:
Open chrontab:
Code: [Select]
#crontab -eAdd a new line at the end fo the file:
Code: [Select]
0 3 * * * /path/to/backups-s3.sh > /dev/null 2>&1The above runs your backup script every day at 3am (according to the server’s clock).


Hope it helps!
Thanks to cinique for the original script format, modified for Amazon S3 use (and reduced a lot of the process to preserve disk space on the server doing the backup.

7
PHP Selector / PECL extensions using PHP-FPM?
« on: July 22, 2021, 07:36:58 PM »
Hi chaps,

We have a server, installed as default and then upgraded to use the PHP-FPM selector.
I'm currently tasked with installing the PHP PECL Trader extension for a project, yet installing via CLI only installs for the default PHP version (5.6) and not the FPM selected PHP version.

PHP7.4 is set as the alias in the bash profile.
Tried adding flags to the PECL install, no luck.

Going via PECL extensions on the CWP admin also shows no available extensions, I've hit a brick wall.

Any suggestions? Thanks in advance!  :)

8
How to / Re: How to use a symlink folder for remote backups?
« on: July 05, 2021, 04:41:34 AM »
I tried both the above mentioned, and moving the entire user folder location (using the proper command for moving users) but then SSH was playing up.
I no longer need this solution, although if anyone has the answer I'm sure someone finding this thread on a Google search would benefit.

My solution, I created a tiny Amazon instance. Removed the backup drive from my server and mounted it to this instance.
Moved the /home directory to the backup drive, added a user for each server that needs to backup there (to split the backups innto nice folders so they don't overwrite each other).

Problem solved, works like a dream!  :)

9
How to / How to use a symlink folder for remote backups?
« on: July 04, 2021, 09:54:51 AM »
Hi chaps!

I have 2x CWP servers running, one with a huge additional backup drive.
For now let's call the new server 'ONE' and the old server with the backup drive 'TWO'.
I'd like to make use of the remote backup functionality on ONE > TWO, configured and set up remote backups.

When testing the backup, ONE logs into TWO and creates a new folder.
New folder location on TWO is /home/backupusersg/cwp_remote/
Backup works perfectly, tested and verified.

BUT, /home/ is not the backup drive.. I need to move this folder elsewhere.
I have deleted the folder /home/backupusersg/cwp_remote/, navigated to the backup drive and created /backup/backupusersg/cwp_remote/.
All good so far..

Created a symlink, so the folder in the /backup/backupusersg/cwp_remote/ now appears in the /home/backupusersg/cwp_remote/ location:
Code: [Select]
# ln -s /backup/backupusersg/cwp_remote/ /home/backupusersg/
Symlink verified here:


Original folder that was symlinked, to show permissions:


Yet when running the backup (which worked when the remote folder was not a symlink) I get:
Code: [Select]
mkdir: cannot create directory ‘cwp_remote’: Permission denied
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [sender=3.1.2]


Any suggestions? I haven't configured the CWP remote backups before, advice greatly appreciated!

10
Backup / Re: Local & Remote Backup
« on: July 04, 2021, 09:12:32 AM »
Found this on a Google search. Should definitely be mentioned somewhere on the backup page..

11
E-Mail / Re: AutoSSL for mail only
« on: November 30, 2020, 09:03:09 AM »
you should only allow proxy for mail subdomain
Already set, grey cloud etc.

for manual configuration you need to check postfix/dovecot conf
Sounds great, will do! Thanks

this is regular postfix/dovecot conf so any sysadmin should be able to set sni ssl for it.
If i knew how, I wouldn't be on a support forum  ;D

12
Backup / Re: Custom Backup
« on: November 28, 2020, 06:34:35 PM »
Didn't manage it in the end but Igor from CWP support sorted it out.
It would be cool if there was a guide on how to do this somewhere, have mentioned it.. you never know! ;D

13
Backup / Re: Custom Backup
« on: November 27, 2020, 06:52:26 AM »
Cynique, may I ask how you'd go about restoring a mailbox from the vmail files in the backup?

I've tried and it seems that these files are neither importable, nor can they be directly dragged into a vmail folder to recreate the mailbox.
Stuck a bit.. just testing on one mail account to see if this is a viable solution but not yet managing to restore from files and folders.

Thought it might help :)

15
Check if you have another firewall set of options outside of your OS, for example on Amazon EC2 you'd need to visit your EC2 console > network adaptors, allow the ports there too  ;)

Pages: [1] 2 3 4