
11th February 2011, 09:39
|
|
Member
|
|
Join Date: Jul 2008
Posts: 67
Thanks: 1
Thanked 33 Times in 4 Posts
|
|
Quote:
Originally Posted by smurf64
My output after run scrip is:
Code:
root@terserver:/home/badmin# ./back-res
mysql.general_log
note : The storage engine for the table doesn't support optimize
mysql.slow_log
note : The storage engine for the table doesn't support optimize
/bin/tar: /var/log/syslog: file changed as we read it
/bin/tar: /var/log/auth.log: file changed as we read it
/bin/tar: /var/log/messages: file changed as we read it
/bin/tar: /var/lib/apache2/fcgid/sock/32697.0: socket ignored
root@terserver:/home/badmin#
It is O.K.?
|
Short answer: Yes.
The mysql you have it's using newer type of storage engine wich does not support optimize.
The syslog daemon usually keeps writing  if it's not stopped. Don't worry you will have the missing lines in the next daily backup if you need them. Same with apache.
Don't forget to setup a cron job daily...
|

25th February 2011, 18:51
|
|
Junior Member
|
|
Join Date: Mar 2009
Posts: 13
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
Restore Question
I am new to Linux so I have a question about the backup-res restore. I created a dir /bck. This is where I have the backup-res put my backup files. It then creates a folder that is my domain name me.mydomain.tld. Inside that folder it creates the following
2011-02
2011-01
log
full_var_lib_mysql-2011-02-01.tar.bz2
full_var_vmail-2011-02-01.tar.bz2
full_etc-2011-02-01.tar.bz2
full_var_www-2011-02-01.tar.bz2
full_var_lib_mysql-2010-11-03.tar.bz2
when I run the ./backup-res dir all 2011-02-01 / this is what I get
-su: ./backup-res: No such file or directory
What am I missing here. I have the backup-res in the /etc folder
I am running Ununtu 10.04.01 LTS
|

27th February 2011, 16:56
|
|
Member
|
|
Join Date: Jul 2008
Posts: 67
Thanks: 1
Thanked 33 Times in 4 Posts
|
|
Quote:
Originally Posted by clttech
I am new to Linux so I have a question about the backup-res restore. I created a dir /bck. This is where I have the backup-res put my backup files. It then creates a folder that is my domain name me.mydomain.tld. Inside that folder it creates the following
2011-02
2011-01
log
full_var_lib_mysql-2011-02-01.tar.bz2
full_var_vmail-2011-02-01.tar.bz2
full_etc-2011-02-01.tar.bz2
full_var_www-2011-02-01.tar.bz2
full_var_lib_mysql-2010-11-03.tar.bz2
when I run the ./backup-res dir all 2011-02-01 / this is what I get
-su: ./backup-res: No such file or directory
What am I missing here. I have the backup-res in the /etc folder
I am running Ununtu 10.04.01 LTS
|
If you have the script in /etc then it will only work when you'll run it from there. So you'll have to 'cd /etc' first or run '/etc/back-res ...........'
Please read the info from the header of the script. I've tried to explain everything there. Then modify the variables as you like.
|

7th March 2011, 20:33
|
|
Junior Member
|
|
Join Date: Oct 2009
Posts: 14
Thanks: 5
Thanked 0 Times in 0 Posts
|
|
Restore backup on different server
Hi
I've managed to copy the backup files to a new server using scp. After processing all the sql dumps I untarred the /var/www and /var/vmail directories. However, the user names are obviously missing on the new server, so the owners of the files are now all set to root (except for a few files, of which the owner does exist.)
Am I missing something, or if not, is there a way to solve this, for instance by copying the entire user 'database' from one server to the other?
I feel I am very close to making a running backup server, but can't figure this out.
Thanks a lot!
|

25th March 2011, 08:35
|
|
Member
|
|
Join Date: Jul 2008
Posts: 67
Thanks: 1
Thanked 33 Times in 4 Posts
|
|
Restore the users, groups and permissions
Hello, I'm sorry to respond so late, but if you've have the backup of /etc restore that first (so you can have the user and groups from the old server) then restore the rest. This way you can preserve de file owner and permissions.
The other way is to instal the same linux version onto a new drive, then restore the backup on top of the new machine. So you can have a full working state of the backed up machine at your chosen date.
Hope this helps others too.
Quote:
Originally Posted by Florisjan
Hi
I've managed to copy the backup files to a new server using scp. After processing all the sql dumps I untarred the /var/www and /var/vmail directories. However, the user names are obviously missing on the new server, so the owners of the files are now all set to root (except for a few files, of which the owner does exist.)
Am I missing something, or if not, is there a way to solve this, for instance by copying the entire user 'database' from one server to the other?
I feel I am very close to making a running backup server, but can't figure this out.
Thanks a lot!
|
|

