SpellsBook

 +Debian Install
+ Debian Install (6)
+ Disk and files (4)
+ Adding a new vserver
+ Mounting a container file as a mount point
+ Mounting a samba or windows share at reboot time
+ vserver backup
+ Packages (1)
+ Vservers (2)
 +Snippet Options
+   Printer Friendly
 +Library Options
+   View Other Library
Adobe_Flash_3_0
C_Plus_Plus
Debian_Install
Del_me_Soon
HTML_and_CSS
JavaScript
Linux_Commands
PHP
 +General Options
+   Library Home
+   PHP-CSL Credits
+   PHP-CSL License
+   Resource Links
+   Log in
Syntax for: Disk and files / vserver backup

1:
#!/bin/bash
ShortName=${1}
FileName=${ShortName}.$(date +'%y%m%d%H%M')
if [ -d /etc/vservers/${ShortName} ] ; then
if [ -e /etc/vservers/${ShortName}/run ] ; then
Restart_vserver=1
vserver --silent --sync ${ShortName} stop
fi
tar -cz --one-file-system -f ${FileName}.core.tgz --directory=/etc/vservers/${ShortName}/vdir/ .
tar -cz --one-file-system -f ${FileName}.conf.tgz --directory=/etc/vservers/${ShortName}
if [ ${Restart_vserver} ] ; then
vserver --silent --sync ${ShortName} start
fi
fi
 
Description for: Disk and files / vserver backup
  vserver backup


 
Powered by: PHP-CSL V0.9