Important Backup files and locations for Server Apps

backup
apps
quickbox

#1

Recently I’ve had to backup the apps and content on my current server and move it to another. So I thought I’d share the knowledge I gained during the move.

Here is a list of files and locations that you can use for backups and that you can use to restore:

Plex

/var/lib/plexmediaserver/

rtorrent

/home/USER/.sessions/
/home/USER/.rtorrent.rc

  • Backing up the .sessions folder allows you to restore all your torrents. I’m not sure where the entire config for rtorrent is stored but it takes me about 5 minutes to configure rtorrent on a new install, so not a big deal for me. Maybe someone can advise on this.

Ombi (Plexrequests)

/opt/plexrequests/Ombi.sqlite

PlexPy

/opt/plexpy/config.ini
/opt/plexpy/plexpy.db

Sickrage

/home/USER/.sickrage/cache.db
/home/USER/.sickrage/config.ini
/home/USER/.sickrage/failed.db
/home/USER/.sickrage/sickbeard.db
/home/USER/.sickrage/cache/

  • Sickrage also has a built in backup function which basically makes a backup .zip file of the above folders. Settings => Backup/Restore.

Couchpotato

/home/USER/.couchpotato/settings.conf
/home/USER/.couchpotato/database/

Sabnzbd

/home/USER/.sabnzbd/sabnzbd.ini

crontab

crontab -l > cron-backup.txt

  • /var/spool/cron/ is the location for crons for all users.

Scripts

/home/USER/scripts/

  • I store all my scripts for crons and such in one folder, so I just backup that folder.

I’m busy writing a script to store all this in a backup folder. That folder will then be uploaded to the cloud.

NOTE: It is assumed that you use the QB script and it helps if you use the same folder structure on the new server that you had on the old one.


#2

great hope its alright with you if i move this to a wiki :smiley:


#3

Yeah, no problem.


#4

on a note just for you to know when using user as in like this you can use $USER and it will auto do the current user (its part of the scripting junk lol)


#5

I created a backup script that performs a backup of all the above.


#6

this shows promise… how exactly can i get this set up on a daily basis?


#7

I’d suggest grabbing the script to your server and then doing a chmod +x on the file. You can then do something like, move it to /etc/cron.daily and setup a cron job to ensure it’s proper execution.

Obviously modifying it to your specific needs, ie; applications installed etc.


#8

looks good for start :smiley:
one to add just as some apps use it

~/.config
~/.rclone.conf
i will think of some others later those are just some.


#9

Agreed. That ~/.rclone.conf is pretty damned important when it comes to moving to a new server… especially if your files are encrypted.


#10

Agreed. I’ll add it.


#11

I have a cron that runs weekly on a Monday morning @ 03:30:

30 3 * * 1 /home/$USER/scripts/backups.sh >> /home/$USER/logs/backups.log 2>&1


#12

A post was split to a new topic: Rclone automated backup


#13

Great!!

Thanks Guys!! This is very useful!


#14

Hello, I would like to know the locations to back up settings+torrent session of Deluge

regards


#15

It says it in the script @KaMoS69 provides.

# Set backup path
BK_PATH=/home/$USER/backups

and…

### Deluge
echo "=====Deluge====="
# File location
DE_PATH=/home/$USER/.config/deluge
# Create dir if it doesn't exist
mkdir -p "$BK_PATH/deluge"
# Create archive
/bin/tar -cvf $BK_PATH/deluge/deluge-`date \+%Y\%m\%d`.tar.gz "$DE_PATH/core.conf" "$DE_PATH/web.conf" "$DE_PATH/session.state" "$DE_PATH/state/"

That’s all I can say as I don’t use this.


#16

This is correct. All the session data is in that location.


#17

@KaMoS69 @JMSolo Thanks for the help… I was able to restore my settings and session states of both clients with half success. In the case of rtorrent I was only able to restore some of the basic settings and the torrents session, another settings like ratio groups were lost and also I lost my RSS filters and its settings.

In the case of deluge I was able to restore all the setings and torrents session but for some reason I was not able to connect to the torrent trackers to send or receive data (despite of changing the ports and network interface values accourding to the new quickbox installation)

Could you tell me how to fix those issues for future reference?

Regards