Does Servage offer backups for files or databases if they are deleted accidentally ?

Yes!!, files and databases are stored in between 7 - 14 days by snapshots.

For web:

  • login to the SSH
  • type cd /storage/content/yy/xxxxxyy/.snapshots  (make a note of dot before the word 'snapshots')

(/storage/content/yy/xxxxxyy/ - yy is the two last digits in the customer ID, and xxxxxyy the entire customer ID of your account)

root@ser-staff-01# cd /storage/content/yy/xxxxxyy/.snapshots

You will see a list of date stamped folders where you can fetch data. This is how it should look like :
root@ser-staff-01# ls -ahl
total 64K
drwx--x--- 1 1000850 www-data 516 Apr 26 02:00 .
drwx--x--- 1 1000850 www-data 516 Apr 26 09:12 ..
drwx--x--- 1 1000850 www-data 280 Apr 12 15:18 Daily_2018_04_13__02_00
drwx--x--- 1 1000850 www-data 280 Apr 12 15:18 Daily_2018_04_14__02_00
drwx--x--- 1 1000850 www-data 280 Apr 12 15:18 Daily_2018_04_15__02_00
drwx--x--- 1 1000850 www-data 280 Apr 12 15:18 Daily_2018_04_16__02_00
drwx--x--- 1 1000850 www-data 280 Apr 12 15:18 Daily_2018_04_17__02_00
drwx--x--- 1 1000850 www-data 356 Apr 17 11:43 Daily_2018_04_18__02_00
drwx--x--- 1 1000850 www-data 356 Apr 17 11:43 Daily_2018_04_19__02_00
drwx--x--- 1 1000850 www-data 356 Apr 17 11:43 Daily_2018_04_20__02_00
drwx--x--- 1 1000850 www-data 396 Apr 20 12:09 Daily_2018_04_21__02_00
drwx--x--- 1 1000850 www-data 396 Apr 20 12:09 Daily_2018_04_22__02_00
drwx--x--- 1 1000850 www-data 396 Apr 20 12:09 Daily_2018_04_23__02_00
drwx--x--- 1 1000850 www-data 396 Apr 20 12:09 Daily_2018_04_24__02_00
drwx--x--- 1 1000850 www-data 436 Apr 24 21:09 Daily_2018_04_25__02_00
drwx--x--- 1 1000850 www-data 476 Apr 25 09:18 Daily_2018_04_26__02_00

You can then enter to the date stamped folders you want to fetch the data from by typing, for example

root@ser-staff-01# cd Daily_2018_04_26__02_00
You will see your files of your account here. You can fetch the file content you want. These folders contain all backups of your files. Select the last created folder and see if the file is in it. If the file is created and then lost within a time span where a backup has not been taken then, it can not be recovered.


For databases:
Backups are saved in "db_backup" folder in customers homedir i.e in under the root (/) (every night is overwritten there), and this can also be revised by using snapshot for older bacakups.

Login in SSH and type: cd .snapshots
This will show you all backups. Select the backup archive and go to its db_backup folder to get the db backup. Now copy that to your account file manager:
cp db-backup.sql.gz /storage/content/xx/xxxxxxx/

Now uncompress the backup:
gunzip db-backup.sql.gz

First ensure you have a blank db created via control panel in which you should restore the backup. If not created, please create it first.

Then you can restore using this command:
mysql -h <db server hostname> -u db_user -p db_name < db_backup.sql

eg: mysql -h 04.mysql.servage.net -u 100xxxx_dbusername -p 100xxxx-newblankdb < backup_of_db.sql

When prompted for password, enter the blank database username's password which you created.That will now restore the database backup to the new database in your control panel. You can later use phpmyadmin to check the restored database

 

-rw-r--r-- 1 root root 4.8K Apr 26 00:20 1000850-fvyfya107187-ser-mysql-01-06.sql.gz
-rw-r--r-- 1 root root 293 Apr 26 00:20 1000850-helge-ser-mysql-01-06.sql.gz
-rw-r--r-- 1 root root 293 Apr 26 00:20 1000850-james-ser-mysql-01-06.sql.gz
-rw-r--r-- 1 root root 4.8K Apr 26 00:20 1000850-jrfliu889295-ser-mysql-01-06.sql.gz

You will see the Mysql backups here.