Koozali.org: home of the SME Server

easy way to back up files for recovery the server

Offline mgb

  • ****
  • 558
  • +0/-0
easy way to back up files for recovery the server
« on: July 22, 2014, 02:20:27 PM »
#easy way to back up files
Build sharing mypc or another server
Set appropriate server backup station-manager
Disable!
Run command root
# /bin/mount -t cifs  //192.168.183.204/admin /mnt/smb -o username=user,password=1
test 
# mount
//192.168.183.204/admin on /mnt/smb type cifs (rw,mand)
#/ sbin / e-smith / do_backupwk
Thanks all for helping
Skype yosii2009

guest22

Re: easy way to back up files for recovery the server
« Reply #1 on: July 22, 2014, 11:21:56 PM »
???

Offline mgb

  • ****
  • 558
  • +0/-0
Re: easy way to back up files for recovery the server
« Reply #2 on: July 23, 2014, 10:36:16 AM »
Maybe I'm wrong
This is the message I'm seeing right now.
mnt]#  /usr/bin/perl -w /sbin/e-smith/do_backupwk
Partial backup stored on backup workstation.
Session cleanly closed by timeout after 28770 seconds.
Not an error, backup process will continue next night.

I do not see that the system performs.
In addition I created dar files
Could HELP
Thanks all for helping
Skype yosii2009

Offline Stefano

  • *
  • 10,839
  • +2/-0
Re: easy way to back up files for recovery the server
« Reply #3 on: July 23, 2014, 10:50:27 AM »
you should start telling us what you are trying to do.. a backup?
configure it via server-manager panel and check admin's email

Offline mgb

  • ****
  • 558
  • +0/-0
Re: easy way to back up files for recovery the server
« Reply #4 on: July 23, 2014, 11:09:28 AM »
I'm trying to create a backup.
Install a new server.
Old server 7.6 32B
The new server 64B 9
Size 0.5T files on the old.

is not work from
configure it via server-manager backup


I have on sharing my
/ mnt/smb/tmp_dir/linux1.linux1.il
/full-201407 ***.1. dar
201 407 ***.42. dar
...


The question of what? Command to change to a single file
smeserver.tgz
« Last Edit: July 24, 2014, 11:52:41 AM by mgb »
Thanks all for helping
Skype yosii2009

Offline Stefano

  • *
  • 10,839
  • +2/-0
Re: easy way to back up files for recovery the server
« Reply #5 on: July 23, 2014, 11:28:47 AM »
log in as admin into your old server
you should see a "perform backup to USB device"
follow the instructions (you need an USB disk..)

then, on the new server, perform a restore
read here first:

http://wiki.contribs.org/Backup_server_config#Restore_on_initial_reboot_after_fresh_OS_install_-_How_to_Reset_option

or, alternatively, here:
http://wiki.contribs.org/Backup_server_config#Command_line_manual_Restore_from_USB_drive_or_memory_stick


Offline mgb

  • ****
  • 558
  • +0/-0
Re: easy way to back up files for recovery the server
« Reply #6 on: July 24, 2014, 09:05:29 AM »
is not work
nano -w /root/exclude.txt
 nano -w /root/include.txt
 signal-event pre-backup
tar -cz --totals -vvp  --directory / --exclude-from=./exclude.txt --files-from=./include.txt   -f /mnt/smb/smeserver.tgz

-rw------- root/root          668 2014-07-21 13:28 etc/ssh/ssh_host_dsa_key
-rw------- root/root       125811 2013-11-23 00:40 etc/ssh/moduli
-r--r----- root/root         4002 2012-03-01 19:18 etc/sudoers
drwxr-xr-x root/root            0 2011-09-23 14:50 opt/
Total bytes written: 19592222720 (19GiB, 11MiB/s)
tar: Exiting with failure status due to previous errors
Thanks all for helping
Skype yosii2009

Offline Stefano

  • *
  • 10,839
  • +2/-0
Re: easy way to back up files for recovery the server
« Reply #7 on: July 24, 2014, 10:06:38 AM »
you should see the "previous errors" too..

in any case, find an usb disk and use the console "backup to usb"

P.S. you should know tha "it doesn't work" without any evidence/log is useless

Offline mgb

  • ****
  • 558
  • +0/-0
Re: easy way to back up files for recovery the server
« Reply #8 on: July 24, 2014, 01:40:56 PM »
find an usb disk and use the console "backup to usb"
my data is 0.5t
The server is not able to connect USB-DISK large 1T.
All versions 7.8.9 SME.
So there is a problem backing up large files.
Thanks all for helping
Skype yosii2009

Offline Stefano

  • *
  • 10,839
  • +2/-0
Re: easy way to back up files for recovery the server
« Reply #9 on: July 24, 2014, 03:26:24 PM »
my data is 0.5t

nothing strange nowadays..

