diff --git a/airtime_mvc/application/views/scripts/index/maintenance.phtml b/airtime_mvc/application/views/scripts/index/maintenance.phtml index 5a2277989..24c614fcb 100644 --- a/airtime_mvc/application/views/scripts/index/maintenance.phtml +++ b/airtime_mvc/application/views/scripts/index/maintenance.phtml @@ -1 +1 @@ -Airtime is down for maintenance. We'll be back soon! +Libretime is down for maintenance. We'll be back soon! diff --git a/backup.sh b/backup.sh new file mode 100644 index 000000000..f13e8e48e --- /dev/null +++ b/backup.sh @@ -0,0 +1,15 @@ +#/bin/bash + +# Replace /backup with backup folder location! +# Used for backing up the media library +sudo rsync -aE --delete --info=progress2 /srv/airtime/stor/ /backup + +# Used for backing up the database +sudo -u postgres pg_dumpall | gzip -c > libretime-db-backup.gz +sudo mv libretime-db-backup.gz /backup + +# Used for backing up Libretime configs +sudo cp /etc/airtime/airtime.conf backup/airtime.conf.backup + +# Write date/time of backup +date >> /backup/datelog.txt \ No newline at end of file diff --git a/multipass.yml b/cloud-init.yml similarity index 100% rename from multipass.yml rename to cloud-init.yml diff --git a/docs/_docs/backing-up-the-server.md b/docs/_docs/backing-up-the-server.md index 311878148..5f77ac2b7 100644 --- a/docs/_docs/backing-up-the-server.md +++ b/docs/_docs/backing-up-the-server.md @@ -4,23 +4,45 @@ title: Backing Up Libretime category: admin --- -## Database Backup +## Backup -The following shell commands can be used for database backup and restore on a -running *PostgreSQL* server in an LibreTime system. - -You can dump the entire database to a zipped file with the combination of the +You can dump the entire *PostgreSQL* database to a zipped file with the combination of the **pg\_dumpall** command and **gzip**. The **pg\_dumpall** command is executed as the user *postgres*, by using the **sudo** command and the **-u** switch. It is separated from the **gzip** command with the pipe symbol. -```bash -sudo -u postgres pg_dumpall | gzip -c > libretime-backup.gz -``` - This command can be automated to run on a regular basis using the standard **cron** tool on your server. +It is recommended to use an incremental backup technique to synchronize +the your LibreTime track library with a backup server regularly. (If +the backup server also contains an LibreTime installation, it should be possible +to switch playout to this second machine relatively quickly, in case of a +hardware failure or other emergency on the production server.) + +Two notible backup tools are [rsync](http://rsync.samba.org/) (without version control) and +[rdiff-backup](http://www.nongnu.org/rdiff-backup/) (with version control). *rsync* comes +preinstalled with Ubuntu Server. + +> **Note:** Standard *rsync* backups cannot restore files deleted in the backup itself + +``` +#/bin/bash + +# Replace /backup with backup folder location! +# Used for backing up the media library +sudo rsync -aE --delete --info=progress2 /srv/airtime/stor/ /backup + +# Used for backing up the database +sudo -u postgres pg_dumpall | gzip -c > libretime-db-backup.gz +sudo mv libretime-db-backup.gz /backup + +# Write date/time of backup to file +date >> /backup/datelog.txt +``` + +## Restore from a Backup + When restoring a production database on a cleanly installed LibreTime system, it may be necessary to drop the empty database that was created during the new installation, by using the **dropdb** command. Again, this command is executed @@ -39,8 +61,8 @@ To restore, first unzip the backup file with **gunzip**, then use the **psql** command as the *postgres* user: ```bash -gunzip libretime-backup.gz -sudo -u postgres psql -f libretime-backup +gunzip libretime-db-backup.gz +sudo -u postgres psql -f libretim-db-backup ``` You should now be able to log in to the LibreTime web interface in the usual way. @@ -50,27 +72,3 @@ which is backed up by your storage backup tool of choice; for example, the */srv/airtime/database\_backups* directory. This should ensure that a storage restore can be made along with a matching and complete version of the LibreTime database from the day that the storage backup was made.  - -## Storage backup - -Backing up the LibreTime database with **pg\_dumpall** will not back up the -LibreTime media storage server, which is likely to need a great deal more backup -space. Creating a compressed file from hundreds of gigabytes of storage server -contents is likely to take a very long time, and may have little benefit for the -amount of CPU power used, if the media files are already stored in a highly -compressed format. It is also impractical to copy very large backup files across -the network on a daily basis. - -Instead, it is preferable to use an incremental backup technique to synchronize -the production LibreTime server storage with a backup server each day or night. If -the backup server also contains an LibreTime installation, it should be possible -to switch playout to this second machine relatively quickly, in case of a -hardware failure or other emergency on the production server. - -A standard incremental backup tool on GNU/Linux servers is [rsync](http://rsync.samba.org/) which can be installed -using the package manager of your GNU/Linux distribution. However, incremental -backup alone cannot help in the scenario where a file which later proves to be -important has been deleted by an administrator. For backups that can be rolled -back to restore from an earlier date than the current backup, the tool -[rdiff-backup](http://www.nongnu.org/rdiff-backup/) can -be deployed.   diff --git a/docs/_docs/dashboard.md b/docs/_docs/dashboard.md index acb2aa93d..b3c57e977 100644 --- a/docs/_docs/dashboard.md +++ b/docs/_docs/dashboard.md @@ -4,6 +4,8 @@ title: Dashboard category: interface --- +> Want to listen to Libretime's output stream? Click **Listen** below the **On Air** light. + The Dashboard is divided into two sections a Library section divided between Tracks, Playlists, Smart Blocks, Webstreams, and Podcasts, with the **Scheduled Shows** dialog on the right. This page provides an overview of the right-hand diff --git a/docs/_docs/interface-localization.md b/docs/_docs/interface-localization.md index 11f0f43fe..17000612e 100644 --- a/docs/_docs/interface-localization.md +++ b/docs/_docs/interface-localization.md @@ -6,7 +6,7 @@ category: admin The LibreTime administration interface can be localized using the standard GNU **gettext** method. Using GitHub for this task means you don't have to tackle the whole of a localization yourself; just as much as you can manage. -![](img/Screenshot464-Korean_stream_setting.png) +![](/img/Screenshot464-Korean_stream_setting.png) First, you should check if a localization is already under way for your locale of choice. The best way to do this is to take a look at the 'master' branch in the GitHub repository for LibreTime at . You can also ask in the LibreTime development forum at , where you might find community members who can help you with the translation. diff --git a/docs/_docs/multipass.md b/docs/_docs/multipass.md index fe2b9077d..80b873590 100644 --- a/docs/_docs/multipass.md +++ b/docs/_docs/multipass.md @@ -5,10 +5,12 @@ category: dev --- [Multipass](https://multipass.run) is a tool for easily setting up Ubuntu VMs on Windows, Mac, and Linux. -Similar to Docker, Multipass works through a CLI. To use, clone this repo and then open a Terminal (or Command Prompt) inside the created folder and run +Similar to Docker, Multipass works through a CLI. To use, clone this repo and then create a new Multipass VM. ``` -multipass launch bionic -n ltTEST --cloud-init multipass.yaml +git clone https://github.com/libretime/libretime.git +cd libretime +multipass launch bionic -n ltTEST --cloud-init cloud-init.yaml multipass shell ltTEST ``` @@ -16,7 +18,8 @@ Multipass isn't currently able to do an automated install from the cloud-init sc After you enter the shell for the first time, you will still need to run the install script for LibreTime. ``` -sudo ./libretime/install -fiap +cd libretime +sudo bash install -fiap ``` The IP address of your new VM can be found by running `multipass list`. Copy and paste it into your web browser to access the LibreTime interface and complete the setup wizard. diff --git a/docs/_docs/vagrant.md b/docs/_docs/vagrant.md index 487373193..f7bd07152 100644 --- a/docs/_docs/vagrant.md +++ b/docs/_docs/vagrant.md @@ -79,9 +79,8 @@ cd libretime vagrant up ubuntu-xenial ``` -If everything works out, you will find LibreTime on [port 8080](http://localhost:8080), -icecast on [port 8000](http://localhost:8000) and the docs on -[port 8888](http://localhost:8888). +If everything works out, you will find LibreTime on [port 8080](http://localhost:8080) +and Icecast on [port 8000](http://localhost:8000). Once you reach the web setup GUI you can click through it using the default values. To connect to the vagrant machine you can run `vagrant ssh ubuntu-xenial` in the libretime diff --git a/docs/search.html b/docs/search.html index ea1282b8c..f78e682d2 100644 --- a/docs/search.html +++ b/docs/search.html @@ -1,7 +1,27 @@ --- layout: default +title: Search --- +
+
+
+
+

