User Tools

Site Tools


Making a backup


  • Everytime that a configuration file is edited, make a symlink to it from a configuration backup directory.
  • Backup the configuration backup directory, your homes, /usr/local, /var, using rdiff-backup. Check for /opt and /srv .

Using netcat (nc)

Making a backup

  • In client:
cat /dev/yourharddrive | nc server_ip server_port
  • In server:
nc -l -p port | tar -xzf backup_file.tar.gz

Restoring the backup

  • In client:
nc -l -p 6666 | zcat > /dev/your_harddrive
  • In server:
nc -q 1 ip_client_machine 6666< imagefile.img.gz

Procedure to recover from your backup


  • Install apache2. Configure normal.
  • Install files for dokuwiki, homes and wordpress in /etc/apache2/sites-available
  • Make the corresponding symlinks to sites-enable
  • Recover sites-available/default file


  • Install dokuwiki from debian
  • Recover all /var/lib/dokuwiki/ back
  • Recover /etc/dokuwiki/local.php and users.auth.php or something like this.
  • Recover the plugins to /usr/share/dokuwiki/lib/plugins . Just copy them there. (It's really only necessary to install translation2 plugin. Which doesn't need any other special configuration.


  • Install wordpress normally
  • Recover the themes and plugins into /usr/share/wordpress/wp-content/
  • Recover file to /etc/wordpress/


  • Use the same root password during debian installation than the one from old database
  • Stop mysql-server
  • Restore mysql original complete database. For some reason if I only restore wordpress database I get a Error establishing a database connection error. Also, if I restore from mysql client I still get inconsistency errors in the database. I had to recover the whole /var/lib/mysql directory
  • Restore from the backup /etc/mysql/debian.cnf
  • Restart mysql-server twice (second time, you should not get an error)
backup.txt · Last modified: 2021/01/31 23:55 (external edit)