3rd April 2011, 23:16
|
|
Member
|
|
Join Date: Oct 2008
Posts: 37
Thanks: 7
Thanked 2 Times in 2 Posts
|
|
Hey folks,
I'm saving my server for some month with this great script an now I need to backup a folder.
What I launched as command was the following :
Code:
www:~/bin# ./backup.sh dir /var/www/clients/client0/web3/web 2011-04-01 /var/www/clients/client0/web3/web
Then I obtained this :
Code:
You want to restore dir /var/www/clients/client0/web3/web to date 2011-04-01.
Please input "yes" if the above is ok with you and press [ENTER]: yes
touch: cannot touch `/tmp/tmpbck/datestart': No such file or directory
touch: cannot touch `/tmp/tmpbck/dateend': No such file or directory
---------------------=== The back-res script by go0ogl3 ===---------------------
The backup part requires some configuration in the header of the script
and it's supposed to be run from cron.
The restore part it's supposed to be run from command line.
restore part Usage:
backup.sh [type-of-restore] [dir|db] [YYYY-MM-DD] [path]
backup.sh dir [dir-to-restore] [to-date] [path]
backup.sh dir all [to-date] [path]
backup.sh db [db-to-restore] [to-date]
backup.sh db all [to-date]
Where 'dir' or 'db' to restore is one of the configured dirs or db's to
backup, or 'all' to restore all dirs or db's.
Date format is full date, year sorted, YYYY-MM-DD, like 2009-01-30.
'path' is for dirs and is the path on which you want to extract the backup.
If the path to extract is not set, then the backup is extracted on /.
For more info read the header of this script!
-===--===--===--===--===--===--===--===--===--===--===--===--===--===--===--===-
### Invalid directory to restore! ###
./backup.sh: line 574: /tmp/tmpbck/maildata: No such file or directory
And line 574 contains this :
Code:
# Send accumulated maildata an cleanup
mail -s "Daily backup of $COMPUTER `date +'%F'`" "$email" < $tmpdir/maildata
So I think something is wrong with /tmp/tmpbck but since I do not know how this script exacly works I wanted to have some advice before trying some changes.
The script is in /root/bin and the data is in /bck
Thanks
Last edited by neutrino; 3rd April 2011 at 23:18.
|

