No space left on device over and over again

15 posts / 0 new
Last post
#1 Thu, 11/20/2014 - 16:44
marciano

No space left on device over and over again

Hello,

Trying to backup and then restore VS to a new server. Small VS are okay but those with some Gb are in trouble.
I want to backup everything excluding home+log+homes dirs. Then I would rsync to complete backup.
Old format do not finish the backup. They end with 'No space left on device'.
New format does not accept excluding dirs
What do you suggest?
Thank you

A couple of seconds after starting old format backup unchecking 'Server's home directory and web pages' I got: 'Backup failed : Failed to write to /tmp/.webmin/246202_21728_4_backup.cgi/1 when closing : No space left on device'

Fri, 11/21/2014 - 15:37
ReArmedHalo

Hello,

As the error states, there is no space left on the device/partition you are trying to backup to. Are you backing up to the /tmp folder? If not then I guess that is a Virtualmin thing while it compiles all the files and compresses them. I would try to free up space on the partition that houses the /tmp folder, which I am guessing is the root partition (/). Could you post the output of the following command?

df -h

-Dustin

Fri, 11/21/2014 - 15:51 (Reply to #2)
marciano

Hi, thanks for your answer.

I found webmin remain failed backups in /tmp After that, old format and then rsync seem to work. Just in case I changed /etc/fstab /tmp 'default' by 'size=4G' Thank you

Fri, 11/21/2014 - 15:52 (Reply to #3)
marciano

Hi, thanks for your answer.

I found webmin remain failed backups in /tmp
After that, old format and then rsync seem to work.
Just in case I changed /etc/fstab /tmp 'default' by 'size=4G'
Thank you

Fri, 11/21/2014 - 16:05
ReArmedHalo

Hi,

Glad you got it working!

-Dustin

Fri, 11/21/2014 - 18:02 (Reply to #5)
marciano

Anyway it is a real mess moving 'large' VS.

I still cannot move one single VS despite I unchecked
mysql databases,
Server's home directory
web pages
Include log files
Include homes directory

I don't know what else can increase tar file more than
Filesystem Size Used Avail Use% Mounted on
/dev/md2 899G 371G 482G 44% /
/dev/md1 2.0G 36M 1.9G 2% /tmp
/dev/md0 99M 43M 52M 46% /boot
tmpfs 3.7G 0 3.7G 0% /dev/shm

PS1: It takes some time to 'Backing up 1 user's home directories'
How can I avoid that? I can rsync them later

PS2: instead of saving backup in remote server I selected local server and got no errors. Trial and error.

Fri, 11/21/2014 - 18:26 (Reply to #6)
ReArmedHalo

Hi,

/dev/md1 2.0G 36M 1.9G 2% /tmp

Your /tmp directory is only 2GB so if your backup is larger than 2GB it doesn't seem like you'll be able to use remote server. You'll have to use the local and then transfer it manually it appears, as you have already discovered. Either that or increase the size of /tmp

-Dustin

Sat, 11/22/2014 - 04:33 (Reply to #7)
marciano

Hello,

Anyway there are several tricky and messy things.
Restoring sub-servers backed up in new format and saved remotely
All of them got this error
Performing other Apache configuration ..
.. configuration failed : Failed to copy /etc/php.ini to /home/.../domains/xxx.yyy.com/etc/php5/php.ini : cp: cannot create regular file `/home/.../domains/xxx.yyy.com/etc/php5/php.ini': No such file or directory

So, rsync and then again restoring one by one

Sat, 11/22/2014 - 07:39
marciano

I only checked to backup mysql databases (2 listed in virtualmin)

Nothing is restored, no errors or warnings (10Mb backup)

PS: Server conf has disabled Mysql despite the origin is not
Cannot enable it because username was set to a subdomain that has mysql enabled
Again, who came first? The egg or the chicken?
Disabling subdomain mysql (and deleting its database), enabling mysql on main server (warnings about username...) and enabling mysql subserver again seems to work.
Now restore works okay

Sat, 11/22/2014 - 07:24
ReArmedHalo

Hello,

I'm unsure why things are not restoring. To be honest I have had a love hate relationship with Virtualmin backups. Hopefully someone is able to solve your issue. Good luck.

-Dustin

Sat, 11/22/2014 - 10:18
marciano

Hi Dustin, another related question

Some small VS were completely backup/restored without problems (some of them use mysql databases)

Now I have a few mysql users I want to manually export/import Cannot import them because a different columns amount. Old mysql version has 37 and the new one has 39. Virtualmin has surpassed that issue. Event_priv and Trigger_priv are new in 5.1.73 (Centos 6) than 5.0.95 (Centos 5)

Sat, 11/22/2014 - 12:52
marciano

Is there a way to backup/restore cron jobs created with webmin?

There's something odd with cron jobs.
Control Panel does not list daily, weekly and monthly jobs.
/etc/crontab is empty, it contains just an input guide
/etc/cron.d has 0hourly but 0daily...
(I installed Webmin/Virtualmin in a fresh Centos 6 new installation)

I removed 0hourly from cron.d and added this to crontab

01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly
15 7,19 * * * root run-parts /etc/cron.half-daily

half-daily is from my part

Sat, 11/22/2014 - 13:26 (Reply to #12)
marciano

Is there a way to backup/restore cron jobs created with webmin?

I found that they are stored in /var/spool/cron/root (those created by root) so I can select the lines I need

Sun, 11/23/2014 - 10:18
ReArmedHalo

Hi,

Sorry I didn't get back to you sooner. I don't know about manually importing/exporting MySQL users to be honest. When I move servers, I generally just export the database/tables via phpMyAdmin and then recreate all the users and databases on the new system and then use phpMyAdmin again to import them back.

As for the cron, did you get that resolved?

-Dustin

Mon, 11/24/2014 - 04:57
marciano

Hi Dustin,

Copy-paste /var/spool/cron/root lines I need was successful. Anyway I don't get why some daily, weekly and monthly jobs are not set by default during SysOp installation.

In relation of mysql users I needed to export only some of them, not to export the entire "user" table. I opened the exported .sql file and deleted users I didn't want to export. Then, to find those new columns and to add according values to user's array. Finally I import them (INSERT INTO...) into the new table.

Thanks, M