Skip to content

Backuping from shared hosting by hands was not an option. CURL is not for javascript execution. For js execution using phantomjs and casperjs.

Notifications You must be signed in to change notification settings

devpull/phantom-backup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Backup from ispmanager control panel

Purpose of this

Hoster refused to provide daily backups and ftp access to them. But it is possible to launch backup process from ispmanager-filemanager by GET. Backuping from shared hosting by hands was not an option. Reason for using phantomjs & casperjs was because of authentication cookie was produced by js. CURL is not for javascript execution. For js execution using phantomjs and casperjs.

Flow

  1. Authorizing with phantomjs & casperjs
  2. Receiving javascript produced cookie
  3. CURL GET request using cookie

Requirements (tested with phantomjs v1.9.8 & casperjs v1.1.0-beta3)

  • phantomjs
  • casperjs
  • curl

Setup

  • Copy config.example.json to local/config.json and fill credentials.
  • Set chmod 755 permissions for b.sh
  • Set cron:
SHELL=/bin/bash  
[email protected]  
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin  
   
0 0 * * * /root/phan_bck/b.sh

About

Backuping from shared hosting by hands was not an option. CURL is not for javascript execution. For js execution using phantomjs and casperjs.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published