Quote
The server is not able to connect USB-DISK large 1T.

If I understand correctly you are saying that your hw doesn't support large HD? seriously?
any evidence/log of it? can you share any info about your hw specs?

Quote
All versions 7.8.9 SME.

then it seems to me you have a (serious) HW issue.. just guessing..

Quote
So there is a problem backing up large files.

and we have the problem you are not telling us anything usefull to help you.. only "it doesn't work".. no log, nothing

in any case, let's start from the beginning

post the output of
Code: [Select]
config show backupwk

from your SME 7.6 server.. (remember to hide username/passwords)

mgb, once more, you really need to be more verbose with us if you want help

Offline mgb

  • ****
  • 558
  • +0/-0
Re: easy way to back up files for recovery the server
« Reply #10 on: July 28, 2014, 02:48:24 PM »
1   Server hardware supports
2 the sme 7.. not supports

3 because USB can not be connected. 1t disk/
4 I hooked up a computer sharing
5 I used the backup command


    signal-event pre-backup
tar -cz --totals -vvp  --directory / --exclude-from=./exclude.txt --files-from=./include.txt   -f /mnt/smb/smeserver.tgz


config show backupwk
backupwk=service
    BackupTime=15:05
    Compression=6
    CompressionProg=gzip
    DaysInSet=1
    FullDay=7
    IncOnlyTimeout=no
    Login=user
    Password=*
    Program=dar
    SetsMax=1
    SmbHost=192.168.183.204
    SmbShare=admin
    Timeout=8
    VFSType=cifs
    status=disabled  i stop status

Thanks all for helping
Skype yosii2009

Offline Stefano

  • *
  • 10,839
  • +2/-0
Re: easy way to back up files for recovery the server
« Reply #11 on: July 28, 2014, 03:55:31 PM »
1   Server hardware supports
2 the sme 7.. not supports

it is not clear to me..
once again, "it doesn't work" without logs and evidence is useless

Quote
3 because USB can not be connected. 1t disk/
4 I hooked up a computer sharing
5 I used the backup command


    signal-event pre-backup
tar -cz --totals -vvp  --directory / --exclude-from=./exclude.txt --files-from=./include.txt   -f /mnt/smb/smeserver.tgz

this is ONE approach

Quote
config show backupwk
backupwk=service
    BackupTime=15:05
    Compression=6
    CompressionProg=gzip
    DaysInSet=1
    FullDay=7
    IncOnlyTimeout=no
    Login=user
    Password=*
    Program=dar
    SetsMax=1
    SmbHost=192.168.183.204
    SmbShare=admin
    Timeout=8
    VFSType=cifs
    status=disabled  i stop status



and this is another approach

the first creates a smeserver.tgz file.. you can create it on a usb disk, on a shared folder, into SME itself..
the second creates a dar backup set..

so, in the end, what kind of backup do you want?
in one of your posts, about tar approach, you wrote

Quote
is not work
nano -w /root/exclude.txt
 nano -w /root/include.txt
 signal-event pre-backup
tar -cz --totals -vvp  --directory / --exclude-from=./exclude.txt --files-from=./include.txt   -f /mnt/smb/smeserver.tgz

-rw------- root/root          668 2014-07-21 13:28 etc/ssh/ssh_host_dsa_key
-rw------- root/root       125811 2013-11-23 00:40 etc/ssh/moduli
-r--r----- root/root         4002 2012-03-01 19:18 etc/sudoers
drwxr-xr-x root/root            0 2011-09-23 14:50 opt/
Total bytes written: 19592222720 (19GiB, 11MiB/s)
tar: Exiting with failure status due to previous errors

well, we need the errors.

I R E P E A T: if you want help you MUST help us

Offline mgb

  • ****
  • 558
  • +0/-0
Re: easy way to back up files for recovery the server
« Reply #12 on: July 28, 2014, 08:53:10 PM »
ok thanks.
  I'm wrong. 

Maybe type format
 
Important?

But my server is not able to USB disk over size-30-20G '  ntfs
I want the backup to restore.
- Feel free to connect.
- For computer hardware is supported on T1  win7 test
Thanks all for helping
Skype yosii2009

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: easy way to back up files for recovery the server
« Reply #13 on: July 28, 2014, 10:53:02 PM »
mgb

Quote
But my server is not able to USB disk over size-30-20G '  ntfs

Sme server does NOT support NTFS disks.
Please format any USB disk with ext3 or ext4
Refer Howto articles on USB, disks & RAID
See warning at the start of
http://wiki.contribs.org/USBDisks
« Last Edit: July 28, 2014, 10:58:41 PM by janet »
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline mgb

  • ****
  • 558
  • +0/-0
Re: easy way to back up files for recovery the server
« Reply #14 on: July 31, 2014, 12:24:34 PM »
erro restore
boot net server 9  64b

