• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Backup/Restore IMPOSSIBLE!! Please help me!

RattleSn@ke

New Pleskian
Hi all,

I need some help with command-line backups.
I use this command to backup every domains seperately:
/usr/local/psa/bin/pleskbackup -s 512M domains $DOMAINNAME /var/backup/sites/$BACKUPFILE_$DOMAINNAME.backup

BUT THESE BACKUPS CAN'T BE RESTORED!!
Can someone please point out what's going wrong???
**When I upload this file to the local repos of the domain it says: "Not a backup file"
**When I generate a map file with the command: /usr/local/psa/bin/pleskrestore --create-map /var/backup/sites/$BACKUPFILE_$DOMAINNAME.backup -map /var/backup/sites/$BACKUPFILE_$DOMAINNAME.backup.map it creates the map file, but when I do:
Code:
[root@giant ~]# cat /var/backup/sites/$BACKUPFILE_$DOMAINNAME.backup.map
[]                                      # Cliënt does not exist.

eentestdomein.nl        123.123.123.123  # IP address 123.123.123.123 does not belong to target client's '' IP pool

And a restore is thus completely impossible!!
I really need help on this one!! Because I have to restore a previous website of a customer!!

Thanks!~
Onno.
 
Originally posted by blank_page
Hi,

Why don't you create the client from plesk and then the restore.

What do you exactly mean?? I only want to restore one site... the client where this site belongs to has about 32 domains/sites underneath it. I don't want to restore them all ... What's the command the plesk desk uses to backup a single domain? Because than it should be possible to use the same command from the commandline right??

Thanks!
 
Have you read the backup/restore manual? Don't upload those backups to repositories, use the pleskrestore command.
 
Originally posted by breun
Have you read the backup/restore manual? Don't upload those backups to repositories, use the pleskrestore command.

Hi Breun,

Yes, I did.
But the command-line manual is still the one of version 8.0
When I for example run a command that's stated in the manual I get:
Code:
*** You are using old-style pleskbackup command-line interface.
*** Consider switching to new style documented in 'pleskbackup help',
*** because old style eventually will be dropped.

And as fas as I know, that is the latest manual...

Thanks.
Onno.
 
Not much has changed. Just run the command that that message recommends to see the new switches. They just changed '--all' to just 'all', etc. And yes, the old style still works for now.
 
I think it could be a bug ...
When I run:
Code:
/usr/local/psa/bin/pleskbackup -v domains -f ./domains ./01domains.bck
or
Code:
/usr/local/psa/bin/pleskbackup -v domains domainname.nl ./01domains.bck

I get this output:
Code:
------------------------------------------------------------------------
Backup started. (1 domains)
Start date: Thu Mar  8 19:36:53 2007
------------------------------------------------------------------------
Phase 1/2: collecting information
[domain] testdomain1.com
Phase 2/2: packing data
------------------------------------------------------------------------
Backup finished.
Finish date: Thu Mar  8 19:36:53 2007
------------------------------------------------------------------------
This is all looking good, but when I generate a map file with
Code:
/usr/local/psa/bin/pleskrestore --create-map ./01domains.bck -map ./01domains.bck.map
and then run the validate command I get
Code:
/usr/local/psa/bin/pleskrestore --validate-map ./01domains.bck.map

## ERROR in line 1: Bad client login
The contents of the map file is the same as in my first message.

I noticed that the option 'clients' and 'all' work without any problems... (But I need to backup single domains...)
 
Hi Everyone!

I've just registered here because I have the same problem. Just as RattleSn@ke described, plesk backup/restore for a single domain seems to be kinda crappy... But it is really important for me to be able to backup/restore a single domain.

I tried even going a step further than RattleSn@ke. After receiving "Bad Client Login" error I manually edited map file for backup file. I entered client's login in brackets in the first line of the map file. And guess what? No more "Bad Login Error". Yay! But... I got another error instead...
Code:
./pleskrestore --restore backup-file -map backup-file-map -level all
## ERROR in line 3: IP address 123.123.123.123 does not belong to target client's 'client_login' IP pool

I said - What the hell?! The IP in map file is exactly the same as IP of the server of our hosting. I looked into IP Pool in Plesk for this specific client. But there is only one IP adress in there... exactly the same as in the map file... So, everything is correct, but pleskrestore acts somewhat weird about that...