{{ page.title }}

+ + + +
+
+
+ +
+
{% include search-lunr.html %} diff --git a/utils/airtime-backup.py b/utils/airtime-backup.py deleted file mode 100644 index 8838d3c88..000000000 --- a/utils/airtime-backup.py +++ /dev/null @@ -1,52 +0,0 @@ -import os -import sys -import shutil - -#check if root -if os.geteuid() != 0: - print 'Must be a root user.' - sys.exit(1) - -#ask if we should backup config files -backup_config = True - -#ask if we should backup database -backup_database = True - -#ask if we should backup stor directory -backup_stor = True - -#ask if we should backup all watched directories -backup_watched = True - -#create airtime-backup directory -os.mkdir("airtime_backup") - -if backup_config: - backup_config_dir = "airtime_backup/config" - os.mkdir(backup_config_dir) - #TODO check if directory exists - config_dir = "/etc/airtime" - files = os.listdir() - for f in files: - shutil.copy(os.path.join(config_dir, f), \ - os.path.join(backup_config_dir, f) - -if backup_database: - os.mkdir("airtime_backup/database") - #TODO: get database name - #TODO use abs path - "pg_dump airtime > database.dump.sql" - -#TODO this might not be necessary -os.mkdir("airtime_backup/files") - -if backup_stor: - #TODO use abs path - backup_stor_dir = "airtime_backup/files/stor" - os.mkdir(backup_stor_dir) - shutil.copytree("/srv/airtime/stor", backup_stor_dir) - -if backup_watched: - pass -