• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Question Backup Shell Script

Taxick

New Pleskian
Hi :)

I'm looking for a shell script, that can make a backup of a dir outside the normal Plesk dirs..

It has to move the backup to a remote server, and it needs to be done with FTP or FTPS!

The script also needs to remove old backups after 7 days!

I will run with crontab, every night.

Anyone that can help me with this?

Regards

Thomas
 
Hi :)

I'm looking for a shell script, that can make a backup of a dir outside the normal Plesk dirs..

It has to move the backup to a remote server, and it needs to be done with FTP or FTPS!

The script also needs to remove old backups after 7 days!

I will run with crontab, every night.

Anyone that can help me with this?

Regards

Thomas
Depending on the size of the data you could simply copy the path that you want to backup into a subscription directory every night before the Plesk backup starts. You might then not have a separate backup of it, but you'll have a backup of it within the Plesk backup and you save the hassle of developing an extra script for that. Because using an extra script goes along with surveillance: Did the script run? What errors occured during a backup? Etc. It might be much easier to simply do a copy with "cp -R" through a cronjob and then let Plesk backup the copy as a part of a subscription directory.
 
Hi :)

Thanks for you answer :)

#2 Maybe I will contact you!

#3. I have a docker image, that runs Ghost Blog. The files a located in /var/www/vhosts/ghost-blog - But its not included in the backup from docker.. I don't know wry!

Plesk take backup to an extern backup location every night.. But as I mention before it doesn't include my ghost backup

Btw the plesk that takes a backup of my domain with more, working fine

Regards

Thomas
 
Last edited:
Maybe because you have installed it with root?
What is the owner of the directory/files?

Also: if the needed files are in a normal vhost they ALL should be backupped aswell, unless they are "linked" with symlinks?
Have you checked if they may are excluded by the "exclude" option?

I would stick with the standard Plesk-Backup option and rather try to make it work out of box instead of running own Bash-Scripts.
 
Hi :)

Thanks for your answer.

I have tried to change the files with: "chown -R futurenode : psaserv ghost-blog/"

But anytime I reboot the docker image, it changes the permission back to taxick : psaserv

Before i restart the docker image:

drwxr-xr-x 2 futurenode psaserv 4096 Nov 4 03:20 apps
drwxr-xr-x 2 futurenode psaserv 4096 Nov 8 17:39 data
drwxr-xr-x 4 futurenode psaserv 4096 Nov 7 13:49 images
drwxr-xr-x 2 futurenode psaserv 4096 Nov 5 10:30 logs
drwxr-xr-x 2 futurenode psaserv 4096 Nov 5 18:30 settings
drwxr-xr-x 3 futurenode psaserv 4096 Nov 8 16:18 themes

after i restart the docker image:

drwxr-xr-x 2 taxick psaserv 4096 Nov 4 03:20 apps
drwxr-xr-x 2 taxick psaserv 4096 Nov 8 17:39 data
drwxr-xr-x 4 taxick psaserv 4096 Nov 7 13:49 images
drwxr-xr-x 2 taxick psaserv 4096 Nov 5 10:30 logs
drwxr-xr-x 2 taxick psaserv 4096 Nov 5 18:30 settings
drwxr-xr-x 3 taxick psaserv 4096 Nov 8 16:18 themes

I have tried to take a backup before and after I restart the docker image. But files are not included in the backup

Here is a picture of backup settings:

2020-11-09_10-47.png

Regards

Thomas
 
Last edited:
Back
Top