7th April 2011, 01:44
|
|
Junior Member
|
|
Join Date: Jan 2011
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi...
thanks for the script!
any one know what that -> binary operator expected ... means?
================
/etc/back-res: line 347: [: full_bin-2011-03-25.tar.bz2: binary operator expected
/etc/back-res: line 347: [: full_boot-2011-03-25.tar.bz2: binary operator expected
/etc/back-res: line 347: [: full_etc-2011-03-25.tar.bz2: binary operator expected
/etc/back-res: line 347: [: full_home-2011-03-25.tar.bz2: binary operator expected
=====================
is this a kind of problem ?
thanks!
|

12th April 2011, 13:16
|
|
Junior Member
|
|
Join Date: Mar 2009
Posts: 13
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
Thanks for such a great script.
I am having a very similar problem.
You want to restore dir all to date 2011-04-01.
Please input "yes" if the above is ok with you and press [ENTER]: yes
Extracting all dir's backup from date 2011-04-01 to /:
touch: cannot touch `/tmp/tmpbck/datestart': No such file or directory
touch: cannot touch `/tmp/tmpbck/dateend': No such file or directory
find: `/tmp/tmpbck/datestart': No such file or directory
find: `/tmp/tmpbck/datestart': No such file or directory
find: `/tmp/tmpbck/dateend': No such file or directory
---------------------=== The back-res script by go0ogl3 ===---------------------
For a clean backup restored at 2011-04-01 we need now to delete the files
created after the backup date.
If exists, a list of files to be deleted follows:
Please input "yes" to delete those files, if they exist, and press [ENTER]:
/bck/c3po.clttechnologies.com/./backup-res: line 572: /tmp/tmpbck/maildata: No such file or directory
Line 572 is
mail -s "Daily backup of $COMPUTER `date +'%F'`" "$email" < $tmpdir/maildata
|

13th April 2011, 10:40
|
|
Member
|
|
Join Date: Jul 2008
Posts: 67
Thanks: 1
Thanked 33 Times in 4 Posts
|
|
Temp dir for the script...
It seems that you don't have a /tmp directory, or the script does NOT have access to write to /tmp. The script is creating the /tmp/tmpbck dir and keeps there all the files it needs to run.
Please check that you have the /tmp dir and if you do please check that is writable by the script (the user you run the script should be root).
The place where the script is located is not so important...
Hope this helps...
Quote:
Originally Posted by neutrino
Hey folks,
I'm saving my server for some month with this great script an now I need to backup a folder.
What I launched as command was the following :
Code:
www:~/bin# ./backup.sh dir /var/www/clients/client0/web3/web 2011-04-01 /var/www/clients/client0/web3/web
Then I obtained this :
Code:
You want to restore dir /var/www/clients/client0/web3/web to date 2011-04-01.
Please input "yes" if the above is ok with you and press [ENTER]: yes
touch: cannot touch `/tmp/tmpbck/datestart': No such file or directory
touch: cannot touch `/tmp/tmpbck/dateend': No such file or directory
---------------------=== The back-res script by go0ogl3 ===---------------------
The backup part requires some configuration in the header of the script
and it's supposed to be run from cron.
The restore part it's supposed to be run from command line.
restore part Usage:
backup.sh [type-of-restore] [dir|db] [YYYY-MM-DD] [path]
backup.sh dir [dir-to-restore] [to-date] [path]
backup.sh dir all [to-date] [path]
backup.sh db [db-to-restore] [to-date]
backup.sh db all [to-date]
Where 'dir' or 'db' to restore is one of the configured dirs or db's to
backup, or 'all' to restore all dirs or db's.
Date format is full date, year sorted, YYYY-MM-DD, like 2009-01-30.
'path' is for dirs and is the path on which you want to extract the backup.
If the path to extract is not set, then the backup is extracted on /.
For more info read the header of this script!
-===--===--===--===--===--===--===--===--===--===--===--===--===--===--===--===-
### Invalid directory to restore! ###
./backup.sh: line 574: /tmp/tmpbck/maildata: No such file or directory
And line 574 contains this :
Code:
# Send accumulated maildata an cleanup
mail -s "Daily backup of $COMPUTER `date +'%F'`" "$email" < $tmpdir/maildata
So I think something is wrong with /tmp/tmpbck but since I do not know how this script exacly works I wanted to have some advice before trying some changes.
The script is in /root/bin and the data is in /bck
Thanks
|
|

13th April 2011, 10:51
|
|
Member
|
|
Join Date: Jul 2008
Posts: 67
Thanks: 1
Thanked 33 Times in 4 Posts
|
|
Strange error
Hello!
Do you have the latest version of the script? What is the 347 line of your script? What's the BACKUPDIR you set? It's empty?
In the 347 line of the script, as I know it, is not a test in any version of the script and that error is only if you test something...
If the 347 line is
Code:
if [ -z $fb ] ; then
and you have the BACKUPDIR set,
then please check if you have spaces in the backup path... or try to modify the line like:
Code:
if [ -z "$fb" ] ; then
Quote:
Originally Posted by kostas1972
Hi...
thanks for the script!
any one know what that -> binary operator expected ... means?
================
/etc/back-res: line 347: [: full_bin-2011-03-25.tar.bz2: binary operator expected
/etc/back-res: line 347: [: full_boot-2011-03-25.tar.bz2: binary operator expected
/etc/back-res: line 347: [: full_etc-2011-03-25.tar.bz2: binary operator expected
/etc/back-res: line 347: [: full_home-2011-03-25.tar.bz2: binary operator expected
=====================
is this a kind of problem ?
thanks!
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 21:38.
|
|
Recent comments
15 hours 51 min ago
22 hours 32 min ago
1 day 2 hours ago
1 day 4 hours ago
1 day 12 hours ago
1 day 21 hours ago
1 day 22 hours ago
2 days 2 hours ago
2 days 6 hours ago
2 days 7 hours ago