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
1
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!

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

3
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

4
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.

5
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!  :)

6
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!  :)

7
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!

8
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..

9
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

10
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

11
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 :)

13
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  ;)

14
E-Mail / Re: AutoSSL for mail only
« on: November 19, 2020, 04:33:18 PM »
BUMP! :)

I cant see how CWP can be a viable hosting solution if this is not possible, it must be!
What am I missing here? I'm sure someone has done it!

Just to reiterate, imagine that you have your domain on a different server but want to create a CWP account just for mail.
You cant issue a mail.yourdomain.com certificate because the main domain A record doesn't point there, or you cant create mail.domain.com subdomain manually to then issue a certificate to just mail.domain.com only as CWP wont allow the manual creation of a mail.domain.com subdomain :(

I'm really stumped here, any advice?

15
Please use the SMTP relay at your 550-5.7.1 service provider instead.


Lets assume what you really mean is this:
Code: [Select]
550-5.7.1 [12.34.56.78] The IP you're using to send mail is not authorized to
550-5.7.1 send email directly to our servers. Please use the SMTP relay at your
550-5.7.1 service provider instead.
Connection closed by foreign host.

I assume that either you haven't set up:
  • DKIM / SPF records correctly
  • rDNS PTR records
  • or you're blacklisted

You'll need to provide more information, whats the full error message? :)

There's a really good guide here:
https://hoststud.com/resources/resolved-error-550-5-7-1-this-message-does-not-have-authentication-information-or-fails-to-pass.476/

Pages: [1] 2 3