cd /
signal-event pre-restore
tar -C / -xzvf smeserver.tgz
/sbin/e-smith/signal-event post-upgrade
/sbin/e-smith/signal-event reboot


start .. sme
.

init: rcS main process ...
telinit: illegal runlevel: 7
init:rcS  post-stop process (818)...
Thanks all for helping
Skype yosii2009

Offline Stefano

  • *
  • 10,839
  • +2/-0
Re: easy way to back up files for recovery the server
« Reply #15 on: July 31, 2014, 12:28:05 PM »
mgb, your posts are useless to help you..

you keep saying "it doesn't work" or "error".

sorry but I personally can't help you

Offline mgb

  • ****
  • 558
  • +0/-0
Re: easy way to back up files for recovery the server
« Reply #16 on: July 31, 2014, 12:54:00 PM »
ok

1 I have performed a backup sme7.6
Procedure to create the backup on the server to be cloned

 
I copied the backup
copy to new server
New server SME9 64B
signal-event pre-restore
tar -C / -xzvf smeserver.tgz
# Performed without any problem
/sbin/e-smith/signal-event post-upgrade
/sbin/e-smith/signal-event reboot
is ok

2- boot
 
Display
init: rcS main process ...
telinit: illegal runlevel: 7
init:rcS  post-stop process (818)...
is stop boot

Thanks all for helping
Skype yosii2009

Offline Stefano

  • *
  • 10,839
  • +2/-0
Re: easy way to back up files for recovery the server
« Reply #17 on: July 31, 2014, 01:45:53 PM »
please post here the exact content of /etc/include.txt and /etc/exclude.txt you used to backup your server

how big is your tgz file?

Offline mgb

  • ****
  • 558
  • +0/-0
Re: easy way to back up files for recovery the server
« Reply #18 on: July 31, 2014, 02:26:03 PM »
24.7 gb  smeserver.tgz

1
home/e-smith/files/ibays/*/files/*
home/e-smith/files/users/*/home/*

2
home/e-smith/
etc/e-smith/
etc/group
etc/gshadow
etc/passwd
etc/samba/secrets.tdb
etc/samba/smbpasswd
etc/shadow
etc/smbpasswd
etc/ssh
etc/sudoers
opt



Thanks all for helping
Skype yosii2009

Offline Stefano

  • *
  • 10,839
  • +2/-0
Re: easy way to back up files for recovery the server
« Reply #19 on: July 31, 2014, 02:37:49 PM »
are you aware that in this way you are excluding ALL emails/files/ibays' content?


Offline janet

  • ****
  • 4,812
  • +0/-0
Re: easy way to back up files for recovery the server
« Reply #20 on: July 31, 2014, 02:43:58 PM »
mgb

It looks to me you have the file contents reversed, if you answered in the same order the question was asked.
Please read this again
http://wiki.contribs.org/Backup_server_config#Cloning_a_server_for_Test_purposes.2C_using_inclusion_.26_exclusion_files
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline mgb

  • ****
  • 558
  • +0/-0
Re: easy way to back up files for recovery the server
« Reply #21 on: August 03, 2014, 02:01:00 PM »
Hello, I'm backing up everything Folder separately - due to a large amount of files
  tar-zxvf example.tar.gz - it works well.

If you can backup only user passwords and email user - Example
Thanks for the help
Thanks all for helping
Skype yosii2009

Offline mgb

  • ****
  • 558
  • +0/-0
Re: easy way to back up files for recovery the server
« Reply #22 on: August 06, 2014, 11:36:49 AM »
help to find in smeserver.tgz
 DATABASE l lost
Thanks all for helping
Skype yosii2009

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: easy way to back up files for recovery the server
« Reply #23 on: August 06, 2014, 12:01:19 PM »
mgb

Unpack the file with the tar command
man tar
for specifics

databases are usually in
/var/lib/mysql/...

They should be in a dump file in
/home/e-smith/db
or is it
/home/e-smith/db/mysql
if the correct pre backup event was run on the server you were backing up.

Did you run the pre restore event on the new server, you need to do this to delete old copies of previous database dumps.

PS

Quote
If you can backup only user passwords and email user - Example

You cannot easily backup just that data, it is scattered throughout many files on the server & all of those have to be restored as an intact set as they cross correlate to each other with system IDs etc.
That's why you should (MUST) follow the standard backup & restore procedures & file inclusions as outlined in the Backup server config Howto
http://wiki.contribs.org/Backup_server_config#Standard_backup_.26_restore_inclusions

and this here
http://wiki.contribs.org/Backup_server_config#Manually_transferring_configuration_information
is the correct procedure to use to do a full backup & restore manually.

Deviation from these (as you are doing) will cause loss of data & loss of data entries & loss of mysql databases & tables & other information, users, ibays etc.

You have been WARNED.
« Last Edit: August 06, 2014, 12:09:45 PM by janet »
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.