HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   HOWTO-Related Questions (http://www.howtoforge.com/forums/forumdisplay.php?f=2)
-   -   Problem with SystemImager Restore (http://www.howtoforge.com/forums/showthread.php?t=7177)

checker 30th September 2006 14:58

Problem with SystemImager Restore
 
hi!

i tried the scripts (http://www.howtoforge.com/howto_linux_systemimager / http://www.howtoforge.com/dedicated_..._systemimager). now i want to restore my server with using the second howto but it doenst work :(

i m not sure why the shell-script from falco doenst work. maybe someone can help me. i would be pleased much.

Code:

--16:22:14--  http://www.falkotimme.com/howtos/dedicated_server_backup_restore_s
ystemimager/functions
          => `functions'
Resolving www.falkotimme.com... done.
Connecting to www.falkotimme.com[81.169.182.36]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 34,564 [text/plain]

100%[====================================>] 34,564      843.85K/s    ETA 00:00

16:22:20 (843.85 KB/s) - `functions' saved [34564/34564]


get_arch
Partitioning /dev/hda...
Old partition table for /dev/hda:
Disk geometry for /dev/ide/host0/bus0/target0/lun0/disc: 0.000-9779.765 megabyte
s
Disk label type: msdos
Minor    Start      End    Type      Filesystem  Flags
parted -s -- /dev/hda mklabel msdos || shellout
Creating partition /dev/hda1.
/tmp/brandy-andy.master: /tmp/bc: /bin/sh: bad interpreter: Permission denied
parted -s -- /dev/hda mkpart primary ext2 0  || shellout
  mkpart PART-TYPE [FS-TYPE] START END      make a partition

        PART-TYPE is one of: primary, logical, extended
        FS-TYPE is one of: ext2, ext3, FAT, hfs, jfs, linux-swap, ntfs,
        reiserfs, hp-ufs, sun-ufs, xfs
        START and END are in megabytes

        mkpart makes a partition without creating a new file system on the
        partition.  FS-TYPE must be specified for data partitions (as opposed to
        extended partitions).  This command is useful if you accidently deleted
        a partition.
Killing off running processes.
kill: usage: kill [-s sigspec | -n signum | -sigspec] [pid | job]... or kill -l
[sigspec]
udp-receiver: no process killed
rsync: no process killed

write_variables
Debian GNU/\s 3.0 \n \l

sh-2.05a#


falko 1st October 2006 13:29

Quote:

Originally Posted by checker
Code:

/tmp/brandy-andy.master: /tmp/bc: /bin/sh: bad interpreter: Permission denied

I think the problem is here. Did you run the script as root?

If you have physical access to the machine, it's better to use the autoinstalldiskette than the script. The script is only good if you don't have physical access to the system.

checker 1st October 2006 20:22

hi!

thank you for your answer. i ran the script as root and i have no physcical access to the system. i used a rescue mode and i dont know why the permission is denied. if you have no idea... it isn't important... i'll try another way to do backups ;)

falko 2nd October 2006 13:07

What's in /tmp/bc?

checker 4th October 2006 17:40

hi falko,

thank you for your answer. i tried the script again. the server has a new image (default debian sarge image from the provider) and i got also a new error message, see below:

i assume "Read-only file system" doesn't sound good.

Code:

http://www.falkotimme.com/howtos/dedicated_server_backup_restore_systemimager/functions
          => `functions'
Resolving www.falkotimme.com... 81.169.182.36
Connecting to www.falkotimme.com[81.169.182.36]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 34,564 [text/plain]

100%[====================================>] 34,564        --.--K/s

19:21:54 (859.75 KB/s) - `functions' saved [34564/34564]

--19:21:54--  http://www.falkotimme.com/howtos/dedicated_server_backup_restore_systemimager/bc
          => `bc'
Resolving www.falkotimme.com... 81.169.182.36
Connecting to www.falkotimme.com[81.169.182.36]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2,364 [text/plain]

100%[====================================>] 2,364        --.--K/s

19:21:54 (62.62 MB/s) - `bc' saved [2364/2364]

mv: cannot create regular file `/bin/bc': Read-only file system
chmod: cannot access `/bin/bc': No such file or directory

get_arch
Partitioning /dev/hda...
Old partition table for /dev/hda:
Disk geometry for /dev/hda: 0.000-9779.765 megabytes
Disk label type: msdos
Minor    Start      End    Type      Filesystem  Flags
1          0.031  7726.574  primary  ext3
2      7726.575  9773.920  primary  linux-swap
parted -s -- /dev/hda mklabel msdos || shellout
Creating partition /dev/hda1.
/tmp/brandy-andy.master: line 1: /tmp/bc: Permission denied
parted -s -- /dev/hda mkpart primary ext2 0  || shellout
Killing off running processes.
kill: usage: kill [-s sigspec | -n signum | -sigspec] [pid | job]... or kill -l [sigspec]
udp-receiver: no process killed
rsync: no process killed

write_variables
Debian GNU/Linux 3.1 \n \l


in /tmp/ are bc and restore. the content of bc:
(but i dont think that you mean this?)


Code:

# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#

PATH=/sbin:/bin:/usr/bin:/usr/sbin:/tmp

read input
scale=`echo $input | cut -f1 -d' ' | cut -f2 -d'=' | cut -f1 -d';'`
size1=`echo $input | cut -f2 -d'(' | cut -f1 -d' ' | cut -f1 -d'.'`
size2=`echo $input | cut -f4 -d' ' | cut -f1 -d')' | cut -f1 -d'.'`
let size=$size1+$size2
if [ "$scale" -gt 0 ]; then
  size=$size"."
fi
index=0
while [ "$index" -lt "$scale" ]
do
  size=$size"0"
  let index=$index+1
done
echo $size
exit 0


maybe there are problems if there is a complete "furnished" system on the harddisk?

falko 5th October 2006 16:55

Quote:

Originally Posted by checker
i assume "Read-only file system" doesn't sound good.

Yes, the mounted partitions must be writable.


All times are GMT +2. The time now is 19:28.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.