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. -
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
-
G girish marked this topic as a question on
-
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.
@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. -
-
Coming back to this issues as I am getting errors on backups:
Feb 08 23:00:52 box:backuptask fullBackup: app automate.bb-content.media backup finished. Took 30.926 seconds
Feb 08 23:00:52 box:locks write: current locks: {"backup_task":null}
Feb 08 23:00:52 box:locks release: app_a1372b32-5ec8-4fb7-99cb-9e687c05eac5
Feb 08 23:00:52 box:tasks update 1745: {"percent":43.85714285714286,"message":"Backing up matomo.bb-content.media (3/4). Waiting for lock"}
Feb 08 23:00:52 box:locks write: current locks: {"backup_task":null,"app_a1fea9d3-2af1-4336-ba20-148ae80f1f4f":"1745"}
Feb 08 23:00:52 box:locks acquire: app_a1fea9d3-2af1-4336-ba20-148ae80f1f4f
Feb 08 23:00:52 box:tasks update 1745: {"percent":43.85714285714286,"message":"Snapshotting app matomo.bb-content.media"}
Feb 08 23:00:52 box:backuptask fullBackup: app matomo.bb-content.media backup finished. Took 0.004 seconds
Feb 08 23:00:52 box:locks write: current locks: {"backup_task":null}
Feb 08 23:00:52 box:locks release: app_a1fea9d3-2af1-4336-ba20-148ae80f1f4f
Feb 08 23:00:52 box:taskworker Task took 51.786 seconds
Feb 08 23:00:52 box:tasks setCompleted - 1745: {"result":null,"error":{"stack":"BoxError: Error creating config.json: EACCES: permission denied, open '/home/yellowtent/appsdata/a1fea9d3-2af1-4336-ba20-148ae80f1f4f/config.json'\n at Object.writeConfig (/home/yellowtent/box/src/apps.js:3089:15)\n at snapshotApp (/home/yellowtent/box/src/backuptask.js:339:16)\n at uploadAppSnapshot (/home/yellowtent/box/src/backuptask.js:350:11)\n at backupAppWithTag (/home/yellowtent/box/src/backuptask.js:391:11)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","name":"BoxError","reason":"FileSystem Error","details":{},"message":"Error creating config.json: EACCES: permission denied, open '/home/yellowtent/appsdata/a1fea9d3-2af1-4336-ba20-148ae80f1f4f/config.json'"}}
Feb 08 23:00:52 box:tasks update 1745: {"percent":100,"result":null,"error":{"stack":"BoxError: Error creating config.json: EACCES: permission denied, open '/home/yellowtent/appsdata/a1fea9d3-2af1-4336-ba20-148ae80f1f4f/config.json'\n at Object.writeConfig (/home/yellowtent/box/src/apps.js:3089:15)\n at snapshotApp (/home/yellowtent/box/src/backuptask.js:339:16)\n at uploadAppSnapshot (/home/yellowtent/box/src/backuptask.js:350:11)\n at backupAppWithTag (/home/yellowtent/box/src/backuptask.js:391:11)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","name":"BoxError","reason":"FileSystem Error","details":{},"message":"Error creating config.json: EACCES: permission denied, open '/home/yellowtent/appsdata/a1fea9d3-2af1-4336-ba20-148ae80f1f4f/config.json'"}}
Feb 08 23:00:52 BoxError: Error creating config.json: EACCES: permission denied, open '/home/yellowtent/appsdata/a1fea9d3-2af1-4336-ba20-148ae80f1f4f/config.json'
Feb 08 23:00:52 at Object.writeConfig (/home/yellowtent/box/src/apps.js:3089:15)
Feb 08 23:00:52 at snapshotApp (/home/yellowtent/box/src/backuptask.js:339:16)
Feb 08 23:00:52 at uploadAppSnapshot (/home/yellowtent/box/src/backuptask.js:350:11)
Feb 08 23:00:52 at backupAppWithTag (/home/yellowtent/box/src/backuptask.js:391:11)
Feb 08 23:00:52 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) -
Coming back to this issues as I am getting errors on backups:
Feb 08 23:00:52 box:backuptask fullBackup: app automate.bb-content.media backup finished. Took 30.926 seconds
Feb 08 23:00:52 box:locks write: current locks: {"backup_task":null}
Feb 08 23:00:52 box:locks release: app_a1372b32-5ec8-4fb7-99cb-9e687c05eac5
Feb 08 23:00:52 box:tasks update 1745: {"percent":43.85714285714286,"message":"Backing up matomo.bb-content.media (3/4). Waiting for lock"}
Feb 08 23:00:52 box:locks write: current locks: {"backup_task":null,"app_a1fea9d3-2af1-4336-ba20-148ae80f1f4f":"1745"}
Feb 08 23:00:52 box:locks acquire: app_a1fea9d3-2af1-4336-ba20-148ae80f1f4f
Feb 08 23:00:52 box:tasks update 1745: {"percent":43.85714285714286,"message":"Snapshotting app matomo.bb-content.media"}
Feb 08 23:00:52 box:backuptask fullBackup: app matomo.bb-content.media backup finished. Took 0.004 seconds
Feb 08 23:00:52 box:locks write: current locks: {"backup_task":null}
Feb 08 23:00:52 box:locks release: app_a1fea9d3-2af1-4336-ba20-148ae80f1f4f
Feb 08 23:00:52 box:taskworker Task took 51.786 seconds
Feb 08 23:00:52 box:tasks setCompleted - 1745: {"result":null,"error":{"stack":"BoxError: Error creating config.json: EACCES: permission denied, open '/home/yellowtent/appsdata/a1fea9d3-2af1-4336-ba20-148ae80f1f4f/config.json'\n at Object.writeConfig (/home/yellowtent/box/src/apps.js:3089:15)\n at snapshotApp (/home/yellowtent/box/src/backuptask.js:339:16)\n at uploadAppSnapshot (/home/yellowtent/box/src/backuptask.js:350:11)\n at backupAppWithTag (/home/yellowtent/box/src/backuptask.js:391:11)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","name":"BoxError","reason":"FileSystem Error","details":{},"message":"Error creating config.json: EACCES: permission denied, open '/home/yellowtent/appsdata/a1fea9d3-2af1-4336-ba20-148ae80f1f4f/config.json'"}}
Feb 08 23:00:52 box:tasks update 1745: {"percent":100,"result":null,"error":{"stack":"BoxError: Error creating config.json: EACCES: permission denied, open '/home/yellowtent/appsdata/a1fea9d3-2af1-4336-ba20-148ae80f1f4f/config.json'\n at Object.writeConfig (/home/yellowtent/box/src/apps.js:3089:15)\n at snapshotApp (/home/yellowtent/box/src/backuptask.js:339:16)\n at uploadAppSnapshot (/home/yellowtent/box/src/backuptask.js:350:11)\n at backupAppWithTag (/home/yellowtent/box/src/backuptask.js:391:11)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","name":"BoxError","reason":"FileSystem Error","details":{},"message":"Error creating config.json: EACCES: permission denied, open '/home/yellowtent/appsdata/a1fea9d3-2af1-4336-ba20-148ae80f1f4f/config.json'"}}
Feb 08 23:00:52 BoxError: Error creating config.json: EACCES: permission denied, open '/home/yellowtent/appsdata/a1fea9d3-2af1-4336-ba20-148ae80f1f4f/config.json'
Feb 08 23:00:52 at Object.writeConfig (/home/yellowtent/box/src/apps.js:3089:15)
Feb 08 23:00:52 at snapshotApp (/home/yellowtent/box/src/backuptask.js:339:16)
Feb 08 23:00:52 at uploadAppSnapshot (/home/yellowtent/box/src/backuptask.js:350:11)
Feb 08 23:00:52 at backupAppWithTag (/home/yellowtent/box/src/backuptask.js:391:11)
Feb 08 23:00:52 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)@stevespaw said in Move backup location of mysqldump to volume:
Feb 08 23:00:52 BoxError: Error creating config.json: EACCES: permission denied, open '/home/yellowtent/appsdata/a1fea9d3-2af1-4336-ba20-148ae80f1f4f/config.json'
Check the permissions of the directory. Does yellowtent user have permissions to write to it?