I have no idea what to do about it. I need to make backups of single domains. Yeah, I can make backups via http access to Plesk... but that's not an option... Because I want to make a shell script to backup single domains, then send backup files to another server via scp.

Any ideas? Anyone...?

EDIT:
Allrighty... The map files generated by pleskrestore --create-map for domains are simply corrupted. They lack user login and IP. I manually entered IP address into the map file, just as I did with user login. And HOORAY! Restore started... but... heres the result:
Code:
pleskrestore --restore backup-file -map backup-file-map -level all
------------------------------------------------------------------------
Restore has been started
------------------------------------------------------------------------
Elapsed time: 00:00:00You are attempting to restore domain-level backup on the server level. Such restore will likely produce data loss and thus is prohibited.

What the hell is that supposed to mean? So is it simply not possible to make backup/restore of a single domain on server level? Then why does pleskrestore have this option? Why even they wrote about it in the manual if it doesn't work?

EDIT AGAIN:
Now I tried to do backup/restore for client with all domains... The map file was generated with no problems. Everything was fine, until I tried to restore client's account...

Code:
pleskrestore --restore client-backup-file -map client-backup-file-map -level all
------------------------------------------------------------------------
Restore has been started
------------------------------------------------------------------------
Elapsed time: 00:00:00You are attempting to restore client-level backup on the server level. Such restore will likely produce data loss and thus is prohibited.

Now it seems it is not possible to restore client's data on a server level as well. Why...? I'm not even trying to make backup of entire plesk data... because I'm almost sure it will not work... What is wrong with this pleskrestore utility...? :(
 
Originally posted by Riggy
EDIT:
Allrighty... The map files generated by pleskrestore --create-map for domains are simply corrupted. They lack user login and IP. I manually entered IP address into the map file, just as I did with user login. And HOORAY! Restore started... but... heres the result:
Code:
pleskrestore --restore backup-file -map backup-file-map -level all
------------------------------------------------------------------------
Restore has been started
------------------------------------------------------------------------
Elapsed time: 00:00:00You are attempting to restore domain-level backup on the server level. Such restore will likely produce data loss and thus is prohibited.

What the hell is that supposed to mean? So is it simply not possible to make backup/restore of a single domain on server level? Then why does pleskrestore have this option? Why even they wrote about it in the manual if it doesn't work?

EDIT AGAIN:
Now I tried to do backup/restore for client with all domains... The map file was generated with no problems. Everything was fine, until I tried to restore client's account...

Code:
pleskrestore --restore client-backup-file -map client-backup-file-map -level all
------------------------------------------------------------------------
Restore has been started
------------------------------------------------------------------------
Elapsed time: 00:00:00You are attempting to restore client-level backup on the server level. Such restore will likely produce data loss and thus is prohibited.

Now it seems it is not possible to restore client's data on a server level as well. Why...? I'm not even trying to make backup of entire plesk data... because I'm almost sure it will not work... What is wrong with this pleskrestore utility...? :( [/B]
Dear Riggy,

Very nice you'd came this far... Please try to restore the specific domain / client with --level domains (for restoring domains) or --level clients (for restoring clients)

This could solve the 'prohibited' error message because --level all is only used when you restore a full backup.
And when it did, please could you post a sample of a map-file? I didn't try it any further because I have some 'mission-critical' sites on my server...

Thanks!
Onno.
 
Here is the steps to backup individual domain. I've tested. It works.

1) backup the domain

#pleskbackup -v domains yourdomainname.com backupfilename.bkp

2) Then create a map file

#pleskrestore --create-map backupfilename.bkp -map yourmapfilename

map file should be like that below. if not, edit it.

+++++++++++++++++++++++++++++++++++++++++++++++++++++++

[thisdomain'sclientname] # Client account name

yourdomainname.com 11.22.33.44 # IP address
mysql::mad:localhost:3306

+++++++++++++++++++++++++++++++++++++++++++++++++++++++

Then you can restore it with the following command.

#pleskrestore --restore backupfilename.bkp -level domains -map yourmapfilename

This backup will back up everything including mailboxes and database.
 
Back
Top