Move backup location of mysqldump to volume
-
Problem:
I have a very large msqldump file (matomo) that is getting created when a backup is done. This is crashing my system eventually (disk full)
I have added an external disk to the instance and followed the very fine instructions to move the appdata location. This worked perfectly with no issues!BUT the original yellowtent folder still contains a config.json file AND the large mysqldump. I just ran a full backup manually and it updated the file in the original location!
How do I redirect the location of this backup creation?
I need to figure this out soon.
Thanks a lot. -
@stevespaw you can symlink the /home/yellowtent/appsdata/appid to some external disk . Something like:
Stop the app mv /home/yellowtent/appsdata/appid /mnt/volume/ ln -s /mnt/volume/appid /home/yellowtent/appsdata/appid Start the app
Have a backup before you do this
-
-
@stevespaw said in Move backup location of mysqldump to volume:
OK now I will show my lack of linux. I did this all as root. What do I do now? How do I fix this permission issue? Thanks.
sudo chown -R yellowtent /path/to/directory
-
OK just to recap - This seems to be working on my test system. This is after I followed the steps for my VPS to add a disk and the Cloudron instructions to add a disk and a volume. I did this as root. I used the "disk" in place of "volume".
Stop the app
mv /home/yellowtent/appsdata/dfaa72b8-8c42-433e-a001-c9d58563379b /mnt/disk/matomo/ ln -s /mnt/disk/matomo/dfaa72b8-8c42-433e-a001-c9d58563379b /home/yellowtent/appsdata/dfaa72b8-8c42-433e-a001-c9d58563379b chown -R yellowtent /mnt/disk/matomo/
Start the app
This would be nice to automatically happen with a Cloudron tool.
I will post back and edit if I find any issues when doing this on the production.
Thanks for all of the help. -