restorepkg can't restore from a read-only file system
I'm trying to restore an incremental backup from a read-only file system (zfs snapshot) but restorepkg fails because it can't create temporary files.
Is there any way to tell restorepkg to create temporary files in a different location?
-
Although I'd still like to know the answer to my question, in the meantime I got it to work by using unionfs to mount a writable temp directory over top of the read-only file system. 0 -
Hello, Is fsck possible currently on the server? In case its possible, complete an fsck and proceed with fixing the issue further. 0 -
I'm trying to restore an incremental backup from a read-only file system (zfs snapshot) but restorepkg fails because it can't create temporary files. Is there any way to tell restorepkg to create temporary files in a different location?
Hello, It's not possible to restore an account to a read-only filesystem because the restore process requires writing files to the account's home directory. Thank you.0 -
Thanks for the reply, but I'm not trying to restore *to* a read-only file system, I'm trying to restore *from* a read-only file system. /home/USERNAME is on a normal, writable file system. /backup/.zfs/snapshot/2016-07-10/accounts/USERNAME is an incremental backup that is on a read-only file system (we implement daily incrementals using ZFS snapshots). The restorepkg command isn't having trouble writing to /home/USERNAME, the problem is that during the process it creates temporary files in the same location that the backup is located at (/backup/.zfs/snapshot/2016-07-10/accounts/USERNAME in this example). It shouldn't need to do that, since it's copying data anyway, it should be possible to use the *destination* for the temporary files, or even a different location entirely. I was just hoping that there was an undocumented command line switch, or maybe an environment variable that could be set to tell it to use a specific path for temp files while restoring. In any case, it's a non-issue now. Using unionfs does the trick and now our clients have daily incremental backups that go back months without using huge amounts of disk space (thanks to ZFS) 0 -
Hello, I'm happy to see you were able to address the issue. No such flag exists for /scripts/restorepkg. You can see a list of all available flags at: Restore Package Script - Documentation - cPanel Documentation Thank you. 0 -
Hello. I have the same problem. Is it possible change the "cpanelpkgrestore.TMP.work.xxx" location to another disk for performance purpose? Thanks. 0 -
@SF Servers - unfortunately that is not possible. It would be possible to move the file you are trying to restore into /home and then try the restore from there - that's what I'd do in this situation if /home has enough disk space. 0
Please sign in to leave a comment.
Comments
7 comments