April 7th, 2009 — Linux, Plesk
We alreay know how to extract files from Plesk backup with mpack, but if you do receive “File size limit exceeded” error, it can be from the following reasons:
- Your file system doesn’t have LFS (large file support) support
- OS limits (limits on the system resources imposed by your administrator)
- mpack is not compiled with LFS
Check that your filesystem supports files bigger than 2GB (create a test file with “dd” command).
[vitalie@silver ~]$ dd if=/dev/zero of=test.bin bs=1G count=3 # create 3GB file
Then check your file size limits with ulimit command:
[vitalie@silver ~]$ ulimit -a | grep '^file size'
file size (blocks, -f) unlimited
You can adjust limits from /etc/security/limits.conf, read file comments on how to do it, or read this article:
http://www.cyberciti.biz/faq/file-size-limit-exceeded-error-under-linux-and-solution/
If none above limits you, then the problems comes from mpack, it doesn’t have suport for large files (>2GB).
The guys from the Plesk recommends to grep the backup file, to find begin and end of the file in archive:
http://kb.parallels.com/en/1757
This solutions is not appropriate for large backup files, we’ll just recompile mpack to support large files.
Grab mpack’s RPM source from the Dag’s repository
http://dag.wieers.com/rpm/packages/mpack/mpack-1.6-2.rf.src.rpm
install it:
[vitalie@silver ~]$ rpm -ivh mpack-1.6-2.rf.src.rpm
[...]
Then modify mpack.spec and add the following code after “%build”:
export CFLAGS="-D_FILE_OFFSET_BITS=64"
Then rebuild the package and install it:
[vitalie@silver ~] rpm -ba mpack.spec
[...]
[vitalie@silver ~] rpm -Uvh --force mpack-1.6-3.rf.i386.rpm
[...]
References:
July 17th, 2008 — Linux, Plesk
Extracting files from a Plesk 8.3 backup it’s not an easy task and it’s time consuming.
Let’s examine backup file:
[root@monster ~]# file plesk_bigserver_2008-07-10.backup
plesk_bigserver_2008-07-10.backup: ASCII English text, with very long lines
Plesk backup is a multi-part mime-encoded file, you can easy restore one domain or whole server using plesk backup utilities, but when you need a few files from backup you’ll need an external tool like ripemime or mpack.
Requirements:
- Free disk space minimum 2*backup_file_size
- mpack tool
Check your free space using df(disk free) command.
[root@monster ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda3 9.2G 2.5G 6.3G 29% /
/dev/hda1 190M 15M 166M 8% /boot
none 1010M 0 1010M 0% /dev/shm
/dev/hda7 53G 17G 34G 34% /home
/dev/hda6 950M 17M 886M 2% /tmp
/dev/hda5 46G 7.2G 37G 17% /var
Let’s install mpack. On a Redhat/Fedora/CentOS system it’s easy, just subscribe to Dag Wieers’s repository. You’ll need to download rpmforge-release rpm that’s matching your server OS and architecture:
For CentOS 5 and x86_64 architecture we’ll use rpmforge-release-0.3.6-1.el5.rf.i386.rpm:
[root@monster tmp]# wget http://dag.wieers.com/rpm/packages/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
[...]
[root@monster tmp]# rpm -ivh rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
http://dag.wieers.com/rpm/packages/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
[...]
[root@monster tmp]# yum install mpack
[...]
Let’s make a directory where we’ll extract backup files and then extract files there:
[root@monster ~]# mkdir recover
[root@monster ~]# cd recover
[root@monster ~]# munpack < ../plesk_bigserver_2008-07-15.backup
[...]
Mpack will extract files into separate tar archives where you can locate the domain by archive name and extract files using tar command.